Skip to content

refactor(ui): consume preferences from their existing owner - #180684

Merged
steipete merged 2 commits into
mainfrom
solid2/w-design-config-preference-owner
Oct 22, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-design-config-preference-owner

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem and solution

Config kept a mutable copy of UI preferences alongside the application theme owner. Custom-theme cancellation also passed whole settings snapshots into its owner to compare one timestamp.

Read current preferences from ApplicationTheme.settings and give the import owner only its gateway scope and import timestamp. Preference readers accept UiPreferences; writes continue through the existing settings owner. Late import callbacks read the live theme selection.

The main integration preserves the landed media owner for discovery, permission requests, device observation, and retirement. It keeps canonical preference reads and does not restore the removed import-owner connect API. Routes, rendering, persistence, and lazy boundaries are unchanged.

Ownership and size

Measured against the merged main parent dadde4125438:

Metric Before After
Config page LOC 947 950
Theme-import owner LOC 163 155
All touched production LOC 1,813 1,809
Test fixture LOC 252 254
Theme-import owner import sources 4 3
Theme-import owner public methods 9 7

Production fan-in is unchanged: Config 2, import owner 1, preference-state 13, and preference-reconcile 4. Config keeps 45 static import sources. No new module or Solid primitive is introduced. The Solid refactor census is unchanged: one effect; zero rendering controllers, render effects, untrack, direct listeners, DOM queries, flush, owner APIs, component cleanup hooks, actions, optimistic stores, or lazy loaders in the touched production files.

Proof

Check Result
UI typecheck on integrated tree Passed (tsrs)
Targeted lint and formatting Passed
Config page on integrated tree 35 passed
Profile preferences 13 passed; unchanged owner and test inputs
Custom-theme imports 11 passed; unchanged owner and test inputs
Independent integration autoreview through P2 Scoped clean
CI performance against base Passed: startup JS 317,154 B gzip; CSS 41,043 B gzip in one request. Chat boot −13 B; New Session boot −9 B; CSS unchanged
Final production Knip Two baseline unused heartbeat files; no new findings
Fresh exact-head full UI CI Run 39802693963 passed, including 3 UI unit, 9 UI E2E, and 2 real-Gateway shards

The import cases cover replacement, clear, stale completion, errors and retry, navigation, Gateway replacement, config mutation, and selection changes while a request is pending. Config tests also cover media permission upgrades, superseded camera selections, and leaving the page while hardware work is pending.

Production Knip reports only src/infra/heartbeat-active-hours.ts and src/infra/heartbeat-wake-policy.ts, both reproduced on untouched main fe2aa4a6c44. The prior CI attempt belongs to the superseded head. This head includes main's Twitch assertion repair; the fresh full CI run passed. There is no rendered visual change, so screenshot proof does not apply.

@clawsweeper

clawsweeper Bot commented Oct 22, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-22T15:16:27.191843Z 230172d New commits
ℹ️ 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.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@steipete
steipete enabled auto-merge (squash) October 22, 2026 14:25
@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 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes Settings read current application preferences and consolidates custom-theme import synchronization.

Example: A delayed custom-theme import finishes after the user selects the built-in knot theme.

  • Before: The import callback reads the page’s settings copy to preserve knot.
  • After: The callback reads the application theme owner’s current settings to preserve knot.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-consistent; supporting proof is test-based, and the extension typecheck diagnostic remains unavailable.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; supplied evidence reports focused page and import tests, with no new shipped-entry-point demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No user-visible defect is claimed; duplicated preference snapshots increase Settings maintenance burden.
Reason: The maintainer-authored direction matches the repository’s single-owner policy and preserves existing user behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored refactor removes redundant preference ownership, and source review found no actionable patch defect.

Priority: P3
Reviewed head: 601ae8c080def15e3867cb577e155aec05c34ebb

Before merge

None.

Findings

None.

Agent review details

How this fits together

Settings presents browser and profile preferences; existing preference writers persist changes, the application theme owner publishes current values, and the import owner rejects retired completions.

flowchart TD
  A[Settings controls] --> B[Preference writers]
  B --> C[Scoped preference storage]
  C --> D[Application theme owner]
  D --> E[Settings presentation]
  D --> F[Theme import owner]
  F --> B
Loading

Technical review

Best possible solution:

Retain this focused read-through refactor and the existing preference writers and import cancellation owner.

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

This PR claims an internal refactor rather than a reproduced user bug; source confirms the redundant snapshot and synchronous owner contract.

Is this the best way to solve the issue?

The change uses existing owners, removes the replaced coordination methods, and preserves write contracts without adding modules or parallel state.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3cd9bddb36d9.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit d585c0c adds ui/src/pages/config/custom-theme-import-owner.ts:206 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d585c0c1ec49; files: ui/src/pages/config/custom-theme-import-owner.ts)
  • Shakker: Raw commit 55e1246 adds ui/src/app/server-prefs-state.ts:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 55e1246702c7; files: ui/src/app/server-prefs-state.ts)

PR surface

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

View PR surface stats
Area Files Added Removed Net
Source 4 60 64 -4
Tests 1 3 1 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 63 65 -2

Labels

Label changes:

  • add P3: This is a focused ownership 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 focused ownership 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 22, 2026, 10:35 AM ET / 14:35 UTC.

@steipete
steipete disabled auto-merge October 22, 2026 14:58
@steipete
steipete merged commit 719d29e into main Oct 22, 2026
106 of 110 checks passed
@steipete
steipete deleted the solid2/w-design-config-preference-owner branch October 22, 2026 15:39
@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: S 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