Repository navigation
feat(hub-zero)!: T5b web reads chat through the native mailbox client (CL-8148) - #754
Merged
Merged
Conversation
…/chat @corbits/chat is a server-only package (drizzle, postgres, hono) that apps/web and packages/chat-ui only ever reached for pure wire schemas (parts, blocks, mentions, participants, display-name, agent-address, reaction-emoji, workbench-host-naming, stream-events, consumer-inference-text) — never for a client. Per CL-8129's ruling that @corbits/chat is not allowed in the browser surface, those schemas now live at packages/chat-ui/src/wire/*, exported as @corbits/chat-ui/wire/<name> subpaths, and apps/web/packages/chat-ui no longer depend on @corbits/chat at all. The hub still mounts @corbits/chat's routes unchanged (T5a/T5c own that cutover), so the wire copy here mirrors the same contract those routes speak; it becomes the one source of truth once the hub moves onto native mail threads. Claude-Session: https://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG
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
Slice 2/3 of CL-8129 (T5b).
apps/webandpackages/chat-uino longerdepend on
@corbits/chat, a server-only package (drizzle/postgres/hono).What actually moved
Auditing the ~85-file
rghit list, the real import surface was narrowerthan it looked: 57 of the matches were
@corbits/chat-ui(already thecorrect dependency, substring-matched by the grep). The genuine
@corbits/chatimports — 28 files — were all pure wire schemas, never aclient call:
parts,blocks,mentions,participants,display-name,agent-address,reaction-emoji,workbench-host-naming,stream-events,consumer-inference-text(plustheir internal
id-leak-guard/tools-unsupportedhelpers).There is in fact no
@corbits/chat/clientorpackages/mailboxbrowser-safe client for the timeline/threads/send/reactions/pins/
read-state data layer to move onto:
packages/chat-ui/src/api.tsalreadydoes its own
fetch()against the hub's/chat/*routes directly (no@corbits/chatclient function involved), and@corbits/mailbox(vendored, github:corbitsdev/corbits-mailbox) exports only a server
surface (hono/drizzle/postgres) — no client subpath exists yet. The hub
side (T5a) still mounts
createChatRoutesfrom@corbits/chatunchangedin this PR; that cutover is explicitly out of scope here and owned by the
concurrent T5a/T5c work.
So this PR does the part that's actually possible without touching
apps/hub: the 10 wire-schema modules now live atpackages/chat-ui/src/wire/*, exported as@corbits/chat-ui/wire/<name>subpaths, mirroring the same wire contract the hub's (still
@corbits/chat-backed) routes speak.apps/webandpackages/chat-uino longer import
@corbits/chatat all — dependency removed from bothpackage.jsons.Features dropped
None. No routes changed, no dual-read — this is a type/schema
relocation, not a data-layer cutover (that cutover isn't available yet
because it depends on T5a landing hub routes over the mailbox first).
Tests
No tests deleted — the existing suites already test behavior (parsing,
rendering), not the old import path, so nothing needed to change beyond
one import-path fix in a chat-ui test file.
Verification
bun run typecheck(web + chat-ui): cleanbun run lint: clean for every file this PR touches (a pre-existingapps/hub/src/index.tsunused-import lint error, untouched by thisPR, remains from before)
bun run check:structural: green (fixed aui-vocabularyviolationthe mirrored files newly tripped — three internal
Errormessagestrings using "definition"/"chat")
bun --cwd apps/web test ./test ./src: 918 pass, 0 failbun test packages/chat-ui: 820 pass, 89 pre-existing fail (composerdictation timing, ellipsis menu, etc. — unrelated
act()/happy-domflakiness in files this PR never touches; no import or module errors)
rg "@corbits/chat" apps/web packages/chat-ui(excludingchat-uimatches) is empty.