Skip to content

feat(hub-zero)!: T5b web reads chat through the native mailbox client (CL-8148) - #754

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-8148-hub-zero-t5b
Sep 17, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-8148-hub-zero-t5b

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Slice 2/3 of CL-8129 (T5b). apps/web and packages/chat-ui no longer
depend on @corbits/chat, a server-only package (drizzle/postgres/hono).

What actually moved

Auditing the ~85-file rg hit list, the real import surface was narrower
than it looked: 57 of the matches were @corbits/chat-ui (already the
correct dependency, substring-matched by the grep). The genuine
@corbits/chat imports — 28 files — were all pure wire schemas, never a
client call: parts, blocks, mentions, participants,
display-name, agent-address, reaction-emoji,
workbench-host-naming, stream-events, consumer-inference-text (plus
their internal id-leak-guard/tools-unsupported helpers).

There is in fact no @corbits/chat/client or packages/mailbox
browser-safe client for the timeline/threads/send/reactions/pins/
read-state data layer to move onto: packages/chat-ui/src/api.ts already
does its own fetch() against the hub's /chat/* routes directly (no
@corbits/chat client 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 createChatRoutes from @corbits/chat unchanged
in 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 at
packages/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/web and packages/chat-ui
no longer import @corbits/chat at all — dependency removed from both
package.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): clean
  • bun run lint: clean for every file this PR touches (a pre-existing
    apps/hub/src/index.ts unused-import lint error, untouched by this
    PR, remains from before)
  • bun run check:structural: green (fixed a ui-vocabulary violation
    the mirrored files newly tripped — three internal Error message
    strings using "definition"/"chat")
  • bun --cwd apps/web test ./test ./src: 918 pass, 0 fail
  • bun test packages/chat-ui: 820 pass, 89 pre-existing fail (composer
    dictation timing, ellipsis menu, etc. — unrelated act()/happy-dom
    flakiness in files this PR never touches; no import or module errors)

rg "@corbits/chat" apps/web packages/chat-ui (excluding chat-ui
matches) is empty.

…/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
@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

CL-8148

@TheGreatAxios
TheGreatAxios merged commit f0d99f4 into main Sep 17, 2026
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant