Skip to content

refactor(ui): inline custom theme import defaults - #173992

Merged
steipete merged 2 commits into
mainfrom
solid2/w-idiom-pages-theme-import-state
Oct 16, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-idiom-pages-theme-import-state

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Settings migration removed the last external caller of the custom theme initial-state constant. #173991 already removed its unused export; this follow-up removes the single-use private constant left behind.

Related: #173811.

User Impact

No user-visible change: custom theme import keeps the same five initial values and existing import, cancellation, and configuration ownership.

Why This Change Was Made

Initialize the existing owner's private state directly with its existing explicit type. No replacement export, ignore, or new abstraction is introduced.

Production LOC in the single touched file: 162 → 160 (-2). Controller-pattern references, createEffect, untrack, and addEventListener: 0 → 0 each. No tests or runtime policies changed.

Evidence

Check Result
UI typecheck Passed on original reviewed head; unchanged owner source reused after conflict repair
Focused type-aware lint and formatting Passed; unchanged owner source reused
Independent isolated review No actionable findings; resolved owner byte-identical to reviewed source
Production export Knip, one run before main integration Target theme export finding absent; four unrelated baseline exports remained (exit 1)
Files/dependencies Knip Passed before main integration
Diff whitespace and remaining-symbol search Passed; removed symbol has no remaining UI reference
Replacement-head PR CI Run 38873501463 passed on d8b8c12

The earlier production Knip baseline at 18cd3088f476b1ca5ee0572d1141325c44b38b36 reproduced five unused exports. The four unrelated findings had identical declaration-file blobs and references on the original branch base c255ea021083a7343ac50d15988240294ad29867. The candidate run reported those four findings: autoReviewParameters, prepareCommandLaneClear, createCommandPaletteLoading, and ChatPageView. This historical result is not a claim that current main still has those findings; #173991 subsequently removed the unused exports, including the theme export.

The real conflict with main was only #173991's de-export. Resolution removes its remaining private constant and preserves the reviewed owner file byte-for-byte. Prior local proof and review are reused for that unchanged source; the new merge commit passed its own normal PR CI run (38873501463). The original reviewed head also passed run 38870597647.

Normal PR CI selection is sufficient for this private initializer cleanup. No rendering, stylesheet, route, startup import, or lazy boundary changed, so no UI build, screenshots, or local E2E run was needed.

Inline the initial values into the existing owner after the Settings migration removed the final external caller. Remove the unused export without changing theme import defaults, cancellation, or configuration authority.
@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.

@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-16T08:26:50.857054Z d8b8c12 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.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR removes an unused theme-state export and initializes the same five values inside the existing owner.

Example: Open Appearance before importing a custom theme.

  • Before: URL is empty, busy is false, message is null, expanded is false, and focusToken is 0.
  • After: The same values come directly from private owner state.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, source-verifiable cleanup with identical values, no findings, and successful exact-head checks.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored private initializer cleanup changes no user behavior; inspected Settings and Plugins screenshots belong to related migrations and are not evidence for this head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: This maintainer-authored cleanup removes unused internal surface after the Settings migration without altering product behavior.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This PR is a useful, behavior-preserving cleanup with no actionable code findings; GitHub now reports a merge conflict.

Priority: P3
Reviewed head: 77895743804a7c4bb3aaae8ce3308c06cabf1fe0

Before merge

  • Complete next step - Resolve the reported conflict with main while preserving the private initializer and unchanged defaults.

Findings

None.

Agent review details

How this fits together

The Appearance page sends import actions to CustomThemeImportOwner, which publishes presentation state and delegates theme loading and settings updates to existing callbacks.

flowchart LR
  A[Appearance page] --> B[CustomThemeImportOwner]
  B --> C[Theme loader]
  C --> B
  B --> D[Settings owner]
  B --> E[Presentation snapshot]
Loading

Technical review

Best possible solution:

Keep the identical defaults private in the existing owner and resolve the reported merge conflict.

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

Source inspection confirms the obsolete export has no external consumers; no runtime defect is claimed or reproduced.

Is this the best way to solve the issue?

Inlining the unchanged values is the smallest complete cleanup and preserves the existing owner, explicit type, and lifecycle.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 32748bce75c8.

Provenance checked

  • Custom theme initial state keeps the original intent (d585c0c: The initializer supported the lifecycle owner and page presentation state introduced to prevent stale imports from replacing newer Appearance choices.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit d585c0c adds ui/src/pages/config/custom-theme-import-owner.ts:41 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)

PR surface

Source -2. Total -2 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 7 9 -2
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 7 9 -2

Labels

Label changes:

  • add P3: This removes unused internal surface without changing user behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This removes unused internal surface without changing user behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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, 4:12 AM ET / 08:12 UTC.

@steipete steipete changed the title refactor(ui): keep custom theme import defaults private refactor(ui): inline custom theme import defaults Oct 16, 2026
@steipete
steipete merged commit 3aa6420 into main Oct 16, 2026
94 checks passed
@steipete
steipete deleted the solid2/w-idiom-pages-theme-import-state branch October 16, 2026 08:48
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
)

Inline the initial values into the existing owner after the Settings migration removed the final external caller. Remove the unused export without changing theme import defaults, cancellation, or configuration authority.
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant