Skip to content

refactor(ui): derive settings save presentation from status - #174117

Merged
steipete merged 1 commit into
mainfrom
solid2/w-idiom-components-save-indicator
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-idiom-components-save-indicator

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The settings save indicator still copies save-status transitions into a separate visibility flag from an effect.

User Impact

No user-visible change. The indicator shows “Saved” for two seconds after saving, keeps that window across unrelated shell refreshes, and cancels its timer when removed.

Why This Change Was Made

Derive the save presentation directly from status with a writable signal. Only a saving → saved transition enters the timed state; the timer expires that state. This removes the owned-write escape hatch and the effect's copied-state writes. The remaining effect owns a real external timer and its cleanup.

Initial saved status stays quiet. Error, recovery, conflict, manual-save, and apply actions retain their existing rendering and callbacks. No CSS, markup, tag, route, dependency, or lazy-boundary changes; no visual design change requiring screenshots.

Evidence

Proof Result
Codemod dry-run No diagnostics or unresolved markers
Save-indicator tests, one worker 9/9 passed, including initial saved status, two-second expiry, unrelated refresh, and disconnect cleanup
UI typecheck Passed
Targeted lint, format, git diff --check Passed
Production Knip Passed
Isolated review Scoped-clean through P2; no actionable findings
Startup build/performance CI comparison; imports and lazy boundaries unchanged

No local build or E2E suite was run because this changes no boot/startup code; PR CI is the broad proof runner.

Touched production metric Before After
LOC 186 180
Controller-pattern references 0 0
createEffect 1 1
createRenderEffect 0 0
untrack 0 0
addEventListener 0 0
DOM queries 0 0
Hand-built class strings 0 0
flush 0 0
Owner captures 0 0
ownedWrite 1 0

Production shrinks by six lines; the existing test gains two assertions/input lines. The typecheck initially caught a missing explicit undefined return in timer setup; that was corrected without changing runtime behavior.

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 16, 2026
@steipete
steipete marked this pull request as ready for review October 16, 2026 10:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T10:37:53.394147Z 1142309 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Replace effect-copied save visibility with a writable derivation while preserving the existing two-second Saved indicator.

Example: A settings save completes with pending changes to apply.

  • Before: Saved appears for 2,000 milliseconds, survives unrelated shell refreshes, then becomes Apply changes.
  • After: The same presentation follows a derived save state, with timer cleanup when the indicator disconnects.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch has no identified defect and retains useful component coverage; the supplied validation is harness-level.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; its body reports component-harness validation rather than a shipped browser save-flow demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: The feature-history owner authored this narrow cleanup, which removes an owned-write escape hatch while retaining the designed feedback and callbacks.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a focused, maintainer-directed Solid refactor with no actionable correctness or security findings.

Priority: P3
Reviewed head: 114230959fcd970928b9540ba6e9797c1df58299

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped Control UI save-flow run is supplied for this head; the reported component harness covers the preserved timing and lifecycle contracts.
Agent review details

How this fits together

The Control UI settings sidebar passes configuration status and action callbacks into the save indicator, which renders transient feedback without owning configuration writes.

flowchart LR
  A[Configuration state owner] --> B[Shell view props]
  B --> C[Settings sidebar]
  C --> D[Save indicator derivation]
  D --> E[Footer feedback]
  D --> F[Two second timer]
  F --> D
Loading

Technical review

Best possible solution:

Retain the focused derivation refactor and existing presentation contracts through the normal exact-head CI gate.

Do we have a high-confidence way to reproduce the issue?

This is a behavior-preserving refactor rather than a reported defect; source and existing component tests define its contract, and no target code was executed during this read-only review.

Is this the best way to solve the issue?

The writable derivation follows the repository's Solid guidance, preserves status equality isolation, and leaves the remaining effect responsible for an external timer.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 28f8cab70da1.

Provenance checked

  • Saved visibility, refresh isolation, and timer cleanup keeps the original intent (ed684fc: The Solid migration preserved save feedback and introduced status-memo isolation after reproducing unrelated shell refreshes canceling the Saved timer.)
  • Two-second footer success feedback keeps the original intent (d885f91: Move settings feedback into a stable sidebar footer to avoid layout shifts while retaining brief success feedback and apply actions.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -6, Tests +2. Total -4 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 13 19 -6
Tests 1 2 0 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 15 19 -4

Review metrics

Metric Value Why it matters
Production versus test LOC Production −6 lines; tests +2 lines The refactor removes copied-state machinery and extends an existing observable behavior assertion without adding a test seam.

Labels

Label changes:

  • add P3: This is a small presentation-state cleanup with no intended user-visible behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a small presentation-state cleanup with no intended user-visible behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 16, 2026, 6:50 AM ET / 10:50 UTC.

@steipete
steipete merged commit cc25aa0 into main Oct 16, 2026
151 of 153 checks passed
@steipete
steipete deleted the solid2/w-idiom-components-save-indicator branch October 16, 2026 11:05
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant