Repository navigation
feat(deck): bulk select and act on multiple cards - #101
Merged
Merged
Conversation
Add a multi-select mode to the deck builder. A Select toggle in the toolbar enters it, as do Cmd/Ctrl-click and Shift-click (range, in visual order) on any row or stack tile. Selected cards get a floating action bar with: - Move to zone - Category: set primary, add to, remove from - Delete (ghost/secondary rows only strip that membership, matching the single-row trash behaviour) Every bulk action is a single applyBulkCardAction server action that re-plans against the DB rows and calls applyChanges once, so it lands as one revision and can be reverted from history. The pure planner (lib/deck/bulk-actions.ts) is shared by the optimistic client update and the server. Escape exits select mode; drag-and-drop is disabled while selecting. Also fixes sortable stack tiles ignoring clicks: isInteractiveTargetStack matched the tile itself (dnd-kit gives it role=button), so click-to-open detail never fired. Claude-Session: https://claude.ai/code/session_01A3XUj4hFZwjBu4eum6UiuB
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
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 |
Narrow the bulk planner's output to move/remove changes so toZoneAction no longer has an unreachable fallback, and cover the remaining branches: deleting primary-row selections removes the DeckCards, and addCategory names are normalized server-side. Restores 100% line coverage. Claude-Session: https://claude.ai/code/session_01A3XUj4hFZwjBu4eum6UiuB
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.
Description
applyBulkCardActionserver action that re-plans against DB rows and callsapplyChangesonce, so it is a single revision and revertible from history. The same pure planner (lib/deck/bulk-actions.ts) drives the optimistic client update.isInteractiveTargetStackmatched the tile itself (dnd-kit gives itrole=button), so click-to-open detail never fired.Fixes: #85
Checklist
pnpm test) and lint is cleanrevalidate/dynamic/unstable_cache— used'use cache'+cacheLife/cacheTag<Link>imported fromapp/_components/link.tsx, notnext/linkScreenshots / notes