Repository navigation
feat(chat)!: remove the old chat components - #128
TheGreatAxios merged 6 commits into
Conversation
There is now one way to build chat UI: the Conversation family. Remove ChatThread, ChatComposer, ChatInput, ChatPanel, MessageBubble, ApprovalCard, ToolBlock, ToolNarrative, ReasoningBlock and the modules built only on them, with their stories, tests and browser specs. The part types move into the conversation module unchanged, so their names stay stable. ToolProviderMark takes a tool name instead of a part. README gains "Upgrading from 0.3", which maps every removed export to what replaced it.
|
Superseded by the comment below. |
dc0553b to
044d2ea
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
Automated multi-agent review: independent review + second-agent validation. Independent re-derivation of the headline claim holds: 23 files deleted are exactly the sanctioned cutover set, chat-parts.ts members moved byte-identically and name-stably into src/lib/conversation.ts, and a git-grep of 20 removed symbols across src stories e2e at the PR head finds zero orphan code references. Only doc/hygiene notes below.
- nit
README.md:377— the 0.1 upgrade notes still listui/chat-dock-timingin the internal-modules inventory, which this PR deletes; an 0.1→0.4 upgrader reads an inventory naming a file that no longer exists. Drop the entry or mark it "removed in 0.4". - nit
README.md:379— the historical note "ActivityBlockis renamedReasoningBlock" points upgraders at a component this PR deletes. Same fix class. - file-for-later
src/hooks/use-delayed-autofocus.ts+src/ui/provider-mark.tsx—useDelayedAutofocusandToolProviderMarkare public exports with zero consumers anywhere at the head tree; both are sanctioned by the plan but are now public surface maintained for no in-repo use (anduseDelayedAutofocuswas rewired to drop itschat-dock-timingdependency). Wire them in or cut them in this same breaking window. - file-for-later
.github/workflows/ci.yml:32— the pack-export smoke probe asserts onlyButton,Conversation,Badge; it would not catch a future export break in the new family. Consider asserting the new family's key exports.
|
Triage: In progress Triage is waiting for CI to finish before it decides. This comment shows the verdict once it has. |
5c6401e to
b20074d
Compare
b20074d to
adc5a10
Compare
|
Thanks for the review, and for checking the removal so carefully. Here's what happened to each point. 1. The 0.1 upgrade notes named things this release removes (nits)
2.
3. The CI pack check only looked for three exports (file-for-later)
Commits: |
adc5a10 to
59a7b3f
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Comment
Removes the old chat components and points the public barrel at the conversation types.
Findings
- Commit
chore: note 0.4 removals in the 0.1 notes; widen pack smokeuseschore, whichCONTRIBUTING.mdonly allows aschore(release):.docsmatches a note in the upgrade table.
The removal itself is complete. dep-guard and tsc --noEmit both exit 0, every export * in src/index.ts resolves, and the deleted module names survive only in the 0.1 upgrade note.
The 0.1 upgrade notes still named ui/chat-dock-timing and ReasoningBlock, both deleted in this release. Keep those lines as history, but say they are removed in 0.4 and point ReasoningBlock readers at Reasoning.
The CI consumer smoke only checked Button, Conversation and Badge, so dropping an export * line for most of the chat family from src/index.ts would still pass. Check one component per chat module (Message, Activity, Reasoning, Tool, ToolApproval, ToolGroup, PromptInput, Panel, Attachments, MediaViewer, ConversationThread, ConversationMap) and report every missing name at once.
Nothing in the library, its stories or its known consumers uses either export, and this release already breaks the chat surface. Drop them rather than carry untested API: ProviderMark stays, and a host reads the provider off a tool id itself. The 0.3 upgrade table lists both with what to use instead.
59a7b3f to
31d704f
Compare
|
Addressed in review: the That commit changed both the README upgrade notes and
Only the history changed: the branch tree is identical to the previous head ( |
831f99f to
c5f1b9e
Compare
The consumer smoke claimed one component per chat module but named 13 of the 24 chat UI modules and none of the chat hooks or helpers, so dropping the export * line for GeneratedImages, Sources, MessageActions and others from src/index.ts still passed. It now names one runtime export from each module the chat family puts in the barrel; the types-only lib/conversation.js has none to name. It checks presence rather than typeof function, since a forwardRef component is an object.
ToolProviderMark took an inline props type; no ToolProviderMarkProps was ever exported, so the removed-exports table no longer lists one.
c5f1b9e to
177ed17
Compare
Round 3 fixesA fresh review pass over the stack turned up the points below; each is fixed in a new commit at the end of this branch, and the stack is rebased onto it.
|
177ed17 to
d322e27
Compare
There is now one way to build chat UI: the Conversation family. Remove ChatThread, ChatComposer, ChatInput, ChatPanel, MessageBubble, ApprovalCard, ToolBlock, ToolNarrative, ReasoningBlock and the modules built only on them, with their stories, tests and browser specs. The part types move into the conversation module unchanged, so their names stay stable. ToolProviderMark takes a tool name instead of a part.
README gains "Upgrading from 0.3", which maps every removed export to what replaced it.
Stacked on #127: review only this commit. Part of #94.
Follow-ups (not in this stack)
Size
Over the triage limits (46 files, 3,120 lines), but 2,843 of those lines are deletions: the old chat family with its tests, stories and browser specs. It adds 277 lines, mostly the README's "Upgrading from 0.3" section.
Verification
bun run typecheckandbun run linton its own (the stack is checked commit by commit).bun run check,bun run build,bun run dep-guard,bun run contrast-testandbun run test:e2e(Playwright specs and the Storybook axe sweep in light and dark) pass.Closes #110