Skip to content

refactor(ui): port identity components to Solid - #168756

Merged
steipete merged 12 commits into
mainfrom
solid2/w-prim-c1
Oct 11, 2026
Merged

steipete merged 12 commits into
mainfrom
solid2/w-prim-c1

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Ports identity rendering to Solid 2 while the Control UI continues to support Lit callers.

User Impact

Agent/channel avatars, person mentions, viewer facepiles, and session-owner chips retain their tags, classes, accessibility labels, fallbacks, and navigation behavior. No settings or dependency changes.

Why This Change Was Made

Each registered identity tag now has one Solid implementation through defineSolidBridge; its Lit class is deleted. Existing image caches, authenticated-route loaders, presence projections, and hovercard controllers retain ownership. Lit callers keep the stateless artwork helpers during migration.

The image binding retains a replacement lease before releasing the previous lease and ignores retired async completions. Channel fallback content stays in one stable outlet so Lit can update its child range while the image is visible. The existing card owner renders portal contents for both sidebar and Solid mentions; small lifecycle adapters serve both frameworks without copying domain state.

Evidence

The previous head's run 38128280980 was interrupted: UI shard 2 received a runner shutdown signal about six minutes into a twenty-minute job, without a failed test result. Its shutdown initiator is unknown. Fail-fast then cancelled core type stripes 2, 3, and 5; those unfinished jobs are not claimed passed. After merging current main, the three identity files from that shard pass locally again. The final current-head run below completed successfully; no inherited-failure exception was used.

Proof Result
Refreshed-main autoreview Completed P0–P2 review; declined one compatibility finding because both internal fallback-property callers migrate together, with no public property contract
Refreshed shared-avatar tests 20 passed; rerun after final main merge
Refreshed Agents-page avatar tests 4 passed; rerun after final main merge
Refreshed plugin avatar mount tests 2 passed; rerun after final main merge
Other focused tests Facepile 19; Solid identity 6; owner chip 5; channel 1; plugin summary 9; sidebar people 148; authenticated routes 13; row/header/channel caller contracts passed
Local UI types pnpm tsgo:ui and all eight pnpm tsgo:test:ui shards passed after final merge
Focused lint / Lit ratchet Passed
Prior exact-head CI Types, lint, ratchets, UI E2E and UI unit shards 1/3 and 3/3 passed; shard 2 was interrupted by runner shutdown
Current-head CI 38132519400 passed on 6ba479de291f3: all three UI shards, UI E2E, production/test types, lint, and enforced CI gate. UI shard 2 took 289s; CI elapsed 526s.

Testbox was attempted once for the resumed cutover; source/admission preparation exceeded the time limit and produced no lease or test result. The earlier baseline lease is completed. No local Docker or whole-repository suite ran.

Size

Changed production files: 3,538 → 3,985 LOC (+447) against main 4db95aa552f7; tests and proof scripts excluded. This remains above the requested no-growth target. The remaining growth comes from typed bridge property/host contracts, native JSX alongside stateless artwork still needed by unported callers, the shared card render/clear entry point, and lifecycle adapters for existing resource owners. Duplicate Lit classes and intermediate wrapper layers were removed. There is no new resource registry or copied domain state.

Screenshots

Inspected synthetic before/after captures at 1180px and 390px, light and dark: generated/emoji/photo/system avatars, viewer sizes and image states, owner/participant/overflow stacks, facepiles, channel fallback/photo, and inline mentions. Browser chrome was cropped before upload. Identity markup and styles were unchanged by the subsequent main refreshes.

Desktop light before and after

Desktop dark before and after

Mobile light before and after

Mobile dark before and after

@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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 replaces Lit identity components with Solid implementations while preserving their custom-element tags and existing resource owners.

Example: Viewing an @ada Lovelace mention at 390px in dark mode.

  • Before: Lit renders the avatar beside the mention text.
  • After: Solid preserves the avatar, text, and alignment in the inspected comparison.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Visual parity evidence supports the migration, but the unresolved authenticated-preview regression blocks merge.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-directed refactor is outside the ordinary contributor proof gate; inspected synthetic browser comparisons support identity-rendering parity but do not establish authenticated Appearance-preview or application hovercard behavior.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: The Control UI migration needs identity components to render through Solid while preserving familiar appearance and interactions.
Reason: The maintainer-directed change follows repository migration policy, removes registered Lit implementations, and retains existing domain owners without new settings or public APIs.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep this PR open: the maintainer-directed Solid migration remains useful, but the previously reported authenticated Appearance-preview regression still blocks merge.

Priority: P2
Reviewed head: 6ba479de291f31cea0474e3ba3941aaeeb511d02

Before merge

  • Restore authenticated resolution for raw avatar URLs (P2) - Appearance settings remain a real caller that supplies an unresolved URL: TabIconSettingsController returns resolveAgentAvatarUrl, and view-tab-icon.ts passes { imageUrl: source, pending: false } to this directive. For /avatar/research on a token-authenticated Gateway, forwarding that input unchanged makes bindIdentityAvatarImage assign the protected route directly to img.src. The browser request lacks its bearer header, receives 401, and the preview falls back instead of displaying the configured image. Restore canonical Gateway URL resolution through the existing loader and cover this Appearance caller while preserving public/data images. This concern was first discovered late in the preceding review; comparison confirms the affected adapter remains unchanged.
  • Explain or restore the original intent of Raw Gateway image normalization - fix: speed up chat opening and cache avatars #138635: Resolve every Gateway avatar through the authenticated loader before DOM source assignment, including raw canonical URLs and reconnects.

