Repository navigation
refactor(ui): derive config draft state from its scope - #174118
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces effect-driven config draft resets with writable derivations and captures collection inputs through refs. Example: Enter "x" in the names collection draft, then receive an unchanged empty-array snapshot.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: it provides a focused Solid refactor, and review found no actionable correctness or security defects. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherSettings and plugin forms pass schema, source identity, and values into local draft editors, which validate edits and submit candidates to the existing synchronous mutation owner. flowchart LR
A[Settings and plugin forms] --> B[Schema field renderers]
B --> C[Draft scope memo]
C --> D[Local writable draft]
D --> E[Validation and native controls]
E --> F[Synchronous mutation owner]
F --> A
Technical reviewBest possible solution: Retain this focused refactor while preserving the existing draft lifetime and synchronous mutation contracts. Do we have a high-confidence way to reproduce the issue? This PR claims a behavior-preserving refactor rather than a bug fix; source inspection traced the existing lifetime contracts, and no target code was executed. Is this the best way to solve the issue? The change follows the documented Solid primitives, removes superseded synchronization, and preserves the existing validation and mutation boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fd1511568e81. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -9, Tests +120. Total +111 across 3 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 6:53 AM ET / 10:53 UTC. |
|
Merged via squash.
|
What Problem This Solves
Config form drafts still reset local fields by copying reactive inputs from effects. Collection drafts also query their own DOM whenever focus or validation changes.
User Impact
No behavior or visual design change. Invalid partial values and rejected commits stay editable across unchanged inputs and autosave acknowledgements. A changed source or field identity resets the local draft; native focus and validity keep their existing behavior.
Why This Change Was Made
Use a writable derived signal for structured edits and a writable derived store for collection fields. Their scope memos preserve the existing identity/equality rules, including unchanged absent sources and equal JSON clones. Ref callbacks own the collection inputs. The one remaining effect synchronizes native validity and focus; the one deliberate untracked read snapshots the initial structured value for its identity.
Config mutation and rejection remain synchronous in the existing domain owner. This removes two copying effects, one redundant snapshot, two DOM queries, and nine production lines. No CSS, markup, tag, route, dependency, or lazy import boundary changes.
Evidence
The initial collection assertion was corrected to account for the existing rejected automatic-default attempt before opening the editor; the collection cases were rerun after fixing that fixture setup and its parameter rows. No broad local suite, E2E battery, or startup build was run for this state-only refactor. Full UI CI is selected with
ci:full.createEffectcreateRenderEffectuntrackaddEventListenerflushThe focused test file adds 120 lines and uses the real config renderers; no test-only production API was added.