Skip to content

feat(chat)!: remove the old chat components - #128

Merged
TheGreatAxios merged 6 commits into
conversation/15-whole-chat-storyfrom
conversation/16-remove-old-chat
Oct 28, 2026
Merged

TheGreatAxios merged 6 commits into
conversation/15-whole-chat-storyfrom
conversation/16-remove-old-chat

Conversation

@pratikbuilds

@pratikbuilds pratikbuilds commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

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)

  • The channels-panel badge measures 4.38:1 on stacked 10% washes (recorded as color-contrast-measured in the known list); fix in that component.
  • DitherCanvas could import the shared BAYER_4 matrix.
  • Share sizing between PromptInputTextarea and the existing Textarea once the old family is gone.

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

  • This commit passes bun run typecheck and bun run lint on its own (the stack is checked commit by commit).
  • At the top of the stack: bun run check, bun run build, bun run dep-guard, bun run contrast-test and bun run test:e2e (Playwright specs and the Storybook axe sweep in light and dark) pass.

Closes #110

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.
@corbits-triage

corbits-triage Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by the comment below.

@TheGreatAxios TheGreatAxios 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.

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 list ui/chat-dock-timing in 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 "ActivityBlock is renamed ReasoningBlock" 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 — useDelayedAutofocus and ToolProviderMark are 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 (and useDelayedAutofocus was rewired to drop its chat-dock-timing dependency). 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 only Button, Conversation, Badge; it would not catch a future export break in the new family. Consider asserting the new family's key exports.

@corbits-triage

corbits-triage Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Triage: In progress

Triage is waiting for CI to finish before it decides. This comment shows the verdict once it has.

@pratikbuilds
pratikbuilds force-pushed the conversation/16-remove-old-chat branch from b20074d to adc5a10 Compare October 27, 2026 13:54
@pratikbuilds

pratikbuilds commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

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)

  • The fix: the ui/chat-dock-timing and ReasoningBlock lines stay as history, now marked "removed in 0.4". ReasoningBlock points to Reasoning.

2. useDelayedAutofocus and ToolProviderMark have no users (file-for-later)

  • The fix: both are removed in this breaking release. Nothing in the library, its stories or the apps that use it calls them. ProviderMark stays. The 0.3 upgrade table lists both, with what to use instead.

3. The CI pack check only looked for three exports (file-for-later)

Commits: chore: note 0.4 removals in the 0.1 notes; widen pack smoke, feat!: remove useDelayedAutofocus and ToolProviderMark

@pratikbuilds
pratikbuilds force-pushed the conversation/16-remove-old-chat branch from adc5a10 to 59a7b3f Compare October 27, 2026 14:13

@TheGreatAxios TheGreatAxios 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.

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 smoke uses chore, which CONTRIBUTING.md only allows as chore(release):. docs matches 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.
@pratikbuilds
pratikbuilds force-pushed the conversation/16-remove-old-chat branch from 59a7b3f to 31d704f Compare October 28, 2026 08:25
@pratikbuilds

Copy link
Copy Markdown
Collaborator Author

Addressed in review: the chore: commit is gone.

That commit changed both the README upgrade notes and .github/workflows/ci.yml, so I split it rather than relabel the CI change as docs:

  • 513a981 docs: note 0.4 removals in the 0.1 upgrade notes
  • 7bd2fdd ci: check one component per chat module in the pack smoke

Only the history changed: the branch tree is identical to the previous head (59a7b3f). #129 is rebased onto the new head, and its tree is also unchanged.

@pratikbuilds
pratikbuilds force-pushed the conversation/16-remove-old-chat branch 2 times, most recently from 831f99f to c5f1b9e Compare October 28, 2026 11:28
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.
@pratikbuilds
pratikbuilds force-pushed the conversation/16-remove-old-chat branch from c5f1b9e to 177ed17 Compare October 28, 2026 14:47
@pratikbuilds

Copy link
Copy Markdown
Collaborator Author

Round 3 fixes

A 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.

  • edafb9d: The pack smoke said it checked one export per chat module but covered 13 of 24. It now names one runtime export from each of the 39 modules the series adds (the types-only lib/conversation.js is noted) and checks presence rather than typeof === "function", since a forwardRef component is an object.
  • 177ed17: The upgrade table listed ToolProviderMarkProps, which never existed; it is removed.

bun run check and dep-guard pass on every branch of the stack, and the full e2e suite passes at the top of the stack (163/163, including the stories axe sweep). Each behaviour fix comes with a test that fails without it; the forwardRef tests can only guard, since the suite runs on React 19.

@TheGreatAxios
TheGreatAxios added this pull request to stack #130 October 28, 2026 21:28
@TheGreatAxios
TheGreatAxios removed this pull request from stack #130 October 28, 2026 21:38
@TheGreatAxios
TheGreatAxios added this pull request to stack #139 October 28, 2026 21:38
@TheGreatAxios
TheGreatAxios force-pushed the conversation/16-remove-old-chat branch from 177ed17 to d322e27 Compare October 28, 2026 21:42
@TheGreatAxios
TheGreatAxios merged commit 3ca1f27 into main Oct 28, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the old chat components

2 participants