Skip to content

Let cards be dragged on the My Issues board - #172

Merged
imshashank merged 1 commit into
mainfrom
fix/my-issues-board-drag
Aug 8, 2026
Merged

imshashank merged 1 commit into
mainfrom
fix/my-issues-board-drag

Conversation

@imshashank

@imshashank imshashank commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

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.tsx passed draggable={false} outright, so Board skipped its DndContext entirely and emitted plain <li> elements instead of sortable ones. There was nothing on the page to grab.

Every other board computes it:

Board draggable
Team view canRegroup(config.groupBy)
Project issues canRegroup(groupBy)
Saved view canRegroup(groupBy)
My Issues false

Why 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, and planDrop returns null when no state matches, so a drop that cannot be expressed is refused rather than guessed. My Issues now passes the same resolver, plus groupBy and 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: restoring draggable={false} fails exactly these two and nothing else.

Full web suite: 1547 pass. The two sign-out.test.ts socket failures are pre-existing and local only; they fail identically on a clean main, 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.

  • Enables dragging only for regroupable fields.
  • Resolves merged status columns to the dragged issue's team-specific workflow state.
  • Adds tests confirming that sortable card elements render.
  • Manual ordering currently permits cross-team neighbors to influence team-local issue ordering.

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

Filename Overview
apps/web/src/features/issues/my-issues-view.tsx Enables regrouping and state resolution correctly, but also enables manual ordering across merged groups whose neighboring cards can belong to different teams.
apps/web/tests/features/issues/my-issues-view.test.tsx Confirms sortable elements render, but the issue-ID test asserts only the element role and does not verify identity propagation.

Sequence Diagram

sequenceDiagram
  participant U as User
  participant B as My Issues Board
  participant P as planDrop
  participant API as Move API
  participant DB as Issue Store
  U->>B: Drag issue among merged cross-team cards
  B->>P: Supply visible beforeId/afterId
  P->>API: Move issue with neighbor IDs
  API->>DB: Read neighbor sort orders
  DB-->>API: Orders may belong to other teams
  API->>DB: Persist dragged issue sortOrder
Loading

Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
apps/web/src/features/issues/my-issues-view.tsx:205
**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}
```

### Issue 2
apps/web/tests/features/issues/my-issues-view.test.tsx:356
**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.

Reviews (1): Last reviewed commit: "fix(issues): let cards be dragged on the..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

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}.
@imshashank
imshashank requested a review from pulkitxm as a code owner August 8, 2026 10:45
@vercel

vercel Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
orbit Ready Ready Preview Aug 8, 2026 10:46am

Request Review

@github-actions github-actions Bot added tests Test coverage and test infrastructure area: web The Next.js app and its UI area: issues Issues, lists and boards labels Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@imshashank, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 58cb5801-83af-426b-8aee-c60517907162

📥 Commits

Reviewing files that changed from the base of the PR and between c7fc4a0 and fdd7a1c.

📒 Files selected for processing (2)
  • apps/web/src/features/issues/my-issues-view.tsx
  • apps/web/tests/features/issues/my-issues-view.test.tsx

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

groups={groups}
draggable={false}
draggable={canRegroup(groupBy)}
reorderable={orderBy === 'manual'}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Suggested change
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.

Fix in Claude Code


const board = screen.getByTestId('my-issues-board');
const first = board.querySelector('[aria-roledescription="sortable"]');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Fix in Claude Code

@imshashank
imshashank merged commit 865de8c into main Aug 8, 2026
12 checks passed
@imshashank
imshashank deleted the fix/my-issues-board-drag branch August 8, 2026 10:59

This branch was successfully deployed

1 active deployment
Preview — fdd7a1c9 Deployed Aug 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: issues Issues, lists and boards area: web The Next.js app and its UI tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant