Skip to content

refactor(ui): port Agents settings to Solid - #168759

Merged
steipete merged 14 commits into
mainfrom
solid2/w-pg-3c3
Oct 11, 2026
Merged

steipete merged 14 commits into
mainfrom
solid2/w-pg-3c3

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Agents settings pages still rendered through Lit while shared Control UI surfaces moved to Solid 2.

User Impact

Agents settings keep the existing navigation, editing, permission gates, and visual layout while rendering through Solid 2. No migration or configuration change is required.

Why This Change Was Made

Port Agents and Memory rendering to Solid 2 and register the existing tags through defineSolidBridge. Keep synchronous request, draft, selection, and permission owners in TypeScript. Preserve routes, CSS classes, selectors, and retained preview/diary DOM. Only explicit selection intent changes browser history.

Use shared Solid icons, settings, and refresh status. Keep the original route module only as a stateless Lit template for the shell. The picker also clears a detached popover target synchronously, preventing pending Web Awesome updates from looking up an ID on a detached section.

The existing subscription and bridge modules own the temporary controller and Lit-content adapters; no Lit page class or duplicate tag implementation remains. Shared Memory types live in a leaf module, without an import cycle. The latest main merge also removes the duplicate dialog attribute declaration and extra lazy-view type coupling.

Adopt main’s complete MCP fixture correction (7158f2b1df01). This PR no longer changes that fixture; its existing inline-transparent and dashboard-color assertions pass with the canonical provider.

The table-dialog tests now wait for main's deferred focus restoration. All focus assertions remain; the same two failures reproduced on the CI baseline and the three-line timing adjustment passes there.

Evidence

Check Result
Prior-head CI 38114625008 All 3 UI unit shards, all 7 selected E2E shards, lint, architecture, source contracts, i18n, and performance pass. Two type jobs fail only on the inherited Gateway CLI fixture described below.
Agents view 22 passed; 29.46 s local wall time after interop consolidation.
Memory owner/bridge 18 passed, 1 existing Chromium-only skip; 18.16 s local wall time.
Memory view / Agents lifecycle / GitHub tools browser 19 / 30 / 35 passed; 60.63 / 40.61 / 23.63 s local wall time.
Table focus regression Old merge base: 12 passed. CI baseline: the same 2 failures. CI baseline plus timing adjustment: 12 passed in 25.08 s.
Migration guards Lit ratchet, max-lines ratchet, typed focused lint, and i18n verification pass; no guard exceptions added.
Independent review Full port and subsequent changes reviewed with no actionable P0–P2 findings.
Testbox One attempt did not admit a runner during source staging. Stopped without any assigned lease; PR CI supplies heavy proof.
Local visual build Built in 19.78 s. Its size audit reports an absolute startup warning (285 B over the older limit); CI's comparison with current main passes. No budget changed.
Visual proof 104 inspected synthetic frames: 13 states × desktop/mobile × light/dark × before/after, embedded below. No material layout regressions.
Emoji picker lifecycle New regression failed on the detached Web Awesome target before the fix and passes afterward, including same-node reconnect (184 ms test body; 116.02 s wrapper under host contention).
Integration repair CI 38124430232 found duplicate LitContent exports after an independent main landing. Merged main and adopted its single canonical adapter; all Agents consumers now use render.
Refreshed-main checks Agents view: 22 passed (10.70 s); bridge: 13 passed (6.81 s); Memory view: 19 passed (4.69 s). Focused typed lint, i18n, and Lit ratchet pass. Full merged-port P0–P2 review has no actionable findings.
Prior-head CI 38128029065 All active E2E shards, production/test types, lint, performance, i18n, and two UI unit shards pass. The other UI shard exposed the stale MCP fixture above and later received a runner shutdown; incomplete coverage is not counted as a pass.
MCP fixture integration Canonical main fixture passes the targeted case, 1 passed / 71 excluded, 24.04 s wrapper. Main owns the correction; no fixture diff remains.
Latest main integration Adopted the landed dialog JSX declaration and lazy registration; retained only the manual attribute used by Agents. Memory confirmation: 5 passed (4.41 s); Memory rendering: 19 passed (24.03 s). Focused boundary lint and i18n pass; merged-port review has no actionable P0–P2 findings.
Local typed-lint limitation Latest wrapper timed out after 300 s preparing plugin declarations, before linting the UI files. This is recorded without a passing local or baseline-attributed claim; final exact-head CI passes type and lint checks.
Final exact-head CI 38132282827 Passed at 1118b8f0460669ea7789a4d875516e4aee2d3b26: selected UI/E2E shards, production/test types, lint, architecture, i18n, performance, and aggregate CI gate.

