feat(settings): globales Settings-Autosave (kein Speichern-Button) - #179
Merged
Merged
Conversation
…h + script wiring
…) + secret-clear UI
…-op guard Add settings_autosave_templates.test.js: verifies all three themes (aurora/default/pro) have autosave scripts before settings.js and no migrated save buttons remain (btn-ip2location-save excluded — intentionally kept as action button). Add no-op guard in observability.js PUT /ip2location: reads old key before write; only logs and writes when value actually changed; empty-without-clear returns ok immediately (no write, no log). 66/66 settings tests pass.
…rts/route-block) + i18n + guard
- smtpValues() now returns all 6 bound fields (smtp-host/port/user/from/tls/password)
instead of only 2; post-save password-clear removed to avoid snapshot/value mismatch
- Alerts valuesById expanded to include backup-days, cpu, ram, and 4 event-group
checkboxes (added ids alerts-events-{security,peers,routes,system} to all 3 templates)
- rbValues() adds settings-route-block-body so body changes trigger autosave
- missingValueKeys() helper added to Core + exported; bind() logs console.warn on
mismatch (non-fatal dev guard that would have caught Critical #1)
- 'Password is set' hint replaced with i18n key settings.smtp.password_set (en+de)
- Dead saveSecuritySettings() function removed (zero callers)
- Unit test for missingValueKeys + smoke assertions for expanded valuesById keys
…k, local pihole override in smoke, update stale aurora button assertions
…ttings-autosave # Conflicts: # src/i18n/de.json # src/i18n/en.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Globales Settings-Autosave
Alle Wert-Felder in den Einstellungen speichern jetzt automatisch (kein Speichern-Button) mit einem ~0,5-s-Unschärfe-Indikator je Sektion. Aktions-Buttons bleiben Buttons. Community-Tier, funktioniert in allen drei Themes (aurora/default/pro).
Architektur
public/js/settingsAutosaveCore.js— reine, node-testbare UMD-Logik: Cluster-Klassifizierung (independent/atomic/fullPayload), Dirty-Check, Secret-Omit, Confirm-Entscheidung, Atomic-Readiness mit Laufzeit-Override, geteiltecreateQueue()-Serialisierung, plusmissingValueKeys()-Invarianten-Guard.public/js/settingsAutosave.js— DOM-Controller:bind({cluster, fields, save, statusEl, valuesById, requiredForCommit?})+enqueue(cluster, fn). Bindetchange(diskret) bzw.blur+Enter (Text, per-Element 400 ms debounced), Dirty-Check gegen einen beimsave()eingefrorenen Snapshot, serialisiert pro Cluster, Erfolg =.field-saving-Blur am dedizierten Badge.public/js/settings.js— alle Settings-Sektionen Cluster für Cluster migriert; Save-Buttons entfernt, dedizierte.autosave-status-Badges ergänzt.clear-Flag; SMTPclear_password) + ein ip2location-Audit-No-op-Guard. Nur parametrisiertes SQL.Wichtige Korrektheits-Punkte
bind()über alle 8 Lockout+Passwort-Felder; Toggles dispatchen einchange-Event.stripEmptySecrets); explizite „entfernen"-Buttons mit Bestätigung.valuesByIdenthielt zuvor nur die Pflicht-Teilmenge bei SMTP/Alerts/Route-Block).max_attempts ≤ 2; Confirm-Abbruch rollt nur das Trigger-Feld zurück.Tests
settings_autosave_core(reine Logik inkl. Queue + Guard),settings_autosave_smoke(Markup/Serving + Race),settings_secret_handling(Secret-Schutz + Clear),settings_autosave_templates(3-Themes, Skript-Reihenfolge, keine Save-Buttons mehr). Alle grün (68/68 in der Settings-Suite).Bewusst verschoben (Minors)
default-theme-Flash-Timing (Reload überholt 0,5-s-Badge), verwaiste
#*-message-Container, Feedback an den Secret-Clear-Buttons, fire-and-forget bei split-tunnel-enqueue.Hinweise
pihole_license/pihole_scope(Env-Fehler, auch auf master rot).🤖 Generated with Claude Code
https://claude.ai/code/session_01Jrun6RoK7g75W5L8ZEpBzh