Repository navigation
chore(chat-ui,chat-legacy,trpc,db,desktop,mobile): delete orphan packages and the device-presence system - #6435
Conversation
…s and device-presence writers Teardown Wave A slice 3. - packages/chat-ui: deleted entirely (42 files, Lexical-based) — zero importers; only references were two storybook config lines in packages/ui - packages/chat-legacy/src/server/hono: deleted (createChatRuntimeHonoApp had zero importers) + its now-orphaned hono dep and export entry. Rest of chat-legacy stays - device_presence writers: deleted the desktop + mobile useDevicePresence hooks and the device router (registerDevice was its only procedure and those hooks its only callers). The device_presence TABLE stays for Wave B, gated on v1 population drain AgentHooks and the mobile authenticated layout are kept — both still do other work.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (4)
📝 WalkthroughWalkthroughThis change removes device presence hooks, the v1 device router, and the device presence database schema. It also deletes the legacy Hono chat runtime, the ChangesDevice presence retirement
Legacy chat surface removal
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to This PR removes unused packages, dead server paths, and device-presence writers while retaining the table for later cleanup; the reported checks pass, and no actionable merge-blocking risk remains. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Zero readers repo-wide; its Electric collection was removed long ago (b1d3f39), so no shipped client subscribes to the device_presence shape — verified against the desktop-v1.20.2 bundle, which syncs tasks/task_statuses/projects/v2_hosts/v2_clients/v2_users_hosts/v2_workspaces/workspaces/auth.members only. Its writers go in the same PR; old clients calling the removed device.registerDevice get a NOT_FOUND on a fire-and-forget upsert nothing reads. Unlike the other Wave B tables, this one needs no adoption gate. Drops the device_type enum and the electric-proxy allowlist arm with it.
chat-ui was deleted as an orphan on the evidence that nothing imported it. That was the wrong test: it depends on @superset/chat, the chat-v3 protocol package, so it is the in-progress UI layer for chat-v3 rather than debris. Zero importers is what unfinished work looks like too. Restores all 40 files (PromptInput, ComposerDropZone, ScrollToBottomButton and their shared components) plus the two storybook wiring lines in packages/ui.
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 inpackages/ui(stories glob + a@sourcein storybook.css), both cleaned uppackages/chat-legacy/src/server/hono/(createChatRuntimeHonoApp, zero importers) plus its now-orphanedhonodep and./server/honoexport. The rest of chat-legacy stays — ChatService provider auth, AI naming, and slash commands are a separate later effortuseDevicePresencehooks, thedevicerouter (registerDevicewas its only procedure; those hooks its only callers), and thedevice_presencetable itself (migration0068) plus thedevice_typeenum and the electric-proxy allowlist armWhy 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 thedesktop-v1.20.2bundle, which syncs onlytasks,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.registerDeviceand get a tRPC NOT_FOUND on a fire-and-forget upsert whose result nothing reads. No crash path, no user-visible error.Kept deliberately:
AgentHooksand the mobile authenticated layout (both still do other work);expo-constantsin 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
Maintenance