Skip to content

refactor(ui): port chat metadata rendering to Solid - #171827

Merged
steipete merged 25 commits into
mainfrom
solid2/w-final-chat-b-metadata-pinned
Oct 15, 2026
Merged

steipete merged 25 commits into
mainfrom
solid2/w-final-chat-b-metadata-pinned

Conversation

@steipete

@steipete steipete commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Move chat comment previews, question summaries, pull-request rows, and GitHub publication controls to Solid as part of the Control UI migration.

User Impact

The existing comment admission, question delivery/reopening, publication actions, full owner/repo#number references, and retained CI disclosures keep their behavior. Explicitly dismissing Details clears disclosure intent; temporarily parking it preserves that intent.

Why This Change Was Made

Solid now owns these rendering consumers while the existing domain owners remain authoritative. Native Solid callers use the PR component directly; unused Lit publication, PR-rendering, and attachment-admission paths are removed. Thin adapters remain for active legacy callers. The growth is primarily JSX expansion and these remaining adapters; no second state owner is introduced.

The earlier bundle comparison exposed a real lazy-loading regression through the shared compiler decorator helper. Main now owns the neutral decorator-runtime chunk, and this PR adopts that production configuration byte-for-byte. Regression coverage retains both the class-decorator route-isolation test and the stronger field-decorator/shared-stylesheet test.

Release-note context: Control UI chat metadata rendering moves to Solid while preserving question, comment, and GitHub publication behavior.

Evidence

Current candidate: 65195c7c71217449a8b1b206dbd9981ed3237ba6, after an ordinary merge of actual main 9f4b34b842b3375b3e182e1836fc5114ab69c0ce. The source repository's remote-tracking ref was explicitly refreshed before merging. The sole manual conflict was ui/src/types/solid-elements.d.ts: main's exported ElementProperties, native dock element contracts, catalog tags and systems-page cleanup remain intact alongside this port's typed chat CI properties and tags. The lead inspected the complete resolution.

The four automatically merged test files were also inspected against current main. Secret-leak assertions and scroll thresholds are unchanged; the prior diagnostic labels remain. The question-summary test retains its content assertions under waitForSolid. No additional runtime behavior was introduced by this integration.

Proof Result
Independent Codex review, P0–P2 Current main-relative candidate scoped-clean; final captured-source verification passed. The lead independently inspected the declaration resolution and all four automatic test overlaps. Unchanged dependency implementations and historical test results were not treated as current-head validation.
UI typecheck pnpm tsgo:ui passed once on the final integrated source.
Formatting / whitespace Resolved declaration formatting passed in 19 ms; staged declaration whitespace check passed. The ordinary merge commit completed without bypassing hooks.
Current production Knip Failed with exactly three unused files: src/shared/safe-record.ts, ui/src/components/dropdown-menu-controller.ts, and ui/src/components/web-awesome-popover.ts. All three files, the Knip configuration and their discovered references match incorporated main byte-for-byte. Neither tree has a production caller; the metadata port retires none. No new ignores or unnecessary full baseline rerun were added.
Retained focused behavior checks The predecessor's annotation browser suite passed 18/18 once with --maxWorkers=1; earlier unchanged-input chunking 6/6 and text-chip admission 7/7 passed. No local E2E battery or redundant rerun was added for the type-only merge.
Exact-head full CI observation Run 38819457897 for 65195c7c71217449a8b1b206dbd9981ed3237ba6 returned completed/success: 45 successful jobs and 24 skips, including successful security and CI gates. Octopool explicitly marked the run view stale and the job list cached, so this is a recorded completed-run snapshot, not a live admission check. The native workflow must revalidate live state before landing.
Historical CI Exact predecessor 2d8185acd3c290302ac470611a0580791cf1a90c, run 38798317675, failed only the update-run restart-report case and its downstream gate. Its matching scheduled-main failure was attributed for that predecessor only. Earlier failed/cancelled runs remain historical; none is relabeled green or used to grant the replacement head an exception.
Retrospective codemod audit After implementation drafting, dry-ran original baseline 72422c4007bff81a5d0b55b56e8439d7f83892e3 and traced the metadata lane's 7 Lit files / 68 markers to the port. Every marker has an explicit disposition. This is retrospective review, not evidence that the required dry-run preceded conversion.
Retained build / strict performance Corrected predecessor build and strict same-host comparison passed with no violations or warnings. The current integration changes only type declarations manually; production renderers and the lazy route boundary are preserved.
Retained route-boundary inspection Chat no longer includes the New Session bundle. Source-map comparison adds only the seven migrated chat renderers; no new New Session or pet modules.
Retained visual proof Inspected synthetic 1440×960 PR Details captures are byte-identical, including a long full repository reference. The type-only integration introduces no visual change.
Retained asset metric Base Measured port (731236)
Startup JS gzip 351,155 B 351,236 B (+81 B)
Startup JS requests 8 8
Startup CSS gzip / requests 45,983 B / 1 45,983 B / 1
Chat boot JS gzip / requests 1,693,399 B / 30 1,695,384 B / 31
Chat boot CSS gzip / requests 137,268 B / 8 137,268 B / 8
New Session boot JS gzip / requests 1,383,686 B / 28 1,384,590 B / 29

The retained measured build stayed below the 374,285 B / one-CSS-request budget. The small extra route request is the 300 B gzip decorator runtime. The rejected intermediate bundle had added 106,904 B to chat; that result is not the final candidate.

