Repository navigation
Closed
Labels
Milestone
Description
Follow-up to the YAML config editor (#95), approved in the brainstorming session (2026-11-04). Builds on the "clear stale feedback on edit" fix; visually lands with the status-bar + Problems panel issue.
Problem
Validation requires an explicit Test click. Users learn too late that their edit broke the config.
Proposed solution
Debounced live validation on edit — deliberately not a fixed 2-second poll (polling wastes requests on an idle editor and lags behind the last change):
- On
docChanged, schedule validation 800 ms after the last change (debounce resets on further typing), and only when the document differs from the last validated text. - Reuse the existing dispatch machinery: the debounce timer fires
runToolbarAction("test", ...), so the in-flight dedupe (inFlightActionsRef) and the stale-seq guards already prevent duplicate requests and superseded results landing. - The explicit Test button cancels any pending timer and validates immediately (current behavior preserved).
- Transient "validating…" state while a cycle is in flight; never blocks Apply/Save — they still run their own full server-side validation as today.
- Skip auto-validation while the compliance gate or the Save As dialog is parked behind the editor, to avoid confusing motion behind a modal.
- No backend change:
POST /api/config/validateis stateless and cheap (ConfigReader.from_content).
Acceptance criteria
- After the user stops typing for ~800 ms, validity feedback updates automatically.
- Rapid typing coalesces into one validation request.
- Undo/redo/revert/new template load trigger a revalidation cycle.
- Test button still forces immediate validation.
Tests
ConfigEditorModal.test.tsxwith fake timers:- debounce fires exactly once 800 ms after the last change;
- additional typing resets the timer;
- an in-flight request is not doubled (dedupe guard);
- a superseded result is dropped (stale-seq, already covered — add the timer path).
Activity
Merge pull request #108 from falbany/fix/editor-clear-and-live-valida…
fix(Web): repair ConfigEditorModal.test.tsx merge corruption, rebuild…