signalk-pypilot-newui 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,173 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.3.0 — 2026-08-31 — Rev130..Rev137
4
+
5
+ Feature batch on top of 2.2.x. Themes: make the visor speak the user's
6
+ language end-to-end (Doctor findings, alarm banners and TTS voice
7
+ included), turn the Setup launcher into an at-a-glance dashboard,
8
+ give Tune the same profile-fork discipline the Doctor already had,
9
+ and make Sensor Quality something the skipper can silence for
10
+ sensors that aren't on this boat.
11
+
12
+ ### English
13
+
14
+ **Added**
15
+
16
+ - **Chart tab — interactive hover** (Rev129) — freeze the auto-refresh
17
+ and read the exact value of every band at any point in the history
18
+ window by hovering the graph. Y-axis ticks (min / mid / max) now
19
+ sit inside the right gutter for each band.
20
+ - **Tune tab — per-slider restore + profile fork prompt** (Rev129,
21
+ Rev132..Rev134) — every gain slider gets a ↺ button that snaps
22
+ back to the frozen baseline captured when you unlocked the panel.
23
+ On the first change of an unlock session a modal asks whether to
24
+ keep the tweaks in the current profile, save them in a new
25
+ `tune-YYYYMMDD-HHMM` fork (mirroring the Doctor pattern), or
26
+ Cancel and revert the change entirely.
27
+ - **Setup launcher — live status chips on every tile** (Rev130..Rev135)
28
+ — Pypilot Connection shows `host:port`, Language shows the active
29
+ locale, Calibration shows the timestamp of the last slider
30
+ adjustment (with a `Reset historial` button on the card), Signal K
31
+ Sentences shows the count of published SK paths out of the plugin
32
+ catalog total, and Remote Control Console reports whether SSH
33
+ creds are stored.
34
+ - **Sensor Quality — per-row Ignore / Restore** (Rev134..Rev135) —
35
+ the chip now also counts "missing" sensors (a watched path that
36
+ has never emitted a delta) into the failure tally, and each row
37
+ gains an Ignore / Restore button so a sensor you don't have on
38
+ this boat (rudder without a rudder feedback, temp probe absent,
39
+ ...) stops turning the chip red. Persisted per-browser.
40
+ - **Nav bar slide-down gesture** (Rev129) — the counterpart to the
41
+ existing slide-up hide; drag from the top of the visor to bring
42
+ the tab bar back.
43
+ - **Doctor — Hide button always visible + i18n findings**
44
+ (Rev135..Rev136) — the Descartar / Ocultar button stays visible
45
+ even after a suggestion has been applied so you can clear stale
46
+ advice from the list. Hidden suggestions also drop off the tile
47
+ chip's counter so the card goes back to `sano` once you've cleared
48
+ everything. Backend now emits i18n keys + args for findings and
49
+ summary so the whole Doctor panel reads in the active language.
50
+ - **Alarm engine i18n** (Rev135..Rev136) — the seven built-in alarm
51
+ rules (heading-deviation, unable-to-steer, servo-overcurrent,
52
+ servo-temp-high, low-voltage, sensor-lost, pypilot-disconnected)
53
+ now render banners and speak the message in the active language
54
+ (EN / ES / DE / FR). The backend still publishes the English
55
+ notification message on `notifications.autopilot.*` for
56
+ KIP / WilhelmSK compatibility.
57
+ - **Info tab — English classic-UI link fix** (Rev129) — the
58
+ hardcoded Spanish string "Interfaz clasica pypilot" that leaked
59
+ into every language moved to a proper i18n key with `{host}` /
60
+ `{port}` interpolation.
61
+ - **Remote Control Console — TinyPilot defaults** (Rev136) — the
62
+ tile no longer wears its emergency red frame; the SSH user field
63
+ is pre-filled with the TinyPilot default (`tc`) and a hint spells
64
+ out that the default password is `tc` too, so the setup is a
65
+ two-click job on a stock TinyPilot.
66
+ - **Better DE / FR coverage** (Rev134..Rev136) — Setup tile titles,
67
+ calibration strings, Tune fork modal, chip labels, Doctor summary
68
+ / findings and alarm messages now translate in Deutsch and
69
+ Français instead of falling back to English.
70
+
71
+ **Changed**
72
+
73
+ - **All six screenshots refreshed** to match the current UI
74
+ (Control rose with the Gota Chain arrow layout, Chart Trip Stats,
75
+ Tune with per-slider reset, Setup launcher chips, Race timer,
76
+ Info panel).
77
+
78
+ ### Español
79
+
80
+ **Añadido**
81
+
82
+ - **Chart — cursor sobre gráficas** — al pasar el dedo o el ratón
83
+ sobre una gráfica se congela el refresh y aparece una línea
84
+ vertical + tooltip con `-X.Xs` y el valor de cada banda en ese
85
+ punto. Escala Y (min / mid / max) por banda en el margen derecho.
86
+ - **Tune — botón ↺ por slider + prompt de perfil** — cada gain trae
87
+ un ↺ que vuelve al valor previo (el que había al desbloquear). El
88
+ primer cambio tras unlock lanza un modal preguntando si guardar
89
+ en el perfil actual, crear un nuevo `tune-YYYYMMDD-HHMM` (mismo
90
+ patrón que Doctor) o cancelar y revertir.
91
+ - **Setup — chips vivos en cada tile** — TinyPilot con host:port,
92
+ idioma actual, fecha del último ajuste de calibración (con botón
93
+ Reset historial), contador de sentencias SK publicadas frente al
94
+ total del catálogo del plugin, y aviso de SSH configurado en
95
+ Remote Control Console.
96
+ - **Sensor Quality — Ignorar / Restaurar por fila** — los sensores
97
+ que nunca han reportado también cuentan en el ✕, y cada fila con
98
+ problema tiene ahora un botón Ignorar (persistente en el
99
+ navegador) para no volver a teñir el chip por un sensor que no
100
+ hay en el barco.
101
+ - **Slide desde arriba para mostrar la barra de pestañas** — vuelta
102
+ atrás del slide hacia arriba que ya escondía la nav.
103
+ - **Doctor — botón Ocultar siempre + findings traducidos** — se
104
+ puede vaciar la lista de sugerencias aunque ya las hubieras
105
+ aplicado, y el chip del tile vuelve a "sano" cuando no queda
106
+ ninguna. Backend emite ahora claves i18n para findings y summary.
107
+ - **Alarmas en tu idioma** — las siete reglas (desvío de rumbo,
108
+ autoridad, servo, temperatura, tensión, sensor perdido,
109
+ desconexión pypilot) se muestran y se hablan en el idioma activo.
110
+ Al SK sigue viajando el mensaje en inglés para compatibilidad con
111
+ KIP / WilhelmSK.
112
+ - **Info EN sin fugas al ES** — el "Interfaz clásica pypilot" que
113
+ se colaba en cualquier idioma pasó a clave i18n.
114
+ - **Remote Console con defaults TinyPilot** — sin borde rojo,
115
+ usuario `tc` pre-cargado y aviso de que la contraseña por defecto
116
+ también es `tc`.
117
+ - **Mejor cobertura DE / FR** en todos los strings visibles del
118
+ Setup, Tune, Doctor y alarmas.
119
+
120
+ **Cambiado**
121
+
122
+ - **6 screenshots** actualizados a la UI actual.
123
+
124
+ ### Deutsch
125
+
126
+ **Neu**
127
+
128
+ - Chart mit Hover-Freeze und Y-Achse pro Band.
129
+ - Tune-Slider mit ↺ und Profil-Fork-Dialog (Cancel setzt zurueck).
130
+ - Setup-Kacheln zeigen Live-Status (Host, Sprache,
131
+ Kalibrierdatum, aktive SK-Saetze, SSH konfiguriert).
132
+ - Sensor Quality mit "missing" im Chip-Zaehler und einer
133
+ Ignore / Restore-Taste pro Zeile.
134
+ - Slide von oben zeigt die Tab-Leiste wieder.
135
+ - Doctor: Ausblenden-Taste bleibt sichtbar, Findings und Summary
136
+ jetzt uebersetzt.
137
+ - Alarm-Meldungen und Sprachausgabe in der aktiven Sprache.
138
+ - Remote-Konsole ohne roten Rahmen; `tc` als Standard-Login.
139
+ - Erweiterte DE-Uebersetzungen.
140
+
141
+ ### Français
142
+
143
+ **Nouveautés**
144
+
145
+ - Onglet Chart avec figeage au survol et graduation Y par bande.
146
+ - Onglet Tune avec bouton ↺ par slider et modal de fork de profil
147
+ (Annuler revient a la valeur d'origine).
148
+ - Grille Setup avec puces d'etat vivantes (hote, langue, dernier
149
+ ajustement de calibration, phrases SK actives, SSH configure).
150
+ - Sensor Quality avec "missing" dans le compteur et un bouton
151
+ Ignorer / Restaurer par ligne.
152
+ - Glissement du haut vers le bas pour reafficher la barre
153
+ d'onglets.
154
+ - Doctor: bouton Masquer toujours visible, findings et resume
155
+ traduits.
156
+ - Alarmes et voix TTS dans la langue active.
157
+ - Console distante sans cadre rouge; `tc` par defaut.
158
+ - Traductions FR etendues.
159
+
160
+ ## 2.2.1 — 2026-08-31 — Rev128
161
+
162
+ Docs-only patch release.
163
+
164
+ - **README** — embedded the four App Store screenshots as absolute
165
+ `raw.githubusercontent.com` URLs so they render both on the NPM
166
+ website (which only surfaces the README, not `signalk.screenshots[]`)
167
+ and inside any other viewer that follows the README markdown. The
168
+ registry serves the README frozen at publish time, so this bump is
169
+ the only way to get the updated README to `npmjs.com/package/signalk-pypilot-newui`.
170
+
3
171
  ## 2.2.0 — 2026-08-31 — Rev88..Rev127
4
172
 
5
173
  Forty in-session Revs of navigation-oriented features on top of the
package/README.md CHANGED
@@ -9,6 +9,132 @@ and switches out of the box.
9
9
  Runs alongside [`pypilot-autopilot-provider`](https://www.npmjs.com/package/pypilot-autopilot-provider)
10
10
  by Panaaj — see [Working alongside pypilot-autopilot-provider](#working-alongside-pypilot-autopilot-provider).
11
11
 
12
+ ## Screenshots
13
+
14
+ | Control | Chart |
15
+ |---|---|
16
+ | ![Control tab](https://raw.githubusercontent.com/Aitonos/signalk-pypilot-newui/main/public/screenshots/01-control-rose.jpg) | ![Chart tab](https://raw.githubusercontent.com/Aitonos/signalk-pypilot-newui/main/public/screenshots/02-chart-trip-stats.jpg) |
17
+
18
+ | Tune | Setup |
19
+ |---|---|
20
+ | ![Tune tab](https://raw.githubusercontent.com/Aitonos/signalk-pypilot-newui/main/public/screenshots/03-tune-gains.jpg) | ![Setup tab](https://raw.githubusercontent.com/Aitonos/signalk-pypilot-newui/main/public/screenshots/04-setup-launcher.jpg) |
21
+
22
+ | Race | Info |
23
+ |---|---|
24
+ | ![Race tab](https://raw.githubusercontent.com/Aitonos/signalk-pypilot-newui/main/public/screenshots/05-race-timer.jpg) | ![Info tab](https://raw.githubusercontent.com/Aitonos/signalk-pypilot-newui/main/public/screenshots/06-info.jpg) |
25
+
26
+ ## What's new in 2.3.0
27
+
28
+ Feature batch on top of 2.2.x:
29
+
30
+ - **Chart tab — interactive hover** — freeze the auto-refresh and
31
+ read the exact value of every band at any point in the history
32
+ window by hovering the graph. Y-axis ticks (min / mid / max) now
33
+ sit inside the right gutter for each band.
34
+ - **Tune tab — per-slider restore + profile fork prompt** — every
35
+ gain slider gets a ↺ button that snaps back to the frozen
36
+ baseline captured when you unlocked the panel. On the first
37
+ change of an unlock session a modal asks whether to keep the
38
+ tweaks in the current profile, save them in a new
39
+ `tune-YYYYMMDD-HHMM` fork (mirroring the Doctor pattern), or
40
+ Cancel and revert.
41
+ - **Setup launcher — live status chips on every tile** — Pypilot
42
+ Connection shows `host:port`, Language shows the active locale,
43
+ Calibration shows the timestamp of the last slider adjustment
44
+ (with a `Reset historial` button on the card), Signal K Sentences
45
+ shows the count of published SK paths, and Remote Control Console
46
+ says whether SSH creds are stored. Sensor Quality now counts
47
+ missing sensors into the failure tally and each row gains an
48
+ Ignore / Restore button so a sensor you don't have on this boat
49
+ (rudder without a rudder feedback, temp probe absent, ...) stops
50
+ turning the chip red.
51
+ - **Nav bar slide-down gesture** — the counterpart to the existing
52
+ slide-up hide; drag from the top of the visor to bring the tab
53
+ bar back.
54
+ - **Doctor tab — Hide / Discard on every suggestion** — the
55
+ Descartar / Ocultar button stays visible even after a suggestion
56
+ has been applied so you can clear stale advice from the list.
57
+ Hidden suggestions also drop off the tile chip's counter so the
58
+ card goes back to `sano` once you've cleared everything. Backend
59
+ now emits i18n keys + args for findings and summary so the whole
60
+ Doctor panel reads in the active language.
61
+ - **Alarm engine i18n** — the seven built-in alarm rules
62
+ (heading-deviation, unable-to-steer, servo-overcurrent, etc.) now
63
+ render banners and speak the message in the active language
64
+ (EN / ES / DE / FR). The backend still publishes the English
65
+ notification message on `notifications.autopilot.*` for
66
+ KIP / WilhelmSK compatibility.
67
+ - **Better DE / FR coverage** — Setup tile titles, calibration
68
+ strings, Tune fork modal and Info tab now translate in Deutsch
69
+ and Français instead of falling back to English.
70
+ - **Remote Control Console defaults** — the tile no longer wears
71
+ its emergency red frame; the SSH user field is pre-filled with
72
+ the TinyPilot default (`tc`) and a hint spells out that the
73
+ default password is `tc` too, so the setup is a two-click job on
74
+ a stock TinyPilot.
75
+
76
+ ## What's new in 2.2.0
77
+
78
+ 2.2.0 turns the plugin into an **intelligence layer over pypilot**. Forty
79
+ in-session Revs on top of the 2.1.0 visual foundation. Highlights:
80
+
81
+ - **Aproado pseudo-mode** — a new "raise the sails" AP mode not in
82
+ pypilot upstream. Pick BY BOW / BY STERN via a 5 s modal, the
83
+ plugin switches pypilot to wind mode with target 0° (head to
84
+ wind), and a floating HUD over the boat shows elapsed time,
85
+ straight-line distance from the start and the compass heading
86
+ captured at activation. SALIR restores the previous mode + target
87
+ + engaged state. BY STERN forces a stern-through swing by walking
88
+ a chain of intermediate targets 60° apart so pypilot cannot
89
+ shortcut through the bow.
90
+ - **Telemetry historian + Chart tab** — RAM ring buffer at 1 Hz for
91
+ the last 30 min (backend, Pi 5 friendly). Nine Trip Stats cards
92
+ (AP engaged time, distance, energy, mean / RMS / p95 heading
93
+ error, servo runtime, tacks / gybes, peak servo A) fed live via
94
+ SK paths, plus a canvas with 30 s / 2 min / 10 min windows.
95
+ - **Sensor Quality + Servo Health + Alarm engine + Pre-departure
96
+ check** — new backend modules that grade every SK path the AP
97
+ depends on, learn a baseline servo current and flag anomalies,
98
+ evaluate seven alarm rules that publish canonical
99
+ `notifications.autopilot.*`, and roll everything into a single
100
+ READY / READY-WITH-CAVEATS / DO-NOT-ENGAGE verdict.
101
+ - **Pypilot Doctor** — press DIAGNOSE, the plugin records 2-3 min
102
+ with the AP engaged, runs heuristic rules on the heading error
103
+ stream (bias / oscillation / low authority) and proposes P / I /
104
+ D adjustments with a plain explanation. Nothing is applied
105
+ automatically. The first Apply of a session **forks the current
106
+ pypilot profile** into a new `doctor-YYYYMMDD-HHMM` profile so
107
+ the previous gains stay one profile-select away.
108
+ - **Setup as a launcher grid** — every setup block is now a square
109
+ tile in a 2 / 3 / 4-column grid. Tap opens fullscreen with a
110
+ small X to close and ESC support. Live summary pill on every
111
+ tile. Connection consolidated (status + LAN scan + manual host +
112
+ Autopilot Provider in one card). "Emergency" renamed to "Remote
113
+ Control Console".
114
+ - **Interactive SSH console** — free-form command input with
115
+ on-screen arrow buttons for mobile history navigation,
116
+ accumulative output textarea, clipboard fallback for HTTP LAN,
117
+ and 14 preset buttons with plain human labels (Memory / IP
118
+ table / WiFi / Temperature / Who is connected / ...). BusyBox /
119
+ piCore-safe fallbacks for every command.
120
+ - **Full RangeSetting sliders in Calibration** — every pypilot
121
+ `RangeSetting` grouped by category (rudder / servo / imu / ap /
122
+ other) with the same look as the Tune tab, a lock checkbox with
123
+ the padlock emoji, a frozen "before:" baseline that never moves
124
+ as you drag, and a per-slider ↺ restore button.
125
+ - **Gota Chain shape swap** — after iterations with skippers using
126
+ the plugin: the AMBER "A" arrow (apparent wind) is now the LARGE
127
+ piece and the TEAL "T" arrow (true wind) the SMALL outer one.
128
+ Colors and letters kept their canonical meaning; only the SVG
129
+ paths moved so the amber piece is visually the dominant one.
130
+ - **Full i18n audit** across EN / ES / FR / DE — every hard-coded
131
+ English string in the non-EN bundles purged, alarm messages and
132
+ Doctor suggestion reason / effect exposed as i18n keys + args so
133
+ the frontend renders in the user's language.
134
+
135
+ See [`CHANGELOG.md`](./CHANGELOG.md) for the full detailed list in
136
+ four languages.
137
+
12
138
  ## Upgrading from 1.0.0 to 2.0.0
13
139
 
14
140
  2.0.0 is a **breaking release** addressing feedback from Sean D'Epagnier
@@ -162,15 +288,35 @@ that isolated TinyPilot.
162
288
 
163
289
  | Method | Path | Purpose |
164
290
  |---|---|---|
165
- | `GET` | `/plugins/signalk-pypilot-newui/status` | Connection + last-seen catalog summary + Rev + version |
291
+ | `GET` | `/plugins/signalk-pypilot-newui/status` | Connection + last-seen catalog summary + Rev + version + historian header + KPI computedTs |
166
292
  | `GET` | `/plugins/signalk-pypilot-newui/scan` | Scan LAN for `pypilot_web` hosts |
167
293
  | `GET` | `/plugins/signalk-pypilot-newui/paths` | Live list of published SK paths with GET / PUT URLs and units |
168
294
  | `GET` | `/plugins/signalk-pypilot-newui/catalog` | Raw pypilot catalog (all values + metadata) |
295
+ | `GET` | `/plugins/signalk-pypilot-newui/values` | Current pypilot value cache |
169
296
  | `PUT` | `/plugins/signalk-pypilot-newui/raw` | Send raw `name=value` to pypilot (protected by `allowWrites`) |
170
- | `POST` | `/plugins/signalk-pypilot-newui/restart-pypilot` | SSH `sv restart` of pypilot core+web on the TinyPilot, uses `sshUser` + `sshPassword` from plugin config |
171
- | `POST` | `/plugins/signalk-pypilot-newui/debug-cmd` | Run one of a closed whitelist of preset diagnostic / restart commands over SSH (`restart.web`, `reboot.pi`, `logs.pypilot`, `logs.web`, `dmesg`, `top`, `uptime`, `df`, `pypilot.version`). Body: `{ "preset": "<name>" }` |
172
- | `POST` | `/plugins/signalk-pypilot-newui/pause` | Disconnect local socket (for scripts) |
173
- | `POST` | `/plugins/signalk-pypilot-newui/resume` | Reconnect local socket (for scripts) |
297
+ | `GET` | `/plugins/signalk-pypilot-newui/history` | Historian slice. Query `?window=30s\|2m\|10m` and `?paths=headingCmd,rudder,...`. RAM ring buffer at 1 Hz. |
298
+ | `GET` | `/plugins/signalk-pypilot-newui/stats` | KPI snapshot: session (engaged time, distance, energy, tacks, gybes, max servo A) + window1m (mean / RMS / p95 heading error, servo duty). |
299
+ | `POST` | `/plugins/signalk-pypilot-newui/session/reset` | Reset the KPI session counters. History buffer is kept. |
300
+ | `GET` | `/plugins/signalk-pypilot-newui/quality` | Sensor Quality snapshot: age / observed Hz / jitter / source / status per watched SK path. |
301
+ | `GET` | `/plugins/signalk-pypilot-newui/servo-health` | Servo Health snapshot: learned baseline current, deviation ratio, peak A, samples in the learn window. |
302
+ | `GET` | `/plugins/signalk-pypilot-newui/alarms/state` | Active alarms + short resolved history. |
303
+ | `GET` | `/plugins/signalk-pypilot-newui/alarms/rules` | Rule metadata (id / label / severity / enabled / muted / active). |
304
+ | `POST` | `/plugins/signalk-pypilot-newui/alarms/ack/:id` | Acknowledge one active alarm (silences the sound, banner stays visible). |
305
+ | `POST` | `/plugins/signalk-pypilot-newui/alarms/mute/:id` | Mute the RULE for N minutes (query `?min=15`). |
306
+ | `POST` | `/plugins/signalk-pypilot-newui/alarms/enable/:id` | Enable / disable a rule (query `?on=1\|0`). |
307
+ | `GET` | `/plugins/signalk-pypilot-newui/prechecks` | Pre-departure autopilot check verdict: `ready` / `ready-with-caveats` / `do-not-engage` + per-item detail. |
308
+ | `POST` | `/plugins/signalk-pypilot-newui/doctor/start` | Start a diagnostic session (query `?duration=180`). Requires AP engaged. |
309
+ | `POST` | `/plugins/signalk-pypilot-newui/doctor/cancel` | Cancel the current session. |
310
+ | `GET` | `/plugins/signalk-pypilot-newui/doctor/status` | Session state + progress + result (when completed). |
311
+ | `POST` | `/plugins/signalk-pypilot-newui/doctor/apply/:id` | Apply one gain suggestion. The FIRST apply of the session forks the profile into `doctor-YYYYMMDD-HHMM`. |
312
+ | `POST` | `/plugins/signalk-pypilot-newui/doctor/apply-all` | Apply every non-dismissed suggestion (all land in the same forked profile). |
313
+ | `POST` | `/plugins/signalk-pypilot-newui/doctor/dismiss/:id` | Mark a suggestion as dismissed (user rejects it). |
314
+ | `POST` | `/plugins/signalk-pypilot-newui/doctor/reset` | Clear result, back to idle. |
315
+ | `POST` | `/plugins/signalk-pypilot-newui/restart-pypilot` | SSH `sv restart` of pypilot core+web on the TinyPilot. |
316
+ | `POST` | `/plugins/signalk-pypilot-newui/debug-cmd` | Run one of a closed whitelist of preset diagnostic / restart commands over SSH. Body: `{ "preset": "<name>" }`. |
317
+ | `POST` | `/plugins/signalk-pypilot-newui/ssh-exec` | Free-form SSH command (Remote Control Console). Body: `{ "cmd": "<any shell>" }`. Requires `allowWrites`. |
318
+ | `POST` | `/plugins/signalk-pypilot-newui/pause` | Disconnect local socket (for scripts). |
319
+ | `POST` | `/plugins/signalk-pypilot-newui/resume` | Reconnect local socket (for scripts). |
174
320
 
175
321
  ## Safety
176
322
 
package/dist/doctor.js CHANGED
@@ -175,6 +175,8 @@ class DoctorEngine {
175
175
  severity: "warn",
176
176
  message: `Only ${n} engaged samples collected. Analysis skipped - keep the AP engaged during the whole session.`,
177
177
  metric: `n=${n}`,
178
+ messageKey: "doctor.finding.insufficientData",
179
+ messageArgs: { n: String(n) },
178
180
  });
179
181
  return this.buildResult(session, now, samples, engaged, findings, suggestions);
180
182
  }
@@ -185,6 +187,8 @@ class DoctorEngine {
185
187
  severity: Math.abs(meanDeg) > 6 ? "critical" : "warn",
186
188
  message: `Persistent heading offset of ${meanDeg.toFixed(1)}° (mean error).`,
187
189
  metric: `meanErr=${meanDeg.toFixed(2)}°`,
190
+ messageKey: "doctor.finding.bias",
191
+ messageArgs: { deg: meanDeg.toFixed(1) },
188
192
  });
189
193
  const I = session.initialGains["I"];
190
194
  if (typeof I === "number" && I > 0) {
@@ -215,6 +219,8 @@ class DoctorEngine {
215
219
  severity: "warn",
216
220
  message: `Heading oscillating with period ~${oscPeriodS.toFixed(1)}s, RMS ${rmsDeg.toFixed(1)}°.`,
217
221
  metric: `oscPeriod=${oscPeriodS.toFixed(1)}s rms=${rmsDeg.toFixed(2)}°`,
222
+ messageKey: "doctor.finding.oscillation",
223
+ messageArgs: { period: oscPeriodS.toFixed(1), rms: rmsDeg.toFixed(1) },
218
224
  });
219
225
  const D = session.initialGains["D"];
220
226
  if (typeof D === "number" && D > 0) {
@@ -246,6 +252,8 @@ class DoctorEngine {
246
252
  severity: "critical",
247
253
  message: `Servo running at ${(servoDuty * 100).toFixed(0)}% duty but heading error still ${rmsDeg.toFixed(1)}°. AP is losing authority.`,
248
254
  metric: `rms=${rmsDeg.toFixed(2)}° duty=${(servoDuty * 100).toFixed(0)}%`,
255
+ messageKey: "doctor.finding.authority",
256
+ messageArgs: { duty: (servoDuty * 100).toFixed(0), rms: rmsDeg.toFixed(1) },
249
257
  });
250
258
  const P = session.initialGains["P"];
251
259
  if (typeof P === "number" && P > 0) {
@@ -275,6 +283,8 @@ class DoctorEngine {
275
283
  severity: "info",
276
284
  message: `Heading is tight (${rmsDeg.toFixed(2)}°) but servo running ${(servoDuty * 100).toFixed(0)}% duty - possible chatter on a noisy heading signal.`,
277
285
  metric: `rms=${rmsDeg.toFixed(2)}° duty=${(servoDuty * 100).toFixed(0)}%`,
286
+ messageKey: "doctor.finding.noise",
287
+ messageArgs: { rms: rmsDeg.toFixed(2), duty: (servoDuty * 100).toFixed(0) },
278
288
  });
279
289
  // No P/I/D suggestion - chatter is usually a deadband issue.
280
290
  }
@@ -282,12 +292,23 @@ class DoctorEngine {
282
292
  }
283
293
  buildResult(session, now, samples, engaged, findings, suggestions) {
284
294
  let summary;
285
- if (findings.length === 0)
295
+ let summaryKey;
296
+ let summaryArgs;
297
+ if (findings.length === 0) {
286
298
  summary = "No significant issues detected. Current gains look healthy.";
287
- else if (suggestions.length === 0)
299
+ summaryKey = "doctor.summary.clean";
300
+ summaryArgs = {};
301
+ }
302
+ else if (suggestions.length === 0) {
288
303
  summary = `${findings.length} issue(s) noted (no gain change suggested).`;
289
- else
304
+ summaryKey = "doctor.summary.notedOnly";
305
+ summaryArgs = { issues: findings.length };
306
+ }
307
+ else {
290
308
  summary = `${findings.length} issue(s) detected. ${suggestions.length} gain change(s) suggested.`;
309
+ summaryKey = "doctor.summary.detected";
310
+ summaryArgs = { issues: findings.length, suggestions: suggestions.length };
311
+ }
291
312
  return {
292
313
  sessionId: session.id,
293
314
  startedTs: session.startedTs,
@@ -301,6 +322,8 @@ class DoctorEngine {
301
322
  findings,
302
323
  suggestions,
303
324
  summary,
325
+ summaryKey,
326
+ summaryArgs,
304
327
  };
305
328
  }
306
329
  // Rev120 (Carlos): on the FIRST apply of this session we fork the
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ const prechecks_1 = require("./prechecks");
13
13
  const doctor_1 = require("./doctor");
14
14
  // Rev counter bumped on every build so the user can distinguish deploys
15
15
  // from the webapp header (feedback_revision_bump_each_build).
16
- const PLUGIN_REVISION = "Rev127";
16
+ const PLUGIN_REVISION = "Rev137";
17
17
  // Rev59: read package.json once at load time so /status can report the
18
18
  // npm package version alongside the internal Rev counter.
19
19
  // eslint-disable-next-line @typescript-eslint/no-require-imports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-pypilot-newui",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Signal K friendly UI for the pypilot autopilot, with the capability to spread its functions and buttons to other programs like KIP, WilhelmSK and freeboard. Touch-first mobile visor + full pypilot data (servo, gains, calibration, tack, warnings) as first-class Signal K paths and Simple Switches. Coexists with pypilot-autopilot-provider.",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -42,10 +42,12 @@
42
42
  "displayName": "PyPilot New-UI + SK Paths",
43
43
  "webapp": "./public",
44
44
  "screenshots": [
45
- { "src": "./public/screenshots/01-control-rose.jpg", "title": "Control - compass rose with sailing wedges, AWA/TWA arrows, target diamond" },
46
- { "src": "./public/screenshots/02-tune-gains.jpg", "title": "Tune - PID gain sliders with -10/-1/+1/+10 fine-tune and safety lock" },
47
- { "src": "./public/screenshots/03-info.jpg", "title": "Info - quick start, credits, license, GitHub link, config export/import" },
48
- { "src": "./public/screenshots/04-setup.jpg", "title": "Setup - LAN scan, absorb provider, remote RESTART pypilot via SSH" }
45
+ { "src": "./public/screenshots/01-control-rose.jpg", "title": "Control - compass rose with Gota Chain (amber A = apparent wind, teal T = true wind), sailing wedges, 4 configurable corner tiles, big-touch AP button and heading trim buttons" },
46
+ { "src": "./public/screenshots/02-chart-trip-stats.jpg", "title": "Chart - Trip Stats cards (engaged time, distance, energy, RMS/p95 heading error, servo runtime, tacks/gybes, max servo A) plus live Servo Health baseline" },
47
+ { "src": "./public/screenshots/03-tune-gains.jpg", "title": "Tune - PID gain sliders per pilot/profile, locked-by-default with orange 'was:' baseline, ±10/±1 fine-tune buttons" },
48
+ { "src": "./public/screenshots/04-setup-launcher.jpg", "title": "Setup - launcher grid with live-summary tiles for Autopilot Check, Diagnostics & Advice (Pypilot Doctor), Sensor Quality, Alarms, Connection, Calibration, Signal K Sentences, Language and Remote Control Console" },
49
+ { "src": "./public/screenshots/05-race-timer.jpg", "title": "Race - T1/T2 countdown timer with beeps and spoken seconds, background-persistent across tabs" },
50
+ { "src": "./public/screenshots/06-info.jpg", "title": "Info - safety notice, quick-start guide, coexistence with pypilot-autopilot-provider, credits and license" }
49
51
  ]
50
52
  },
51
53
  "files": [