Current diff against incorporated main 9f4b34b: 34 logical files / 35 physical paths. Production: 2,660 → 2,878 lines (+218); tests/support: 5,781 → 5,959 (+178). Counts include full changed-file contents and count renames once.

The local screenshot harness initially failed before producing images because a Node-only transform helper leaked into a serialized browser callback. The corrected harness uses the canonical route-readiness predicate and exact session URL; its single final paired capture passed. This was a tooling failure, not a product failure.

Before: synthetic full pull-request references in Details

After: Solid chat metadata with the same full references

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

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-15T22:51:54.086860Z 65195c7 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa328ad310

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +248 to +249
<Show when={effect().headCommit}>{(commit) => <code>{commit()}</code>}</Show>
<Show when={effect().url}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add separators between publication effect fields

When a publication receipt includes effect.headCommit or effect.url, these adjacent Solid children render without the whitespace previously supplied by the Lit template, producing text such as unknown.<sha>View GitHub effect. Add explicit spaces between the status text, commit, and link.

Useful? React with 👍 / 👎.

Comment on lines +361 to +363
{props.publication.options?.personal === null
? t("githubPublication.unidentified")
: null}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Separate the combined no-account messages

When both shared credentials and a personal profile are unavailable, the two adjacent expressions are concatenated into a single run such as ...optional.Sign in...; the old Lit template inserted collapsible whitespace. Add an explicit separator before the personal-profile message.

Useful? React with 👍 / 👎.

AttachmentItem,
ImageRenderOptions,
} from "./chat-message-media.ts";
import { SentCommentAttachments, type SentCommentSource } from "./chat-sent-comments.tsx";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Regenerate the boot manifest for the TSX cutover

This new boot-path import was added without regenerating ui/config/control-ui-boot-modules.json: the checked-in capture still lists the deleted chat-message-attachment-admission.ts and omits the newly loaded TSX renderers. Because the chunking configuration consumes this generated capture to classify /chat boot modules, regenerate it and verify the UI build as required for material boot-path changes.

AGENTS.md reference: ui/AGENTS.md:L69-L70

Useful? React with 👍 / 👎.

Integrate current main while retaining the Solid metadata renderers. Carry forward reconnect-aware question labels, message-scoped comment admission, and compact pull-request layout coverage.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22ee27342d

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{(label) => (
<div class="chat-question-summary__delivery">
<span>{label()}</span>
<Show

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Separate the retry action from its delivery label

When a failed or unconfirmed async answer exposes presentation.retry, the adjacent <span> and <Show> render without whitespace or a layout gap, so the summary displays text such as FailedRetry. Add an explicit separator or style this container with a gap.

Useful? React with 👍 / 👎.

}
${this.sources.map((source, index) => (this.comments[index] === null ? source.fallback : nothing))}`;
}
return solidContent(SentCommentAttachments, { comments, options, resolve });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the retained Lit and bridge round trip

The only production caller of this facade is the already-Solid chat-message-attachments-solid.tsx, which passes this solidContent result through LitContent; SentCommentAttachments then creates a defineSolidBridge host and another Solid root. Every sent-comment group therefore retains a Solid→Lit→Solid→bridge chain even though no legacy caller needs it. Render the Solid component directly and retire the facade and bridge while preserving the host tag if selectors require it.

AGENTS.md reference: AGENTS.md:L52-L53

Useful? React with 👍 / 👎.

Integrate current main while preserving the reviewed Solid metadata port.
Exercise live speed changes and select workspace clipboard actions by their menu role.
Report only the matched category and a visible-text boolean in four
real-Gateway capture guards. Preserve their textContent predicates and
forbidden values so hidden private text still blocks screenshots.
Keep main's strengthened live-preference assertions and wait for the
shared confirmation modal before switching gateways in packaged Workboard
proof. Preserve the reviewed chat metadata port and capture diagnostics.
Keep innerText for the separate rendered-text diagnostic while preserving
the original textContent capture guard. Scope each lint exception to its
one intentional read.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3d17703dc

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

: nothing
}
</div>`;
return solidContent(AsyncQuestionSummary, { questions, presentation });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the remaining Solid-to-Lit-to-Solid facade

The only production consumer of this facade is the Solid chat-message-bubble-view.tsx, which passes the result into LitContent; every rendered async-question summary therefore creates a Solid→Lit→nested-Solid ownership chain instead of using AsyncQuestionSummary directly. Complete the cutover at that caller and remove this facade/re-export path; the same retained-wrapper pattern should also be removed from the newly ported question-summary and selection-annotation paths.

AGENTS.md reference: AGENTS.md:L52-L53

Useful? React with 👍 / 👎.

@steipete
steipete merged commit a5832a9 into main Oct 15, 2026
108 of 109 checks passed
@steipete
steipete deleted the solid2/w-final-chat-b-metadata-pinned branch October 15, 2026 23:38
@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 16, 2026
* refactor(ui): port chat metadata renderers to Solid

* fix(ui): preserve chat metadata contracts in Solid

* test(ui): await committed chat summaries

* test(ui): identify private capture guard matches

Report only the matched category and a visible-text boolean in four
real-Gateway capture guards. Preserve their textContent predicates and
forbidden values so hidden private text still blocks screenshots.

* test(ui): explain visible capture diagnostic reads

Keep innerText for the separate rendered-text diagnostic while preserving
the original textContent capture guard. Scope each lint exception to its
one intentional read.

* test(ui): expect full pull request references

* fix(ui): keep decorator helpers outside lazy routes

* test(ui): fix chat metadata CI fixtures
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. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant