Problem
The composer folders carry code that nothing uses. It costs reading time and hides the real entry points.
A code trace on 14ab7f9c1 shows:
apps/webapp/src/components/chatroom/components/MessageComposer/types/index.ts is an empty file. It sits next to MessageComposer/types.ts, which every import resolves to.
apps/webapp/src/components/chatroom/components/MessageComposer/index.ts re-exports ./MessageComposer with export *. No file imports it. Every caller imports MessageComposer.tsx directly, and export * does not carry a default export anyway.
apps/webapp/src/components/chatroom/components/ChannelComposer/index.ts is a second barrel that no file imports. Chatroom.tsx imports ChannelComposer.tsx directly.
apps/webapp/src/components/chatroom/components/MessageComposer/components/Context/index.ts:1, :3, and :4 use export * on files that have only a default export, so they export nothing.
- Thirteen statics on
MessageComposer have no reference (apps/webapp/src/components/chatroom/components/MessageComposer/MessageComposer.tsx:295-303, :305-307, :310): BlockquoteButton, BoldButton, BulletListButton, CodeBlockButton, CodeButton, CommentContext, EditContext, HyperlinkButton, ItalicButton, MentionButton, OrderedListButton, ReplyContext, StrikethroughButton.
- Three statics on
ChannelComposer have no reference (apps/webapp/src/components/chatroom/components/ChannelComposer/ChannelComposer.tsx:67, :71, :72): AccessControl, MsgComposer, SignInPrompt.
- The
.chat_msg_container selector matches no element (apps/webapp/src/styles/_chat-editor.scss:1). The chat prose frame row in .cursor/docs/design-system.md:678 still names it.
- None of the 12
CHAT_OPEN publishers sets insertContent. The chat-open subscriber only forwards the field (apps/webapp/src/services/eventsHub.ts:56, :75). So insertChatComposerContentWithRetry (apps/webapp/src/services/openHeadingChatroom.ts:62-78), its call (:163), and the insertContent field are dead. The field sits on the chat open payload (apps/webapp/src/services/eventsHub.ts:24), OpenHeadingChatroomParams (openHeadingChatroom.ts:112), and OpenHeadingChatBrowseParams (:176).
Keep
- The statics
MessageComposer.EditorContent, MessageComposer.ComposerLayout, MessageComposer.ComposerDesktopLayout, and MessageComposer.ComposerMobileLayout. AGENTS.md §Code Quality names them as the canonical composer exports. Three of them have no reference today, and they stay anyway.
GifPickerButton. The chatroom docs say it is unmounted only for now (apps/webapp/src/components/chatroom/CLAUDE.md:88).
Acceptance criteria
Agent Brief
Category: enhancement
Summary: Delete composer code with no references, and keep the exports that AGENTS.md names.
Current behavior:
Two unused barrels, three export * lines that export nothing, and an empty types file sit in the composer folders. Thirteen MessageComposer statics and three ChannelComposer statics have no reference. One selector matches no element. No CHAT_OPEN publisher sets insertContent, so the field and insertChatComposerContentWithRetry are dead.
Desired behavior:
Every item in the Problem list is gone. The Keep items remain. The composer looks and behaves as before.
Key interfaces:
- The
MessageComposer and ChannelComposer statics.
- The
MessageComposer and ChannelComposer barrel files.
insertChatComposerContentWithRetry().
- The
insertContent field on the chat open payload, OpenHeadingChatroomParams, and OpenHeadingChatBrowseParams.
Out of scope
- The parked
GifPickerButton and MediaFilterToggle.
- The
SignInToJoinChannel component. Nothing mounts it, but the chatroom docs and the design system still name it.
- Renaming live statics.
Notes
Re-run the reference search with git grep before each deletion. The tree may change between filing and fixing.
After this issue and #294 land, nothing calls retryWithBackoff. The change that lands last deletes it.
Problem
The composer folders carry code that nothing uses. It costs reading time and hides the real entry points.
A code trace on
14ab7f9c1shows:apps/webapp/src/components/chatroom/components/MessageComposer/types/index.tsis an empty file. It sits next toMessageComposer/types.ts, which every import resolves to.apps/webapp/src/components/chatroom/components/MessageComposer/index.tsre-exports./MessageComposerwithexport *. No file imports it. Every caller importsMessageComposer.tsxdirectly, andexport *does not carry a default export anyway.apps/webapp/src/components/chatroom/components/ChannelComposer/index.tsis a second barrel that no file imports.Chatroom.tsximportsChannelComposer.tsxdirectly.apps/webapp/src/components/chatroom/components/MessageComposer/components/Context/index.ts:1,:3, and:4useexport *on files that have only a default export, so they export nothing.MessageComposerhave no reference (apps/webapp/src/components/chatroom/components/MessageComposer/MessageComposer.tsx:295-303,:305-307,:310):BlockquoteButton,BoldButton,BulletListButton,CodeBlockButton,CodeButton,CommentContext,EditContext,HyperlinkButton,ItalicButton,MentionButton,OrderedListButton,ReplyContext,StrikethroughButton.ChannelComposerhave no reference (apps/webapp/src/components/chatroom/components/ChannelComposer/ChannelComposer.tsx:67,:71,:72):AccessControl,MsgComposer,SignInPrompt..chat_msg_containerselector matches no element (apps/webapp/src/styles/_chat-editor.scss:1). The chat prose frame row in.cursor/docs/design-system.md:678still names it.CHAT_OPENpublishers setsinsertContent. The chat-open subscriber only forwards the field (apps/webapp/src/services/eventsHub.ts:56,:75). SoinsertChatComposerContentWithRetry(apps/webapp/src/services/openHeadingChatroom.ts:62-78), its call (:163), and theinsertContentfield are dead. The field sits on the chat open payload (apps/webapp/src/services/eventsHub.ts:24),OpenHeadingChatroomParams(openHeadingChatroom.ts:112), andOpenHeadingChatBrowseParams(:176).Keep
MessageComposer.EditorContent,MessageComposer.ComposerLayout,MessageComposer.ComposerDesktopLayout, andMessageComposer.ComposerMobileLayout. AGENTS.md §Code Quality names them as the canonical composer exports. Three of them have no reference today, and they stay anyway.GifPickerButton. The chatroom docs say it is unmounted only for now (apps/webapp/src/components/chatroom/CLAUDE.md:88).Acceptance criteria
.cursor/docs/design-system.mdno longer names.chat_msg_container.bun run typecheck,bun run lint, andbun run lint:stylespass.Agent Brief
Category: enhancement
Summary: Delete composer code with no references, and keep the exports that AGENTS.md names.
Current behavior:
Two unused barrels, three
export *lines that export nothing, and an empty types file sit in the composer folders. ThirteenMessageComposerstatics and threeChannelComposerstatics have no reference. One selector matches no element. NoCHAT_OPENpublisher setsinsertContent, so the field andinsertChatComposerContentWithRetryare dead.Desired behavior:
Every item in the Problem list is gone. The Keep items remain. The composer looks and behaves as before.
Key interfaces:
MessageComposerandChannelComposerstatics.MessageComposerandChannelComposerbarrel files.insertChatComposerContentWithRetry().insertContentfield on the chat open payload,OpenHeadingChatroomParams, andOpenHeadingChatBrowseParams.Out of scope
GifPickerButtonandMediaFilterToggle.SignInToJoinChannelcomponent. Nothing mounts it, but the chatroom docs and the design system still name it.Notes
Re-run the reference search with
git grepbefore each deletion. The tree may change between filing and fixing.After this issue and #294 land, nothing calls
retryWithBackoff. The change that lands last deletes it.