The prior-head CI type error is TS2353 at src/cli/gateway-cli/run-loop-startup.test-support.ts:380: main passes a removed runtime option. Independent main CI 38115181393 reproduces it in both type jobs. The Gateway CLI tree and relevant compiler inputs are byte-identical between the PR's tested merge and its main parent. Native inherited-failure evidence pins both attempts and their source hashes.

The earlier local CI owner-selection test hit two 120-second shared-host timeouts. That local result remains recorded; it is not claimed as a pass or an attributed baseline failure. The exact-head CI routing and selected suites provide the current integration proof. No local Docker, whole test suite, or typecheck was run.

Visual proof

Before: 53b8118647525c9e855a6d276ed3eef5dfef9464 with synthetic fixtures in source mode. After: f6a0f0b3c4a5ca8d36722340454a60d260aedd7f from the built UI, using the same scenes and desktop/mobile light/dark profiles. The before image predates independently landed shared UI changes, including the GitHub identity port. Refreshed-main source captures hit cold-navigation tooling failures; the complete historical before captures are retained.

All sheets were inspected for parity and sensitive content. Data is synthetic. Mobile Cron frames show upper context rather than all job controls. The later picker lifecycle fix and canonical-adapter integration do not change the captured layout. All 13 images were verified to load in the PR browser.

The sheets show before/after pairs for all four profiles:

Production LOC

Agents: 7,255 → 7,795 (+540, 7.4%). Existing interop owners and sanitized Markdown rendering add 100 shared lines; the picker lifecycle fix adds 9 lines outside Agents. Remaining growth is explicit JSX/reactive bindings and retained preview/diary components; the old page implementations and draft adapter modules are deleted.

Agents Channels Ready — before and after, desktop/mobile, light/dark

Agents Cron Ready — before and after, desktop/mobile, light/dark

Agents Files Edit — before and after, desktop/mobile, light/dark

Agents Files Error — before and after, desktop/mobile, light/dark

Agents Files Preview — before and after, desktop/mobile, light/dark

Agents Files Saved — before and after, desktop/mobile, light/dark

Agents Memory Diary — before and after, desktop/mobile, light/dark

Agents Memory Ready — before and after, desktop/mobile, light/dark

Agents Overview Ready — before and after, desktop/mobile, light/dark

Agents Skills Empty — before and after, desktop/mobile, light/dark

Agents Skills Ready — before and after, desktop/mobile, light/dark

Agents Tools Loading — before and after, desktop/mobile, light/dark

Agents Tools Ready — before and after, desktop/mobile, light/dark

# Conflicts:
#	ui/src/components/solid/settings-ui.tsx
#	ui/src/pages/agents/panels-skills.browser.test.ts
#	ui/src/pages/agents/panels-tools-skills.browser.test.ts
@clawsweeper

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

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR ports Agents and Memory settings rendering from Lit to Solid while retaining synchronous state and Gateway mutation owners.

Example: Edit AGENTS.md under Settings > Agents > main > Files.

  • Before: Lit renders the editor, preview, and save controls.
  • After: Solid renders those controls using the existing file-editing owner.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong visual evidence supports the migration, but the repeated locale defect and removed reset assertion prevent approval.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Prepared before/after screenshots exercise the built Control UI's migrated Channels, Automations, and Files rendering with synthetic fixtures across desktop/mobile light/dark profiles; inspected layouts are consistent, and the later fixture and adapter changes do not invalidate that visual evidence.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Agents settings remain on the older renderer during the Control UI's directed Solid migration.
Reason: The recorded migration direction supports this focused surface conversion, and retaining the existing domain owners limits behavioral churn.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep open: this useful, maintainer-directed migration still has the previously reported locale regression and lost model-picker reset assertion.

Priority: P2
Reviewed head: f6a8b50105a4b9a2711838e3669dd96dc9e3b20c

Before merge

  • Subscribe the Agents header to locale changes (P2) - Changing locale while Agents remains mounted leaves its title and subtitle in the previous language. Both route helpers use imperative t from i18n/index.ts, so these JSX expressions acquire no locale dependency; replacing OpenClawLightDomElement also removes its I18nController refresh. Use the existing reactive translation projection for both labels and cover a locale change without remounting. This repeats the unresolved prior finding.
  • Retain the model-picker reset assertion on agent switches (P2) - The migrated test removes the assertion that switching from alpha to beta replaces the primary model picker. Its remaining selected-label assertion can pass while a reused picker retains open/search state from the previous agent, the distinct lifecycle contract repaired in fix(ui): stabilize agent model selection on switch #72328. The production keyed boundary remains present, but losing it would now escape this regression test. Restore the reset assertion, consistent with the Solid migration policy to preserve assertions when replacing a harness. This repeats the unresolved prior finding.
  • Complete next step - Resolve the GitHub-reported merge conflicts while preserving the Solid cutover and current main's changes.
  • Explain or restore the original intent of Live locale refresh - deb7faf: Shared Lit bases subscribe to locale changes so mounted pages refresh without remounting.

Findings

  • [P2] Subscribe the Agents header to locale changes — ui/src/pages/agents/view.tsx:101-103
  • [P2] Retain the model-picker reset assertion on agent switches — ui/src/pages/agents/view.test.tsx:343-347

Provenance

  • Live locale refresh changes intended behavior without addressing why it exists (deb7faf: Shared Lit bases subscribe to locale changes so mounted pages refresh without remounting.)

Tests

  • Missing end-to-end proof: Retain the agent-switch reset assertion and cover a locale change while the Agents header remains mounted; neither scenario is established by the inspected screenshots.
Agent review details

How this fits together

The Control UI receives agent selections, configuration, and Gateway snapshots, renders settings panels, and dispatches edits through existing capability owners.

flowchart LR
  A[Settings navigation] --> B[Solid bridge]
  B --> C[Agents and Memory state owners]
  C --> D[Reactive projections]
  D --> E[Solid settings panels]
  E --> F[Existing capability operations]
  F --> G[Gateway]
Loading

Technical review

Best possible solution:

Complete the Solid cutover while preserving live locale updates, agent-switch control resets, and existing mutation ownership.

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

Source establishes that changing locale while Agents stays mounted cannot invalidate its imperative header translations; no runtime reproduction was run under the read-only review.

Is this the best way to solve the issue?

The migration appropriately retains synchronous domain owners and canonical interop adapters, but must preserve the locale subscription and reset coverage it replaces.

Full review comments:

  • [P2] Subscribe the Agents header to locale changes — ui/src/pages/agents/view.tsx:101-103
    Changing locale while Agents remains mounted leaves its title and subtitle in the previous language. Both route helpers use imperative t from i18n/index.ts, so these JSX expressions acquire no locale dependency; replacing OpenClawLightDomElement also removes its I18nController refresh. Use the existing reactive translation projection for both labels and cover a locale change without remounting. This repeats the unresolved prior finding.
    Confidence: 0.99
  • [P2] Retain the model-picker reset assertion on agent switches — ui/src/pages/agents/view.test.tsx:343-347
    The migrated test removes the assertion that switching from alpha to beta replaces the primary model picker. Its remaining selected-label assertion can pass while a reused picker retains open/search state from the previous agent, the distinct lifecycle contract repaired in fix(ui): stabilize agent model selection on switch #72328. The production keyed boundary remains present, but losing it would now escape this regression test. Restore the reset assertion, consistent with the Solid migration policy to preserve assertions when replacing a harness. This repeats the unresolved prior finding.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Synchronous Agents and Memory state ownership keeps the original intent (926afb6: Unify authoritative request lifecycles and preserve selected-agent scope, stale-response rejection, privacy, and capability gating.)
  • Model-picker reset on agent changes keeps the original intent (3cb4608: Remount Overview controls to clear stale dropdown state when switching agents.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/pages/agents/view.test.tsx --maxWorkers=1
  • pnpm test ui/src/pages/agents/agents-page.selection.test.ts --maxWorkers=1
  • pnpm ui:i18n:verify
  • git diff --check

What I checked:

PR surface

Source +686, Tests +347, Other +6. Total +1039 across 78 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 46 5802 5116 +686
Tests 29 1140 793 +347
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 11 5 +6
Total 78 6953 5914 +1039

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This planned UI migration has a limited locale-refresh regression and a focused regression-coverage repair, without evidence of urgent widespread breakage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-11T02:45:27.323Z sha e6a845b :: needs changes before merge. :: [P2] Subscribe the Agents header to locale changes | [P2] Restore coverage for model-picker reset on agent switches
  • reviewed 2026-10-11T03:10:01.970Z sha a1e05c7 :: needs changes before merge. :: [P2] Subscribe the Agents header to locale changes | [P2] Retain coverage for model-picker reset on agent switches
  • reviewed 2026-10-11T03:55:18.081Z sha d095372 :: needs changes before merge. :: [P2] Subscribe the Agents header to locale changes | [P2] Retain the model-picker reset assertion on agent switches | [P2] Make the new adapters comply with the Lit migration gate | [P2] Create the dirty draft before exercising read-only permissions
  • reviewed 2026-10-11T04:36:08.765Z sha f3d95ef :: needs changes before merge. :: [P2] Subscribe the Agents header to locale changes | [P2] Retain the model-picker reset assertion on agent switches
  • reviewed 2026-10-11T05:31:30.223Z sha f6a0f0b :: needs changes before merge. :: [P2] Subscribe the Agents header to locale changes | [P2] Retain the model-picker reset assertion on agent switches
  • reviewed 2026-10-11T08:28:35.016Z sha 9a8c257 :: needs changes before merge. :: [P2] Subscribe the Agents header to locale changes | [P2] Retain the model-picker reset assertion on agent switches
  • reviewed 2026-10-11T09:17:28.576Z sha 9a8c257 :: needs changes before merge. :: [P2] Subscribe the Agents header to locale changes | [P2] Retain the model-picker reset assertion on agent switches
  • reviewed 2026-10-11T09:42:42.661Z sha 565efdb :: needs changes before merge. :: [P2] Subscribe the Agents header to locale changes | [P2] Retain the model-picker reset assertion on agent switches

Reviewed October 11, 2026, 6:10 AM ET / 10:10 UTC (Revision 11).

@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 11, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 11, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Oct 11, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 11, 2026
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 19, 2026
First-parent upstream 069a5b8..75df19c (17 commits, including
openclaw#169043 entry lifecycle queries, openclaw#169034, openclaw#169058 memory index facts,
openclaw#168950, openclaw#169019 telegram queued history replies, openclaw#168790/openclaw#168756/
openclaw#168759/openclaw#168739 Solid UI ports, openclaw#168813 codex metadata/startup
lifecycles, openclaw#168981, openclaw#168992 agent preparation SQLite work).

Only conflict: worker-access inventory, regenerated (631 files, 2436
calls). Auto-merged files carrying our overlay, reviewed: snapshot.ts
(upstream's block-reply reconcile reads through index-1; our per-part
continuation-marker strip in extractAssistantStreamSnapshot unchanged),
codex side-question.ts (upstream's request-scoped client lease; our
disableContinuationTools and the extracted dynamic-tool-call helper
unaffected), subagent-registry-restore.ts, session-sharing-store.native.ts.

Refs #1475

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL 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