Findings

  • [P2] Restore authenticated resolution for raw avatar URLs — ui/src/components/identity-avatar-view.ts:102-106

Provenance

  • Raw Gateway image normalization changes intended behavior without addressing why it exists (fix: speed up chat opening and cache avatars #138635: Resolve every Gateway avatar through the authenticated loader before DOM source assignment, including raw canonical URLs and reconnects.)

Tests

  • Missing end-to-end proof: No raw protected-URL Appearance regression is demonstrated, and the fixture screenshots do not exercise application person-card navigation or keyboard-focus parity on WebKit.
Agent review details

How this fits together

Control UI identity components consume Gateway identity, presence, session attribution, and authenticated images to render avatars, mentions, participant stacks, and person cards.

flowchart TD
 A[Gateway identity and presence] --> B[Existing domain owners]
 B --> C[Reactive projections]
 D[Lit and plugin callers] --> E[Custom element bridge]
 C --> E
 E --> F[Solid identity components]
 F --> G[Avatars mentions and person cards]
Loading

Technical review

Best possible solution:

Complete the Solid cutover while preserving authenticated image resolution for every retained caller through the existing loader.

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

Source establishes the failing path: a token-authenticated Appearance preview forwards /avatar/research to img.src without bearer authentication and reaches a protected route; no runtime execution was performed.

Is this the best way to solve the issue?

The bridge migration follows the documented direction, but the shared image adapter must retain raw Gateway URL normalization to preserve its existing callers.

Full review comments:

  • [P2] Restore authenticated resolution for raw avatar URLs — ui/src/components/identity-avatar-view.ts:102-106
    Appearance settings remain a real caller that supplies an unresolved URL: TabIconSettingsController returns resolveAgentAvatarUrl, and view-tab-icon.ts passes { imageUrl: source, pending: false } to this directive. For /avatar/research on a token-authenticated Gateway, forwarding that input unchanged makes bindIdentityAvatarImage assign the protected route directly to img.src. The browser request lacks its bearer header, receives 401, and the preview falls back instead of displaying the configured image. Restore canonical Gateway URL resolution through the existing loader and cover this Appearance caller while preserving public/data images. This concern was first discovered late in the preceding review; comparison confirms the affected adapter remains unchanged.
    Confidence: 0.98
    Late finding: first raised on code an earlier review cycle already covered.

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 cedb310b3ab1.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/components/identity-avatar-view.test.ts --maxWorkers=1
  • pnpm test ui/src/pages/config/view-tab-icon.browser.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 8479063 adds ui/src/components/identity-avatar-view.ts:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 847906373e97; files: ui/src/components/identity-avatar-view.ts)
  • RoboClaw: Raw commit 6152db4 adds ui/src/components/person-activity-card.ts:12 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6152db46ade8; files: ui/src/components/person-activity-card.ts)
  • Vyctor H. Brzezowski: Raw commit c1258c0 adds ui/src/plugins/control-ui-components.ts:109 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c1258c086482; files: ui/src/plugins/control-ui-components.ts)

PR surface

Source +447, Tests +255. Total +702 across 36 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 25 1559 1112 +447
Tests 11 323 68 +255
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 36 1882 1180 +702

Review metrics

Metric Value Why it matters
Production versus test LOC Production net +447; tests and test support net +255. Typed bridge contracts, shared lifecycle bindings, and retained stateless Lit artwork explain the growth while registered Lit classes are removed.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The migration introduces a limited avatar-preview regression without evidence of an urgent production outage.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • 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 (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-11T03:02:10.504Z sha bd7b76b :: needs changes before merge. :: none
  • reviewed 2026-10-11T04:14:57.062Z sha c6cc620 :: needs changes before merge. :: [P2] Migrate the remaining facepile tests away from Lit method spies | [P2] Update channel-avatar tests for the retained hidden fallback
  • reviewed 2026-10-11T05:50:30.131Z sha 2bc89d7 :: needs changes before merge. :: none
  • reviewed 2026-10-11T06:01:43.773Z sha 2bc89d7 :: needs changes before merge. :: none
  • reviewed 2026-10-11T06:57:19.634Z sha f6f86dd :: needs maintainer review before merge. :: none
  • reviewed 2026-10-11T08:04:00.678Z sha f6f86dd :: needs maintainer review before merge. :: none
  • reviewed 2026-10-11T09:34:07.142Z sha 3b69dac :: needs maintainer review before merge. :: none
  • reviewed 2026-10-11T10:33:08.479Z sha 3b69dac :: needs changes before merge. :: [P2] [P2] Restore authenticated resolution for raw avatar URLs

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

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Oct 11, 2026
@clawsweeper clawsweeper Bot added 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 11, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 11, 2026
@steipete
steipete enabled auto-merge (squash) October 11, 2026 10:44
@steipete
steipete merged commit 57d4e77 into main Oct 11, 2026
89 checks passed
@steipete
steipete deleted the solid2/w-prim-c1 branch October 11, 2026 10:45
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
* refactor(ui): draft Solid identity component port

* refactor(ui): simplify identity rendering and avatar lifetimes

* refactor(ui): activate Solid identity components through the bridge

* refactor(ui): keep the avatar image contract at its binding

* fix(ui): finish identity icon and plugin avatar cutover

* refactor(ui): keep Lit adapters with their rendering owners

* test(ui): assert identity DOM contracts across the bridge
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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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