feat: copy popover, optimistic sub-chats, worktree cleanup, sortable sidebar, draggable tabs#23
Merged
Merged
Conversation
…up, sortable sidebar, draggable tabs Bundles six related improvements (F1-F6): - F1: Copy button in text-selection popover - F2: Optimistic sub-chat creation with rollback on RPC failure - F3: Worktree directory cleanup (path-prefix guard, project-delete cascade, startup orphan scan) - F4: Native HTML5 DnD on the tab bar with insertion marker - F5: Sortable sidebar rows via @dnd-kit - F6: Cached file_stats columns + auto-delete empty sub-chats on tab close and app quit Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # bun.lock # package.json # src/main/lib/trpc/routers/projects.ts
Drag affordances were invisible — users couldn't tell which rows/tabs were draggable. Sidebar rows now show a hover-revealed GripVertical icon on the left edge plus cursor-grab on hover. Tab pills show cursor-grab when draggable. Split-pair items keep cursor-pointer (they're locked). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Bundles six related UX/cleanup improvements plus a merge of dev:
@dnd-kit+ grip handle on hoverfile_stats_*columns onsub_chats+ auto-delete empty sub-chats on tab close / app quitTest plan
F1 — Copy button in selection popover
F2 — Optimistic sub-chat creation
+5× rapidly → all 5 tabs appear instantly with no waiting spinner.+still uses lazy creation; first message persists the row.chats.createSubChatserver-side → tab appears, then disappears with toast "Failed to create chat".F3 — Worktree cleanup
~/.21st/worktrees/<slug>/<folder>/exists. Delete the chat → directory is gone.mkdir ~/.21st/worktrees/fake/orphan && touch ~/.21st/worktrees/fake/orphan/x. Restart the app → log line[WorktreeCleanup] Scanned N worktree dirs, removed M orphansshows the orphan was removed (~5s after start).db:studio, set a chat'sworktreePathto/tmp/test. Delete the chat →/tmp/testis not removed (path-prefix guard rejects).ln -s ~ ~/.21st/worktrees/<slug>/<folder>/escape. Delete the chat → home dir contents intact (Nodefs.rmonly unlinks the symlink, doesn't follow it).F4 — Native DnD on tab bar
«icon). Open ≥ 2 sub-chats.openSubChatIdslocalStorage.F5 — Sortable sidebar with
@dnd-kitF6 — File stats cache + auto-delete empty
bun run db:studio).useStreamingStatusStore.isStreaming(id)).Regression smoke
bun run devboots without console errors.bun run ts:check(ornpx tsc --noEmit) is no worse than baseline.Migration
A new Drizzle migration
drizzle/0008_shiny_hydra.sqladds three columns tosub_chats. Auto-runs on app start; no manual step needed.