Skip to content

refactor(ui): remove unused chat leaf element adapters - #177582

Merged
steipete merged 3 commits into
mainfrom
solid2/w-deslop-chat-leaf-hosts
Oct 19, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/w-deslop-chat-leaf-hosts

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Three chat components still maintain native custom-element adapters even though every production caller already renders them through Solid.

User Impact

No user-visible change. The versions menu, PDF preview, and learned-skill notice keep their host tags, DOM, styling, and lazy imports.

Why This Change Was Made

Let each existing Solid component render its own host. Remove the unused native property/default registrations and their ambient property declarations. Keep the PDF's cancellation and object URL ownership with its component, and leave menu/popover ownership with the existing primitives.

All production callers were audited across the repository. The removed adapters' imperative completion API was used only by tests; those tests now wait for the same rendered behavior using waitForSolid.

Evidence

Check Result
pnpm tsgo:ui Passed (tsrs)
chat-pdf-preview.test.ts 9 passed, including reconnect and ticket replacement
chat-pane-versions-menu.test.ts 2 passed
chat-pane-versions-menu.browser.test.ts 1 passed in Chromium, including retained-header overlay retirement
Targeted lint, formatting, diff check Passed
pnpm deadcode:knip Passed
Independent Codex autoreview and simplify pass No actionable findings

The two unit files used the pinned Bun runtime; the browser file used Node/Playwright. The coupled header browser suite is left to ci:full, which also runs chat performance and retention coverage. No local broad suite or E2E run.

No visual, CSS, startup import, dependency, or lazy-boundary changes; no screenshots or startup rebuild needed. Refactor-checklist effects, render effects, untrack, listeners, queries, flush, and owner captures are all 0→0 in the three changed components.

Production LOC Before After Change
Three chat components 487 435 −52
Coupled ambient types 220 214 −6
Total touched production 707 649 −58
Tests — — +21

The lane has 258 verified merged chat lines removed and 904 committed across its focused PRs. The original campaign denominator remains 134,715 lines (2% = 2,695); fresh main at 60f7650683f7 measures 134,598 production TS/TSX lines in 624 files. The target is not yet met.

CI repair

The original head failed the WebKit test sidebar agent menu scrolling > reveals the selected agent on click while preserving hover focus in run 39302568153. The test opened via synthetic trigger.click() then sent browser-native Escape. The installed Vitest provider dispatches keyboard events through page.keyboard and skips iframe focusing when the iframe already has a non-body active element, so the test's local focus assertion did not establish native keyboard focus.

Use await page.elementLocator(trigger).click() to establish real pointer/focus before Escape. Every assertion remains. The repaired single WebKit test passes locally; tsrs and targeted lint/format pass; independent review is clean. The original run has no keyboard trace, so this repairs the input-boundary mismatch without claiming a proven flake elimination. The replacement CI head supplies broad proof. Auto-merge was explicitly retired before pushing the repair; native replacement recovery will be used.

Replacement CI reported a null picker lookup in the route-selected-model test. The exact test passed on both base and head locally, so this is not claimed as inherited. The domain test now awaits the picker module before its interaction deadline; all assertions and timeouts remain unchanged, and first-open lazy loading remains covered by the picker suite. The single route-selection test passes with this fixture change; CI remains the broader proof.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 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 19, 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-19T18:29:20.323774Z 374d1e0 PR opened
ℹ️ 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 enabled auto-merge (squash) October 19, 2026 18:35
@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 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR lets three existing Solid chat components render their own host elements and removes their unused native adapters.

Example: Open brief.pdf in the chat Files pane.

  • Before: The Solid PDF component renders through a registered native-element adapter.
  • After: The Solid component renders the same host and PDF reader directly.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported simplification with no identified defect; demonstrated coverage is harness-based and required CI is not yet clear.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; supplied evidence exercises PDF lifecycle and retained-header overlays through tests, without a claimed live application run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No visible defect is claimed; unused adapters duplicate property transport and lifecycle scaffolding around existing Solid components.
Reason: The maintainer-directed cleanup removes an unused path while preserving production callers, rendering, lazy imports, and established lifecycle responsibilities.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed cleanup removes unused adapters without an identified regression; a required UI check remains failed with its cause unclassified.

Priority: P3
Reviewed head: 374d1e0d83e40dd18d22c9b0a6f563b7003cb286

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI passes branch data, attachment metadata, and learned-skill notices into chat leaf components, which render menus, PDF readers, and skill actions through existing owners.

flowchart TD
  A[Chat presentation owners] --> B[Solid leaf components]
  B --> C[Existing host elements]
  C --> D[Menu and Popover primitives]
  C --> E[Bounded PDF reader]
  C --> F[Skill actions through Gateway]
Loading

Technical review

Best possible solution:

Retain the direct Solid components and existing lifecycle owners, with the unused adapters removed.

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

This is a behavior-preserving refactor rather than a bug report; source inspection confirms that production callers already use the Solid exports.

Is this the best way to solve the issue?

The change follows the smallest complete approach: remove unused transport machinery, keep the existing renderers and host tags, and adapt coupled tests without adding another owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Versions menu native adapter keeps the original intent (1e34f75: The menu used a Solid bridge while surrounding chat rendering still had Lit callers; subsequent migrations moved its production caller to Solid.)
  • PDF preview native adapter keeps the original intent (a423f19: The media migration preserved registered hosts and existing lifecycle contracts; this PR retains the host, cancellation, bounded reads, and reader retention while removing unused native transport.)
  • Learned-skill notice native adapter keeps the original intent (4fddb19: The leaf migration supported remaining Lit callers through a shared bridge; the current production caller renders the exported Solid component directly.)
  • Coupled tests and ambient declarations keeps the original intent (refactor(ui): render the chat sidebar region with Solid #169394: Migration-era declarations and completion waits supported native bridge hosts; the PR removes obsolete property types and preserves assertions through observable Solid settlement.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -58, Tests +21. Total -37 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 100 158 -58
Tests 4 54 33 +21
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 154 191 -37

Review metrics

Metric Value Why it matters
Production versus test LOC Production −58; tests +21 The reduction removes adapter machinery; test growth replaces imperative completion waits while retaining behavioral assertions.

Labels

Label changes:

  • add P3: This is a focused internal 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 internal 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 19, 2026, 2:42 PM ET / 18:42 UTC.

@steipete
steipete disabled auto-merge October 19, 2026 19:05
@steipete
steipete merged commit d51e182 into main Oct 19, 2026
87 checks passed
@steipete
steipete deleted the solid2/w-deslop-chat-leaf-hosts branch October 19, 2026 20:16
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Oct 19, 2026
* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (#177614)
  fix(release): tag restart plugin cohorts consistently (#177725)
  refactor(ui): inline single-caller detail requests (#177705)
  chore(i18n): refresh native locales (#177721)
  refactor(codex): drop unread private runtime reports (#177689)
  refactor(ui): consolidate static artwork registries (#177692)
  refactor(ui): derive settings schema analysis in the view (#177624)
  refactor(media): consolidate capability defaults and compression grids (#177665)
  refactor(auth): bind OAuth managers to native provider operations (#177676)
  refactor(ui): remove redundant component rendering layers (#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082)
  fix(agents): report failed secret input prompt delivery (#177688)
  refactor(ui): share chat message render contracts (#177668)
  fix(ui): settle model status after overlapping publication (#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (#177670)
  refactor(runtime): rely on canonical async lifecycle owners (#177635)
  refactor: fold private operation helpers into their callers (#177655)
  refactor(ui): remove unused chat leaf element adapters (#177582)
  perf(talk): use published authority for foreign voice writes (#177533)
  ...
vincentkoc added a commit that referenced this pull request Oct 19, 2026
#167350)

* fix(pr): retain the admitted workflow across maintainer commands

* fix: refresh the reviewed correction baseline

Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163

* fix(pr): preserve cold workflow admission and repository identity

* chore(pr): integrate canonical main CI repair

* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (#177614)
  fix(release): tag restart plugin cohorts consistently (#177725)
  refactor(ui): inline single-caller detail requests (#177705)
  chore(i18n): refresh native locales (#177721)
  refactor(codex): drop unread private runtime reports (#177689)
  refactor(ui): consolidate static artwork registries (#177692)
  refactor(ui): derive settings schema analysis in the view (#177624)
  refactor(media): consolidate capability defaults and compression grids (#177665)
  refactor(auth): bind OAuth managers to native provider operations (#177676)
  refactor(ui): remove redundant component rendering layers (#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082)
  fix(agents): report failed secret input prompt delivery (#177688)
  refactor(ui): share chat message render contracts (#177668)
  fix(ui): settle model status after overlapping publication (#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (#177670)
  refactor(runtime): rely on canonical async lifecycle owners (#177635)
  refactor: fold private operation helpers into their callers (#177655)
  refactor(ui): remove unused chat leaf element adapters (#177582)
  perf(talk): use published authority for foreign voice writes (#177533)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
* refactor: let chat leaf components own their host tags

* test(ui): activate the sidebar frame before keyboard dismissal

* test(ui): load picker code before draft selection assertions
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
openclaw#167350)

* fix(pr): retain the admitted workflow across maintainer commands

* fix: refresh the reviewed correction baseline

Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163

* fix(pr): preserve cold workflow admission and repository identity

* chore(pr): integrate canonical main CI repair

* commit '4f8617589b6c71d754171052b603fe534901bfa1': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (openclaw#177614)
  fix(release): tag restart plugin cohorts consistently (openclaw#177725)
  refactor(ui): inline single-caller detail requests (openclaw#177705)
  chore(i18n): refresh native locales (openclaw#177721)
  refactor(codex): drop unread private runtime reports (openclaw#177689)
  refactor(ui): consolidate static artwork registries (openclaw#177692)
  refactor(ui): derive settings schema analysis in the view (openclaw#177624)
  refactor(media): consolidate capability defaults and compression grids (openclaw#177665)
  refactor(auth): bind OAuth managers to native provider operations (openclaw#177676)
  refactor(ui): remove redundant component rendering layers (openclaw#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (openclaw#166082)
  fix(agents): report failed secret input prompt delivery (openclaw#177688)
  refactor(ui): share chat message render contracts (openclaw#177668)
  fix(ui): settle model status after overlapping publication (openclaw#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (openclaw#177670)
  refactor(runtime): rely on canonical async lifecycle owners (openclaw#177635)
  refactor: fold private operation helpers into their callers (openclaw#177655)
  refactor(ui): remove unused chat leaf element adapters (openclaw#177582)
  perf(talk): use published authority for foreign voice writes (openclaw#177533)
  ...

Co-authored-by: Vincent Koc <[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 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: M 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