Repository navigation
feat(app): rebuild chat surfaces with shadcn primitives - #2387
Merged
Merged
Conversation
Co-authored-by: Codex <codex@delicious233.com>
Replace the bespoke composer and message chrome with vendored shadcn primitives (InputGroup, Message, Bubble, Attachment) whose colors and radii resolve from the existing theme tokens. The transcript runtime, Hub protocol and reducer stay untouched; only the presentation layer changes. - Composer collapses into one InputGroup card; reply, quote, edit, mention, attachment and upload rows become block-start addons. - UserMessage and AgentGroup render through Message/Bubble; tool cards, rail, header and inspector drop glass and heavy shadows. - Inspector auto-collapses at 768px so the conversation column keeps a readable width. - Deletes about 1.1k lines of dead composer CSS instead of layering more. Co-authored-by: Codex <codex@delicious233.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…accent The chat row rewrite left a second .user-row-right alignment rule, which stylelint rejects. The dark --primary-foreground contrast fix also has to reach the RN token mirror that asserts equality with themes.css. Co-authored-by: Codex <codex@delicious233.com>
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.
What
The chat surface is rebuilt on vendored shadcn primitives. The transcript runtime, Hub/Edge protocol, reducer and virtualised block model are untouched: this PR only replaces how the existing state is drawn.
UnifiedComposercollapses into a singleInputGroupcard. Reply, quote, edit, mention, mainchain, attachment and upload rows become block-start addons instead of stacked bars above the box.UserMessagerenders throughMessage+Bubble;AgentGroupreuses the same primitives.AgentHubWorkbench.module.cssalone loses ~1.1k lines) rather than layering a second system on top.Why not assistant-ui
Checked
@assistant-ui/react@0.15.29(MIT, React 18/19, ~2.9 MB unpacked / 1302 files, hard deps onzustand,radix-ui,@assistant-ui/core,assistant-cloud,assistant-stream).It is not adopted as a layer, because:
ThreadMessageLikecontent parts) is narrower than ourTranscriptBlockunion (27 kinds, includingrun_step_group,agent_timeline,route_decision,context_usage,compact_boundary,replay_gap,checkpoint,deploy). Mapping those ontodataparts would create a second transcript SSOT.Its elements (for example the props-driven
ApprovalCard, which needs no runtime or provider) stay a real option for a later isolated experiment, but replacing our approval card - which carries risk tiers, critical confirm and A/R shortcuts plus tests - is not worth it now.Component acceptance (5 dimensions)
<form>; textarea keepsaria-label,aria-expanded,aria-controls; mention listbox keeps its role andaria-activedescendant; message rows keeprole="log"container and stabledata-block-id.shadcn.csstokens mapped from the existing palette; brand blue unchanged; light and dark verified by capture.Verification
tsc -bfor shared / workbench / web: clean.node scripts/verify/verify-doc-ssot.py: pass;git diff --check: clean.visual:qa:chatcapture re-run after the final diff, screenshots kept in gitignoredapp/web/.tmp/visual/{before,after,states}(1440x810 light+dark, 768x900, plus composer empty / multiline / mention / approval / attachment in both themes), contract asserts code block, tool card and goal banner present,overflow=false.Not run