refactor(ui): frame chat flow cards with coss-ui Frame headers (CODE-381) - #256
Merged
Conversation
Greptile SummaryThis PR moves core chat-flow cards to the shared coss-ui Frame pattern. The main changes are:
Confidence Score: 5/5This looks safe to merge. The terminal cleanup now removes only trailing newline characters. Meaningful trailing spaces remain visible. No blocking issues were found in the updated code.
What T-Rex did
Important Files Changed
Reviews (5): Last reviewed commit: "chore(lint): clear sukka 8.14 warnings o..." | Re-trigger Greptile |
Zerlight
force-pushed
the
ruocheng/code-381
branch
from
July 22, 2026 17:49
c5ba9db to
f4f3b9b
Compare
Member
Author
AprilNEA
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Closes CODE-381.
Chat-flow cards (code block, terminal, file/tool previews, edited-files rollup) hand-rolled their header chrome as
Card+CardHeaderwithbg-muted/border-boverrides. This converts them to the coss-ui Frame pattern — a borderless muted tray (Frame) with the card's upper part in the tray header (FrameHeader) and content in the inset panel (FramePanel) — via new shared chat-density slots inchat/chat-card.tsx(ChatCardHeader/ChatCardTitle/ChatCardActions/ChatCardPanel, density overrides only).Converted surfaces:
CodeBlock,ArtifactFrame(+FenceFallback),Terminal+TerminalBlock,FilePreviewCard(DiffBlockfollows),ToolPreviewCard,TurnDiffSummary. Showcase-only cards (test-results, schema-display, artifact, web-preview, package-info, queue, step, commit, stack-trace) are deliberately left onCardchrome until they're wired.Design refinements from review:
commandprop onTerminalBlock/RuntimeTerminalBlock.TerminalBlockno longer double-renders a header, the ANSI surface is clipped to the panel radius (was square-cornered and theme-mismatched in dark mode), and trailing PTY/stdout newlines no longer render as blank panel space (regression test added).The chrome contract test (
card-radius.test.tsx) now asserts theframeslot with a<header>row per card.Verification
pnpm check:ciandpnpm test(1772) pass on the rebased branch.dev:mockconversation showcase headless (playwright-core + Chrome): code fence, file read/write cards, diff card, search card, artifact frames (mermaid/svg/html), execute terminals, and the PTY terminal block all render the borderless tray + inset panel, with the expected header fonts and copy buttons; mutation receipt renders as prose under the diff.TurnDiffSummarydoesn't render in the mock (its stream never completes a turn with edits), so its rows are covered by unit tests plus live review over HMR against a real session.Checklist
pnpm check:ciandpnpm testboth pass (pluscargo fmt/clippy/testfor Rust changes)WIRE_PROTOCOL_VERSIONis bumped — no wire changes