Skip to content

Conversation

@ryota-murakami
Copy link
Contributor

Summary

  • Extract recordColumnHistory() helper to deduplicate 3 identical undo-history blocks
  • Extract handleNewRowDrop() for column → new row zone drops
  • Extract handleColumnInsertDrop() for column → empty grid cell drops
  • Extract handleColumnSwap() for column → column swap drops
  • handleDragEnd is now a ~60-line dispatcher (was 285 lines)

All helpers use useCallback for stable references. No behavioral changes.

Closes #64

Test plan

  • pnpm test — all 1202 tests pass
  • pnpm typecheck — clean
  • pnpm lint — clean
  • pnpm e2e — verify DnD operations work correctly

Extract 4 helpers from the 285-line handleDragEnd:
- recordColumnHistory(): shared undo history recording
- handleNewRowDrop(): column dropped on new row zone
- handleColumnInsertDrop(): column dropped on empty grid cell
- handleColumnSwap(): column dropped on another column

handleDragEnd is now a ~60-line dispatcher that delegates to
the appropriate sub-handler based on drag type and drop target.
@vercel
Copy link
Contributor

vercel bot commented Feb 12, 2026

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

Project Deployment Actions Updated (UTC)
gitbox Ready Ready Preview, Comment Feb 12, 2026 1:06pm

Request Review

@morph-subagents
Copy link

🤖 Morph Preview Test

Looks like you hit your rate limits!

Please upgrade your limits here, or wait a few minutes and try again.

If you need help, reach out to support@morphllm.com.


Automated testing by Morph

@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

Warning

Rate limit exceeded

@ryota-murakami has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 20 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/issue-64-decompose-handle-drag-end

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 and usage tips.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 13.63636% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.63%. Comparing base (1eb53df) to head (9b79cde).

Files with missing lines Patch % Lines
src/components/Board/KanbanBoard.tsx 13.63% 57 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
+ Coverage   74.46%   74.63%   +0.17%     
==========================================
  Files         120      120              
  Lines        3881     3880       -1     
  Branches     1063     1035      -28     
==========================================
+ Hits         2890     2896       +6     
+ Misses        968      961       -7     
  Partials       23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

🧪 E2E Coverage Report (Sharded: 12 parallel jobs)

Metric Coverage
Lines 94.38%
Functions 17.66%
Branches 16.89%
Statements 30.48%

📊 Full report available in workflow artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decompose KanbanBoard handleDragEnd (285 lines, complexity 15)

2 participants