Repository navigation
Let cards be dragged on the My Issues board - #172
Conversation
Every other board computes draggability from the grouping. My Issues
passed draggable={false} outright, so the board rendered plain list
items with no drag context at all and nothing on the page could be
moved.
It spans teams, which is presumably why it was left alone: a column
there is a merged status, and dropping into it has to land on the state
belonging to that issue's own team. That problem is already solved.
Project boards span teams too and pass mergedStateResolver, which maps
the target column back to the right per team state, and planDrop
refuses the move when no state matches. My Issues now passes the same
resolver, along with groupBy and the manual ordering flag.
Two tests assert the cards render sortable rather than inert. Both fail
against draggable={false}.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 26 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
| groups={groups} | ||
| draggable={false} | ||
| draggable={canRegroup(groupBy)} | ||
| reorderable={orderBy === 'manual'} |
There was a problem hiding this comment.
Cross-team neighbors corrupt ordering
When a manually ordered merged group contains cards from different teams, Board submits those cards as placement neighbors and the server derives the dragged issue's team-local sortOrder from their orders, causing its position on its own team board to change unpredictably.
| reorderable={orderBy === 'manual'} | |
| reorderable={false} |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/src/features/issues/my-issues-view.tsx
Line: 205
Comment:
**Cross-team neighbors corrupt ordering**
When a manually ordered merged group contains cards from different teams, `Board` submits those cards as placement neighbors and the server derives the dragged issue's team-local `sortOrder` from their orders, causing its position on its own team board to change unpredictably.
```suggestion
reorderable={false}
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
|
||
| const board = screen.getByTestId('my-issues-board'); | ||
| const first = board.querySelector('[aria-roledescription="sortable"]'); | ||
|
|
There was a problem hiding this comment.
Issue identity remains untested
This test claims to verify that each sortable card carries its issue ID, but it asserts only role="button". Removing or miswiring the drag payload's issue ID would therefore leave the test passing.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/tests/features/issues/my-issues-view.test.tsx
Line: 356
Comment:
**Issue identity remains untested**
This test claims to verify that each sortable card carries its issue ID, but it asserts only `role="button"`. Removing or miswiring the drag payload's issue ID would therefore leave the test passing.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
The bug
The My Issues board rendered cards that could not be moved at all. Not a broken drop target, not a permissions refusal:
my-issues-view.tsxpasseddraggable={false}outright, soBoardskipped itsDndContextentirely and emitted plain<li>elements instead of sortable ones. There was nothing on the page to grab.Every other board computes it:
canRegroup(config.groupBy)canRegroup(groupBy)canRegroup(groupBy)falseWhy it was probably left that way, and why that reason does not hold
My Issues spans every team, so a column on it is a merged status: one "Todo" standing in for each team's own Todo state. Dropping onto it cannot simply write the column id, because that id belongs to no team.
That problem was already solved for project boards, which span teams for the same reason.
mergedStateResolver(states)takes the target column and the dragged issue and returns the state belonging to that issue's own team, andplanDropreturnsnullwhen no state matches, so a drop that cannot be expressed is refused rather than guessed. My Issues now passes the same resolver, plusgroupByand the manual ordering flag, exactly as the project board does.Tests
Two, in
my-issues-view.test.tsx, asserting the board renders sortable cards rather than inert list items. Both were watched failing: restoringdraggable={false}fails exactly these two and nothing else.Full web suite: 1547 pass. The two
sign-out.test.tssocket failures are pre-existing and local only; they fail identically on a cleanmain, which is green in CI.Greptile Summary
This PR enables drag-and-drop on the My Issues board by supplying Board with grouping, ordering, and merged-state resolution context.
Confidence Score: 4/5
The PR should not merge until manual reordering is prevented from deriving team-local issue order from cross-team neighbors.
My Issues merges cards from multiple teams, while the newly enabled reorder path forwards visible cross-team neighbors and the server uses their sort orders without validating the team or state ordering scope.
Files Needing Attention: apps/web/src/features/issues/my-issues-view.tsx; apps/web/tests/features/issues/my-issues-view.test.tsx
Important Files Changed
Sequence Diagram
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix(issues): let cards be dragged on the..." | Re-trigger Greptile