chore(chat-ui,chat-legacy,trpc,db,desktop,mobile): delete orphan packages and the device-presence system

Merged
SA
3mo ago
+6322-3514

Teardown Wave A, slice 3

Deletes orphan packages and the entire device-presence system. Every claim re-verified by grep before deletion.

Removed

  • packages/chat-ui/ entirely (42 files, Lexical-based) — zero importers repo-wide; the only references were two storybook config lines in packages/ui (stories glob + a @source in storybook.css), both cleaned up
  • packages/chat-legacy/src/server/hono/ (createChatRuntimeHonoApp, zero importers) plus its now-orphaned hono dep and ./server/hono export. The rest of chat-legacy stays — ChatService provider auth, AI naming, and slash commands are a separate later effort
  • The whole device-presence system: the desktop + mobile useDevicePresence hooks, the device router (registerDevice was its only procedure; those hooks its only callers), and the device_presence table itself (migration 0068) plus the device_type enum and the electric-proxy allowlist arm

Why the table can drop now, unlike the rest of Wave B: it has zero readers, and its Electric collection was removed long ago (b1d3f3923) — so no shipped client subscribes to its shape. Verified against the desktop-v1.20.2 bundle, which syncs only tasks, task_statuses, projects, v2_hosts, v2_clients, v2_users_hosts, v2_workspaces, workspaces, auth.members. Those tables stay gated: ~4,900 weekly users are still on pre-1.20 builds and dropping a subscribed shape would kill their sync stream.

Behavior change for old clients (silent): they'll call the removed device.registerDevice and get a tRPC NOT_FOUND on a fire-and-forget upsert whose result nothing reads. No crash path, no user-visible error.

Kept deliberately: AgentHooks and the mobile authenticated layout (both still do other work); expo-constants in mobile (a real transitive native module of expo/expo-router — sherif agrees).

Verification: lint exit 0 · typecheck exit 0 (37/37) · sherif exit 0 · db 13/13 · chat-legacy 130/130 · desktop 2687/2687 · mobile pass-with-no-tests. Leftover greps for createChatRuntimeHonoApp/useDevicePresence/registerDevice/devicePresence: zero hits repo-wide.

Follows #6431 and #6434 in the Sandbox Workspaces cleanup track.

Summary by CodeRabbit

  • Removed Features

    • Retired the legacy chat composer and related capabilities, including attachments, mentions, commands, dictation, drag-and-drop, and scroll-to-bottom controls.
    • Device presence registration and status tracking are no longer available in desktop or mobile apps.
    • Removed the legacy chat server endpoint and device presence service.
  • Maintenance

    • Updated component previews and documentation tooling to reflect retired chat experiences.