Repository navigation
feat(chat-ui)!: feed reads from @corbits/mailbox threads; pins and reactions removed (CL-8174) - #789
Merged
Merged
Conversation
Move the feed's read-path tests off @corbits/chat's message/thread routes and onto mailbox stubs, delete the pins/reactions suites the feature removal leaves pointless, and drop the fork/sub-thread and stale-thread-reference tests that encoded mechanisms the mailbox-backed feed no longer has. Deleted tests: - packages/chat-ui/src/pins-status.test.ts - packages/chat-ui/test/reactions-and-pins.test.tsx - packages/chat-ui/test/connect-card-settings-stream.test.tsx (block-kind message parts, e.g. connect cards, cannot round-trip through a mail body; no replacement mechanism exists yet) - packages/chat-ui/test/stream-apply.test.ts: applyStreamMessage/ applyStreamReaction/applyStreamPin describe blocks (kept ensureReplyThreadRow) - packages/chat/test/routes.test.ts: "threads — root feed vs reply membership (4a)" (exercised the now-deleted thread-messages route) - packages/chat-ui/test/chat-workspace.test.tsx: "a stale thread reference self-heals instead of dead-ending" (the GET .../threads/:id/messages 404-recovery path it tested never existed in the real feed); "forking a message inside a thread opens a sub-thread ..." and "the threads menu indents sub-threads ..." (forking still targets the old @corbits/chat thread store, disconnected from mailbox-derived thread ids) - packages/chat-ui/test/zero-refetch-on-stream-event.test.tsx: "a streamed chat.message renders with no fetch call beyond mount-hydration" (applyStreamMessage's zero-refetch guarantee no longer applies once reads come from the mailbox) - packages/chat-ui/test/message-hover-toolbar.test.tsx: reaction-picker and pin-menu-entry tests
…actions removed (CL-8174) use-workbench-feed now loads a room's messages and reply-thread rows by listing and reading @corbits/mailbox threads instead of @corbits/chat's message/thread routes, and its live-update subscription follows the mailbox's own SSE stream. Pins and reactions are removed from chat-ui entirely (no server-side change) since the feed they hung off no longer exists in this shape. Every mailbox read stays behind the single adapter in packages/chat-ui/src/mailbox-timeline.ts: it makes its own fetch() calls and validates responses with local arktype schemas rather than importing @corbits/inbox/client, whose value-level re-exports pull @corbits/mailbox's server-only migrations.ts (a node:crypto user) into the browser bundle and break the Vite build. Per the owner's ruling that @corbits/mailbox is a temporary, shrinking surface over Interchange's native mailbox, no other file in this package touches the mailbox response shape, so a later swap to the native thread shape is a one-file change. Deletes the now-uncalled @corbits/chat thread-messages read route (GET /workbenches/:id/threads/:threadId/messages) and its chat-ui pinned-strip/reaction-chip UI and wire types. Known regressions, follow-up needed: - Forking a message into a depth-2 sub-thread still targets the old @corbits/chat thread store, whose ids have no relationship to the new mailbox-derived thread ids; the fork/sub-thread affordance is disconnected until it's ported to mailbox threads too. - Block-kind message parts (approve/poll/form/connect-github/ connect-service cards) cannot round-trip through the mailbox: a mail body is plain text, so a reloaded page loses any persisted block content. - The mailbox live-update subscription refreshes the whole feed on any event rather than re-reading only the affected thread, since the SSE payload carries just a message id/op, not a thread root.
TheGreatAxios
force-pushed
the
cl-8174-feed-mailbox
branch
from
September 17, 2026 19:48
9ccb86c to
57403fc
Compare
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
use-workbench-feednow loads a room's messages and reply-thread rows by listing and reading@corbits/mailboxthreads instead of@corbits/chat's message/thread routes, and its live-update subscription follows the mailbox's own SSE stream (/me/inbox/events) instead of foldingchat.messagestream events straight into the cache.packages/chat-ui/src/mailbox-timeline.ts: it makes its ownfetch()calls and validates responses with local arktype schemas rather than importing@corbits/inbox/client, whose value-level re-exports pull@corbits/mailbox's server-onlymigrations.ts(anode:cryptouser) into the browser bundle and break the Vite build. Per the owner's ruling that@corbits/mailboxis a temporary, shrinking surface over Interchange's native mailbox, no other file in this package touches the mailbox response shape, so swapping to the native thread shape later is a one-file change.@corbits/chatthread-messages read route (GET /workbenches/:id/threads/:threadId/messages) and the chat-ui pinned-strip/reaction-chip UI and wire types it fed.Known regressions, follow-up needed
@corbits/chatthread store, whose ids have no relationship to the new mailbox-derived thread ids. The fork/sub-thread affordance needs to be ported to mailbox threads before it works again.threadMessagesToTimelineonly ever producestextparts. A reloaded page loses any persisted block content.Deleted tests
packages/chat-ui/src/pins-status.test.tspackages/chat-ui/test/reactions-and-pins.test.tsxpackages/chat-ui/test/connect-card-settings-stream.test.tsx— block-kind message parts can't round-trip through a mail body; no replacement mechanism exists yet (see regression above)packages/chat-ui/test/stream-apply.test.ts—applyStreamMessage/applyStreamReaction/applyStreamPindescribe blocks (keptensureReplyThreadRow)packages/chat/test/routes.test.ts— "threads — root feed vs reply membership (4a)" (exercised the now-deleted thread-messages route)packages/chat-ui/test/chat-workspace.test.tsx:GET .../threads/:id/messages404-recovery path it tested never existed in the real feed even before this changepackages/chat-ui/test/zero-refetch-on-stream-event.test.tsx— "a streamed chat.message renders with no fetch call beyond mount-hydration" (the zero-refetch guarantee no longer holds once reads come from the mailbox)packages/chat-ui/test/message-hover-toolbar.test.tsx— reaction-picker and pin-menu-entry testsTest plan
bun run typecheckbun run lintbun run check:structuralbun --cwd packages/chat-ui test(852 pass)bun --cwd apps/web test(799 pass, includes a realvite build)bun --cwd packages/chat test(808 pass, 66 skip — DB-gated)