Skip to content

refactor(ui): share chat message render contracts - #177668

Merged
steipete merged 1 commit into
mainfrom
solid2/w-deslop-chat-render-contracts
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-deslop-chat-render-contracts

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Chat message, stream and thread renderers repeat the same media and action option declarations; five leaf renderers also repeat ambient JSX tag declarations.

User Impact

No user-visible change. Runtime JavaScript, tags, props and lazy boundaries remain identical.

Why This Change Was Made

Put the shared message-render options in the existing bubble-options owner and derive the stream/thread contracts from it. Keep the five host declarations in the existing Solid element registry. This removes duplicated declarations without another module or runtime abstraction.

The nine changed production files shrink 2,325 → 2,246 lines (−79 overall; −84 chat, +5 shared declarations). No test changes. Lane committed reduction before this PR: 1,009 chat lines; verified merged: 312. The 2,695-line lane target remains open.

Evidence

Proof Result
pnpm tsgo:ui (tsrs) Passed
Existing type contracts, flattened with TypeScript AST All 51 grouped-message, 45 stream and 110 thread properties unchanged
TypeScript emitted JavaScript comparison Identical for every changed source module
pnpm check:madge-import-cycles Zero cycles
Scoped oxlint, oxfmt, git diff --check Passed; existing reactivity warnings in summary-automations only
Independent full-context review Clean; no actionable P0–P2 findings
pnpm deadcode:knip Passed; expanded export scan reports only the two existing diffs config exports
Runtime suites No local test run for erased declarations; broad UI, chat performance/retention and E2E through ci:full

Solid checklist counts: untrack 1 → 1; controllers, effects, render effects, listeners, DOM queries, flush and owner restoration 0 → 0. No build or screenshot capture: emitted runtime code and rendered markup are unchanged, including startup imports.

Fresh scope census at 17c7c4ed05e5d6076a4252b2803212628a6ce246: 134,613 production TS/TSX lines across 624 files, excluding paths containing test/spec/fixture. The same exclusion gives the original denominator 134,715 lines / 623 files. Earlier cached scope counts included three test-support files and are superseded by this measurement.

@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

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-19T19:54:08.575124Z 8a3f9a2 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.

@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: 👀 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 shares chat rendering option types and moves five JSX host declarations into the existing element registry.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused declaration refactor supported by preserved source contracts and passing exact-head type, lint, and UI checks; runtime proof is inapplicable.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR changes only erased declarations and type-only imports; source inspection confirms unchanged runtime statements and markup, so no changed runtime scenario requires contributor proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The supplied maintainer-authored classification establishes direction, and the implementation reduces contract duplication without altering behavior or adding an abstraction module.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it removes duplicated type declarations through existing owners without changing runtime behavior, and no actionable defects were found.

Priority: P3
Reviewed head: 8a3f9a22f3ccfddb8adf67da4a4b97a4baec928e

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI transcript projections supply message data and callbacks to grouped-message, streaming, and thread renderers; these declarations describe their inputs without adding runtime processing.

flowchart TD
  A[Transcript projection] --> B[Thread renderer]
  A --> C[Streaming renderer]
  A --> D[Grouped message renderer]
  E[Shared message option types] -.-> B
  E -.-> C
  E -.-> D
  F[Shared JSX declarations] -.-> B
Loading

Technical review

Best possible solution:

Retain this focused consolidation in the existing option and JSX declaration owners.

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

No runtime bug is claimed; the duplicated declarations are directly visible in the base and current-main source.

Is this the best way to solve the issue?

The change uses existing owners, preserves caller-specific differences, and removes the replaced declarations without introducing runtime machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Grouped-message, stream, and thread option contracts keeps the original intent (refactor(ui): migrate chat transcript rows to Solid 2 #168887: The Solid transcript migration preserved existing rendering inputs and lifetimes; later widget, media, reply, and native-permission work extended those inputs.)
  • Ambient JSX host declarations keeps the original intent (refactor(ui): migrate chat leaf elements to Solid #168762: The leaf migration retained host tags and typed their attributes; subsequent migrations preserved those declarations, while the shared registry provides renderer-independent ambient contracts.)

Security

None.

Evidence

What I checked:

PR surface

Source -79. Total -79 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 9 46 125 -79
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 9 46 125 -79

Labels

Label changes:

  • add P3: This is declaration cleanup with no intended user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 declaration cleanup with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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, 4:07 PM ET / 20:07 UTC.

@steipete
steipete merged commit db1bb8c into main Oct 19, 2026
107 of 108 checks passed
@steipete
steipete deleted the solid2/w-deslop-chat-render-contracts branch October 19, 2026 20:24
@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
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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