diff --git a/changelog/highlights/215.json b/changelog/highlights/215.json index 68fe743e..d9ccc025 100644 --- a/changelog/highlights/215.json +++ b/changelog/highlights/215.json @@ -69,6 +69,10 @@ "title": { "de": "Wirkungsgradkurve", "en": "Efficiency curve" + }, + "unavailable": { + "de": "Erscheint, sobald es eine Messkette gibt.", + "en": "Appears once a measurement chain exists." } }, { @@ -82,6 +86,10 @@ "title": { "de": "Diagnose", "en": "Diagnosis" + }, + "unavailable": { + "de": "Erscheint, sobald es eine Messkette gibt.", + "en": "Appears once a measurement chain exists." } }, { @@ -95,6 +103,10 @@ "title": { "de": "Verluste in der Statistik", "en": "Losses in the statistics" + }, + "unavailable": { + "de": "Erscheint, sobald es eine Messkette gibt.", + "en": "Appears once a measurement chain exists." } }, { @@ -113,6 +125,10 @@ "title": { "de": "Bedingung Messkette", "en": "Measurement chain condition" + }, + "unavailable": { + "de": "Erscheint, sobald es eine Messkette gibt.", + "en": "Appears once a measurement chain exists." } }, { @@ -130,6 +146,10 @@ "title": { "de": "Vorlagen für Messketten", "en": "Chain templates" + }, + "unavailable": { + "de": "Erscheint, sobald es eine Messkette gibt.", + "en": "Appears once a measurement chain exists." } }, { @@ -145,6 +165,10 @@ "title": { "de": "Messketten-Sensoren für Home Assistant", "en": "Chain sensors for Home Assistant" + }, + "unavailable": { + "de": "Erscheint, wenn „Energiewerte als Home-Assistant-Gerät anbieten“ eingeschaltet ist.", + "en": "Appears when “Offer energy values as a Home Assistant device” is on." } } ] diff --git a/changelog/highlights/233.json b/changelog/highlights/233.json index 5a70bfd0..a6d8b182 100644 --- a/changelog/highlights/233.json +++ b/changelog/highlights/233.json @@ -42,6 +42,10 @@ "title": { "de": "Laufwerk einrichten", "en": "Set up the drive" + }, + "unavailable": { + "de": "Erscheint, solange kein zusätzliches Laufwerk eingerichtet ist.", + "en": "Shown while no additional drive is set up." } }, { diff --git a/changelog/highlights/238.json b/changelog/highlights/238.json index 494e3f64..02c31edb 100644 --- a/changelog/highlights/238.json +++ b/changelog/highlights/238.json @@ -55,6 +55,10 @@ "title": { "de": "Notfall-Hotspot", "en": "Emergency hotspot" + }, + "unavailable": { + "de": "Erscheint nur auf Geräten mit WLAN.", + "en": "Only on devices with Wi-Fi." } } ] diff --git a/changelog/highlights/283.json b/changelog/highlights/283.json index af5683f4..0344e67e 100644 --- a/changelog/highlights/283.json +++ b/changelog/highlights/283.json @@ -26,6 +26,10 @@ "title": { "de": "Vorschläge aus deinen Geräten", "en": "Suggestions from your devices" + }, + "unavailable": { + "de": "Erscheint, wenn das Lernen aus deinen Geräten eingeschaltet ist.", + "en": "Appears when learning from your devices is on." } }, { @@ -40,6 +44,10 @@ "title": { "de": "Die besten Ideen kommen zuerst", "en": "The best ideas come first" + }, + "unavailable": { + "de": "Erscheint, sobald die Node einen Vorschlag gelernt hat.", + "en": "Appears once the node has learned a suggestion." } }, { @@ -57,6 +65,10 @@ "title": { "de": "Den Beleg ansehen", "en": "See the evidence" + }, + "unavailable": { + "de": "Erscheint, sobald die Node einen Vorschlag gelernt hat.", + "en": "Appears once the node has learned a suggestion." } }, { @@ -91,6 +103,10 @@ "title": { "de": "Die Marke an der Regel", "en": "The mark on the rule" + }, + "unavailable": { + "de": "Erscheint an einer Regel aus einem übernommenen Vorschlag nach der ersten vollen Woche.", + "en": "Appears on a rule from an adopted suggestion after its first full week." } } ] diff --git a/changelog/highlights/284.json b/changelog/highlights/284.json index b2b3dfe1..259c5422 100644 --- a/changelog/highlights/284.json +++ b/changelog/highlights/284.json @@ -17,12 +17,16 @@ "panel": "automations-panel", "target": "rule-learned-value", "text": { - "de": "Uhrzeiten, Schwellen und Haltezeiten können jetzt dem folgen, was der Knoten gelernt hat. Wechsle von Fester Wert zu Lernwert, wähle den gelernten Wert und lege eine untere und obere Grenze fest. Der Lernwert verlässt diese Grenzen nie, und solange nichts gelernt ist, gilt der Ersatzwert. Der Umschalter erscheint erst, wenn der Knoten für dieses Feld einen Lernwert hat.", - "en": "Times, thresholds and hold times can now follow what the node has learned. Switch from Fixed value to Learned value, pick what was learned and set a lower and upper bound. The learned value never leaves these bounds, and the fallback applies while nothing is learned. The switch only shows once the node has a learned value for this field." + "de": "Uhrzeiten, Schwellen und Haltezeiten können jetzt dem folgen, was der Knoten gelernt hat. Wechsle von Fester Wert zu Lernwert, wähle den gelernten Wert und lege eine untere und obere Grenze fest. Der Lernwert verlässt diese Grenzen nie, und solange nichts gelernt ist, gilt der Ersatzwert.", + "en": "Times, thresholds and hold times can now follow what the node has learned. Switch from Fixed value to Learned value, pick what was learned and set a lower and upper bound. The learned value never leaves these bounds, and the fallback applies while nothing is learned." }, "title": { "de": "Fester Wert oder Lernwert", "en": "Fixed value or learned value" + }, + "unavailable": { + "de": "Erscheint, sobald die Node für ein Feld einen Lernwert hat.", + "en": "Appears once the node has a learned value for a field." } } ] diff --git a/changelog/highlights/291.json b/changelog/highlights/291.json index d863a1c1..ee947b67 100644 --- a/changelog/highlights/291.json +++ b/changelog/highlights/291.json @@ -39,6 +39,10 @@ "title": { "de": "Meldungen und Quittung", "en": "Notices and acknowledgement" + }, + "unavailable": { + "de": "Erscheint, sobald es eine Meldung gibt.", + "en": "Appears once there is a notice." } }, { diff --git a/changelog/highlights/299.json b/changelog/highlights/299.json index 5c888bda..e5c1fc99 100644 --- a/changelog/highlights/299.json +++ b/changelog/highlights/299.json @@ -21,6 +21,10 @@ "title": { "de": "Systemversionen", "en": "System versions" + }, + "unavailable": { + "de": "Erscheint, sobald die Node ihre Systemprogramme gemeldet hat.", + "en": "Appears once the node has reported its system programs." } } ] diff --git a/changelog/highlights/307.json b/changelog/highlights/307.json new file mode 100644 index 00000000..b69b7169 --- /dev/null +++ b/changelog/highlights/307.json @@ -0,0 +1,8 @@ +{ + "de": { + "*": "Fehlt das Ziel eines Tourschritts, nennt die Tour den Grund und zeigt es, sobald es erscheint" + }, + "en": { + "*": "Show a missing tour target as a status line with its reason" + } +} diff --git a/changelog/highlights/archive-v0.json b/changelog/highlights/archive-v0.json index 6440e3a1..e2d7b476 100644 --- a/changelog/highlights/archive-v0.json +++ b/changelog/highlights/archive-v0.json @@ -2120,6 +2120,10 @@ "title": { "de": "Überarbeitete Einzelregeln", "en": "Reworked single rules" + }, + "unavailable": { + "de": "Erscheint, sobald es eine Regel gibt.", + "en": "Appears once a rule exists." } }, { @@ -2168,6 +2172,10 @@ "title": { "de": "Letzte Auslösungen", "en": "Latest triggers" + }, + "unavailable": { + "de": "Erscheint bei einer Regel mit eingeschaltetem Verlauf.", + "en": "Appears on a rule with its history switched on." } }, { diff --git a/dashboard/CHANGELOG.md b/dashboard/CHANGELOG.md index d48aa7c0..54b74be6 100644 --- a/dashboard/CHANGELOG.md +++ b/dashboard/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## v0.11.23-pre.41 (2026-11-06) +## v0.11.23-pre.42 (2026-11-06) ### Features @@ -38,6 +38,10 @@ - **monitoring:** Monitoring shows the forecast check, a year comparison and the learned values as a usual day (#297) (4f93975) - **dashboard:** show system versions on the versions page (#299) (18a2b0b) - **automations:** Monitoring checks the results of adopted suggestions and rules report a season drift (#300) (d9e023b) +- **onboarding:** pass the unavailable reason of tour steps to the web UI (cf6a666) +- **onboarding:** keep tour step hints out of the step text (03bc065) +- **onboarding:** show a missing tour target as a status line and spot it once it appears (f0728db) +- **onboarding:** show a missing tour target as a status line with its reason (#307) - **monitoring:** add a notice for a missing site location (e85cf0b) - **monitoring:** ask for the site location when PV learning needs it (9300975) - **automations:** mark rules that came from a learned suggestion (f85130f) @@ -370,6 +374,10 @@ - **storage:** set up, back up and replug the additional drive reliably (#247) (b668394) - **automations:** correct the learning feature after the full review (#296) (88f3c75) - Monitoring names values without a role and links to the learning settings (#303) (29450b8) +- **automations:** correct the learning methods after the spec check (#306) (0296218) +- **onboarding:** draw the status line icon as an outline (77f5e56) +- **history:** keep proxies from compressing the event streams (#304) (0298760) +- **backup:** A restore stays in place even when the battery state cannot be written (#288) (e5c5437) - **autolearn:** learn the season median of the weather factor from measured minutes (ca31a44) - **autolearn:** count a load that the PV covers as a weather measurement (d5ffb8e) - **autolearn:** need a known off state before a switch counts as turned on (0ad8879) @@ -380,9 +388,6 @@ - **autolearn:** suggest the threshold reached on three of the last 14 days (da6fe78) - **autolearn:** find contradicting rules whose ranges meet (ea018f3) - **autolearn:** correct the findings of the branch review (ee702d3) -- **automations:** correct the learning methods after the spec check (#306) -- **history:** keep proxies from compressing the event streams (#304) (0298760) -- **backup:** A restore stays in place even when the battery state cannot be written (#288) (e5c5437) - **monitoring:** add the text for the learning settings button (50b5e84) - **monitoring:** name the values of the role notice (9462d1f) - **monitoring:** open the learning settings from the learned values (a07ed43) @@ -591,6 +596,7 @@ ### Chores +- **webui:** move the cache-bust rows to the rebased version (b91bedc) - **webui:** bump cache marks for the learning follow-up (556b5ae) - **energy:** drop the styles and getter of the old energy notices (a864af2) - **monitoring:** drop the old notice keys, bump the changed assets, describe the button (c99833b) diff --git a/dashboard/VERSION b/dashboard/VERSION index bb196294..61036c1d 100644 --- a/dashboard/VERSION +++ b/dashboard/VERSION @@ -1 +1 @@ -v0.11.23-pre.41 +v0.11.23-pre.42 diff --git a/dashboard/internal/versions/highlights.go b/dashboard/internal/versions/highlights.go index 8093b77f..01c100ca 100644 --- a/dashboard/internal/versions/highlights.go +++ b/dashboard/internal/versions/highlights.go @@ -68,7 +68,8 @@ type TourReplacement struct { // as "companion" for a paired companion. The server keeps the step when it // does not hold and sets Unmet, so the tour shows the text with a note and no // spotlight instead of waiting for a missing target. Open lists the entries (data-tour ids or @actions) that must -// exist before the step runs, otherwise the tour is stale. +// exist before the step runs, otherwise the tour is stale. Unavailable holds +// the optional reason shown when the target is not visible right now. type TourStep struct { Panel string `json:"panel,omitempty"` Page string `json:"page,omitempty"` @@ -77,10 +78,11 @@ type TourStep struct { Need string `json:"need,omitempty"` When string `json:"when,omitempty"` // Unmet is set by the server per request, stored tours never carry it. - Unmet bool `json:"unmet,omitempty"` - Open []string `json:"open,omitempty"` - Title map[string]string `json:"title"` - Text map[string]string `json:"text"` + Unmet bool `json:"unmet,omitempty"` + Open []string `json:"open,omitempty"` + Title map[string]string `json:"title"` + Text map[string]string `json:"text"` + Unavailable map[string]string `json:"unavailable,omitempty"` } // HighlightsRelease is one release of a component inside the range. diff --git a/dashboard/internal/versions/highlights_test.go b/dashboard/internal/versions/highlights_test.go index 81da4657..c04fa30c 100644 --- a/dashboard/internal/versions/highlights_test.go +++ b/dashboard/internal/versions/highlights_test.go @@ -290,7 +290,7 @@ func TestHighlightsPassesTourThrough(t *testing.T) { {"version":"v0.9.0","groups":[{"type":"feat","entries":[ {"text":"favourites","pr":180,"breaking":false,"highlight":true, "tour":{"steps":[{"panel":"devices-panel","page":"users","target":"favorites","device":"phone","need":"view_devices", - "title":{"en":"Favourites","de":"Favoriten"},"text":{"en":"Star a device","de":"Markiere ein Gerät"}}]}}, + "title":{"en":"Favourites","de":"Favoriten"},"text":{"en":"Star a device","de":"Markiere ein Gerät"},"unavailable":{"en":"Appears with a device","de":"Erscheint mit einem Gerät"}}]}}, {"text":"backend only","pr":181,"breaking":false,"highlight":true, "tour":{"steps":[],"exempt":"Only the backend changed"}}]}]}]}]}`, "installed-manifest.json": `{"version":"v0.9.0","components":{"dashboard":"v0.9.0"}}`, @@ -314,6 +314,9 @@ func TestHighlightsPassesTourThrough(t *testing.T) { if step.Title["de"] != "Favoriten" || step.Text["en"] != "Star a device" { t.Fatalf("texts = %v %v", step.Title, step.Text) } + if step.Unavailable["de"] != "Erscheint mit einem Gerät" { + t.Fatalf("unavailable = %v", step.Unavailable) + } if exempt := entries[1].Tour; exempt == nil || exempt.Exempt != "Only the backend changed" || len(exempt.Steps) != 0 { t.Fatalf("exempt = %+v", exempt) } diff --git a/dashboard/internal/webui/cache-bust-history.csv b/dashboard/internal/webui/cache-bust-history.csv index c53e5d42..0eb2daec 100644 --- a/dashboard/internal/webui/cache-bust-history.csv +++ b/dashboard/internal/webui/cache-bust-history.csv @@ -1,4 +1,7 @@ version,date,asset,v,note +v0.11.23-pre.42,2026-11-30,css/onboarding.css,7, +v0.11.23-pre.42,2026-11-30,js/onboarding-model.js,7, +v0.11.23-pre.42,2026-11-30,js/onboarding.js,10, v0.11.23-pre.41,2026-11-30,js/automations.page.js,34, v0.11.23-pre.41,2026-11-30,js/monitoring-model.js,7, v0.11.23-pre.41,2026-11-30,js/monitoring.page.js,6, diff --git a/dashboard/internal/webui/catalogs/de.json b/dashboard/internal/webui/catalogs/de.json index c79a2666..00dc0fac 100644 --- a/dashboard/internal/webui/catalogs/de.json +++ b/dashboard/internal/webui/catalogs/de.json @@ -4248,7 +4248,7 @@ "onboarding.finish.welcome.title": "Viel Spaß", "onboarding.guest_note.text": "Der Admin muss sich einmal anmelden und die Ersteinrichtung durchgehen. Bis dahin fehlen hier Geräte und Energiewerte.", "onboarding.guest_note.title": "Noch nicht eingerichtet.", - "onboarding.hidden": "Zurzeit nicht sichtbar.", + "onboarding.hidden": "Zurzeit nicht sichtbar", "onboarding.rule_copy": "{name} (Kopie)", "onboarding.setup.admin.sub": "Name und Passwort des ersten Kontos", "onboarding.setup.admin.title": "Admin-Zugang", @@ -4297,7 +4297,7 @@ "onboarding.setup.users.title": "Weitere Benutzer anlegen", "onboarding.toast.setup_skipped": "Einrichtung übersprungen. Offene Punkte findest du in der Checkliste.", "onboarding.toast.tour_ended": "Tour beendet. Du findest sie in der Checkliste.", - "onboarding.unmet.companion": "Noch nicht sichtbar, nur mit gekoppeltem Home Assistant.", + "onboarding.unmet.companion": "Nur mit gekoppeltem Home Assistant.", "onboarding.welcome.w-devices.text": "Alle Geräte mit ihren Werten. Ein Tipp auf ein Gerät öffnet Details und Verlauf.", "onboarding.welcome.w-devices.title": "Geräte", "onboarding.welcome.w-overview.text": "Hier siehst du auf einen Blick, was gerade erzeugt, gespeichert und verbraucht wird.", diff --git a/dashboard/internal/webui/catalogs/en.json b/dashboard/internal/webui/catalogs/en.json index bf5de331..8c264f67 100644 --- a/dashboard/internal/webui/catalogs/en.json +++ b/dashboard/internal/webui/catalogs/en.json @@ -4248,7 +4248,7 @@ "onboarding.finish.welcome.title": "Have fun", "onboarding.guest_note.text": "An admin has to sign in once and go through the initial setup. Until then, devices and energy values are missing here.", "onboarding.guest_note.title": "Not set up yet.", - "onboarding.hidden": "Not visible right now.", + "onboarding.hidden": "Not visible right now", "onboarding.rule_copy": "{name} (copy)", "onboarding.setup.admin.sub": "Name and password of the first account", "onboarding.setup.admin.title": "Admin account", @@ -4297,7 +4297,7 @@ "onboarding.setup.users.title": "Add more users", "onboarding.toast.setup_skipped": "Setup skipped. You find open items in the checklist.", "onboarding.toast.tour_ended": "Tour ended. You find it in the checklist.", - "onboarding.unmet.companion": "Not visible yet, only with a paired Home Assistant.", + "onboarding.unmet.companion": "Only with a paired Home Assistant.", "onboarding.welcome.w-devices.text": "All devices with their values. A tap on a device opens details and history.", "onboarding.welcome.w-devices.title": "Devices", "onboarding.welcome.w-overview.text": "Here you see at a glance what is being generated, stored and used right now.", diff --git a/dashboard/internal/webui/static/css/onboarding.css b/dashboard/internal/webui/static/css/onboarding.css index 57766861..00a97e17 100644 --- a/dashboard/internal/webui/static/css/onboarding.css +++ b/dashboard/internal/webui/static/css/onboarding.css @@ -166,6 +166,10 @@ .ob-bar-state { display: flex; align-items: center; gap: .45rem; margin: .25rem 0 0; font-size: .88rem; } .ob-bar-state--done { color: var(--ok); font-weight: 600; } .ob-bar-state--lost { flex-wrap: wrap; color: var(--text-muted); } +.ob-bar-state--hidden { align-items: flex-start; color: var(--text-muted); } +.ob-bar-state-icon { flex: none; width: 1em; height: 1em; margin-top: .15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } +.ob-bar-state-copy { display: grid; gap: .1rem; } +.ob-bar-state-head { font-weight: 600; } /* Sprachwahl in der Vorstellung: die Pille aus der Masthead (base.css), nur mit Beschriftung darueber. */ .ob-lang { display: grid; gap: .3rem; margin-top: .35rem; } diff --git a/dashboard/internal/webui/static/js/onboarding-model.js b/dashboard/internal/webui/static/js/onboarding-model.js index 09a3e215..80c8140d 100644 --- a/dashboard/internal/webui/static/js/onboarding-model.js +++ b/dashboard/internal/webui/static/js/onboarding-model.js @@ -123,8 +123,9 @@ const flat = items.flatMap((item) => tourSteps(item, ctx) // Der Schritt zeigt seinen eigenen Titel und Text, nur ohne eigenen faellt er auf das Highlight zurueck. .map((s) => ({ ...s, id: item.id, title: s.title || item.title, check: 'leave', - // Gilt die Bedingung des Schritts nicht, steht der Hinweis dahinter und es gibt kein Ziel. - text: (s.text || item.text) + (s.unmet ? ` ${text(ctx, `onboarding.unmet.${s.when}`, {})}` : '') }))); + // Gilt die Bedingung des Schritts nicht, steht der Hinweis in der Statuszeile (hiddenNote), nicht im Text. + text: s.text || item.text, + hiddenNote: s.unmet ? text(ctx, `onboarding.unmet.${s.when}`, {}) : (s.unavailable || '') }))); const steps = flat.map((s, i) => ({ ...s, eyebrow: text(ctx, 'onboarding.eyebrow.explore', { version: short, i: i + 1, total: flat.length }), diff --git a/dashboard/internal/webui/static/js/onboarding.js b/dashboard/internal/webui/static/js/onboarding.js index ab6f8d0b..d07664ff 100644 --- a/dashboard/internal/webui/static/js/onboarding.js +++ b/dashboard/internal/webui/static/js/onboarding.js @@ -346,6 +346,7 @@ open: Array.isArray(s.open) ? s.open : [], title: localized(s.title, s.title?.en), text: localized(s.text, s.text?.en), + unavailable: s.unavailable ? localized(s.unavailable, s.unavailable.en) : '', literal: true, })), }; @@ -604,6 +605,7 @@ left: false, done: false, lost: false, + hidden: false, direction: 1, drag: null, cleanup: [], @@ -701,6 +703,7 @@ if (!step) return; this.done = this.s.mode !== 'explore' && this.s.mode !== 'welcome' && this.s.stateOf(step.id) === 'done' && this.s.mode !== 'change'; this.lost = false; + this.hidden = false; this.revealedAgain = false; // Neuer Schritt: Blatt wieder aufziehen, damit der Text zu lesen ist. // Verdeckt es danach das Ziel, klappt avoid() es erneut ein. @@ -715,6 +718,7 @@ if (step !== this.step) return; this.target = null; this.spot.hide(); + this.hidden = Boolean(step.unmet); return; } this.spot.hold(); @@ -741,21 +745,14 @@ // nicht zu sehen ist. So geht nichts verloren und die Tour springt nicht von selbst. if (step.literal) { this.target = null; - if (step.baseText === undefined) { - step.baseText = step.text; - this.s.steps[this.s.index].text = `${step.text} ${t('onboarding.hidden')}`; - } + this.hidden = true; + this.watchTarget(step); return; } // Ziel fehlt (anderer Dienst, Recht, Layout): Schritt ueberspringen. if (!this.last) this.s.index += 1; else this.s.finish(); return; } - // Das Ziel ist wieder da: der Hinweis auf das fehlende Ziel entfaellt. - if (step.baseText !== undefined) { - this.s.steps[this.s.index].text = step.baseText; - delete step.baseText; - } this.target = el; // Leerer Bereich: Leertext statt Erklärung, erst jetzt sind die Karten da. const empty = typeof step.emptyWhen === 'function' && step.emptyWhen(); @@ -892,6 +889,16 @@ }, back() { if (this.s.index > 0) this.s.index -= 1; }, again() { this.lost = false; this.show(); }, + // Fehlt das Ziel eines Neuerungs-Schritts, sieht die Tour jede Sekunde nach + // und zeigt den Schritt neu, sobald es da ist. Schrittwechsel beendet das. + watchTarget(step) { + const timer = setInterval(() => { + if (step !== this.step) return clearInterval(timer); + const el = resolveTarget(step.target, this.actions?.scope); + if (el && window.obSpotlight.visibleRect(el)) { clearInterval(timer); this.show(); } + }, 1000); + this.cleanup.push(() => clearInterval(timer)); + }, checklist() { const mode = this.s.mode === 'setup' || this.s.mode === 'change' || this.s.finished?.mode === 'setup' ? 'setup' : 'explore'; this.s.checklistMode = this.s.isAdmin ? mode : 'explore'; diff --git a/dashboard/internal/webui/templates/base.html b/dashboard/internal/webui/templates/base.html index 0215b70c..2c55dff9 100644 --- a/dashboard/internal/webui/templates/base.html +++ b/dashboard/internal/webui/templates/base.html @@ -73,7 +73,7 @@ - + @@ -345,10 +345,10 @@