Skip to content

feat(kanban): card comments (DB board)#42

Merged
cnjack merged 2 commits into
mainfrom
feat/kanban-b1-comments
Jun 23, 2026
Merged

feat(kanban): card comments (DB board)#42
cnjack merged 2 commits into
mainfrom
feat/kanban-b1-comments

Conversation

@cnjack

@cnjack cnjack commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What

Implements B1 — a Comments thread on the card peek for the DB-backed board: list, post, and delete (own comments; admins/owners may delete any). Per the roadmap decision, comments are a DB-board feature — file boards keep discussion in the note body.

Changes

  • migration 0016_kanban_commentskanban_card_comments (id, workspace_id, card_id, author_user_id, body, timestamps; FK cascades).
  • handlers/kanban/comment.rslist / create / delete with role gates and author-or-admin delete; timestamps CAST AS CHAR.
  • routes + module registration.
  • api.tslistComments / createComment / deleteComment + KanbanComment.
  • sharedBoardComment type + BoardSurfaceProps (loadComments / addComment / deleteComment / currentUser) threaded to BoardPeek, which fetches on open and renders the thread + a composer. Delete shows only on the current user's own comments. Section hidden when no loader is supplied (file board).
  • Kanban.tsx wires the callbacks (+ getStoredUsername for the current user).
  • kanban_tests.rscard_comments_crud.

Verification

  • cargo check + 39 kanban_tests pass against MySQL (incl. the new test and the 0016 migration); web tsc clean.
  • Harness confirmed the peek thread: render, add (appended a comment), and delete-own-only (lee's comment showed no delete button for user jack; deleting jack's worked).

Notes

  • This PR claims migration 0016 — the D2 webhooks PR should take 0017.
  • Follow-up: realtime broadcast for comments, comment editing, and @mentions.

🤖 Generated with Claude Code

Add a Comments section to the card peek for the DB-backed board: list, post, and
delete (own comments; admins/owners may delete any). Comments are a DB-board
feature — file boards keep discussion in the note body.

- migration 0016_kanban_comments: kanban_card_comments (id, workspace_id,
  card_id, author_user_id, body, timestamps; FK cascades).
- handlers/kanban/comment.rs: list / create / delete with role gates and
  author-or-admin delete; timestamps CAST AS CHAR (sqlx no-time-feature).
- routes + module registration.
- api.ts: listComments / createComment / deleteComment + KanbanComment type.
- shared: BoardComment type + BoardSurfaceProps (loadComments / addComment /
  deleteComment / currentUser) threaded to BoardPeek, which fetches on open and
  renders the thread + a composer; delete shows only on the current user's own
  comments. Section hidden when no loader is supplied (file board).
- Kanban.tsx wires the callbacks (+ getStoredUsername for the current user).
- kanban_tests.rs: card_comments_crud.

Verified: cargo check + 39 kanban_tests pass against MySQL (incl. the new test
and the 0016 migration), web tsc clean, and a harness confirmed the peek thread
(render, add, and delete-own-only — lee's comment had no delete for user jack).

Note: migration 0016 (D2 webhooks should take 0017). Follow-up: realtime
broadcast for comments, edit, and @mentions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@cnjack, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 31 minutes and 39 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f0b5aa32-553c-4921-bb8a-c6a8ec025a68

📥 Commits

Reviewing files that changed from the base of the PR and between b665a2e and 6daa52b.

📒 Files selected for processing (21)
  • services/jtype-web/frontend/src/api.ts
  • services/jtype-web/frontend/src/pages/Kanban.tsx
  • services/jtype-web/migrations/0016_kanban_comments.down.sql
  • services/jtype-web/migrations/0016_kanban_comments.up.sql
  • services/jtype-web/src/db/migrations.rs
  • services/jtype-web/src/handlers/kanban/comment.rs
  • services/jtype-web/src/handlers/kanban/mod.rs
  • services/jtype-web/src/lib.rs
  • services/jtype-web/tests/kanban_tests.rs
  • shared/components/board/BoardPeek.tsx
  • shared/components/board/BoardSurface.tsx
  • shared/components/board/types.ts
  • shared/i18n/locales/en/messages.mjs
  • shared/i18n/locales/en/messages.po
  • shared/i18n/locales/ja/messages.mjs
  • shared/i18n/locales/ja/messages.po
  • shared/i18n/locales/ko/messages.mjs
  • shared/i18n/locales/ko/messages.po
  • shared/i18n/locales/zh/messages.mjs
  • shared/i18n/locales/zh/messages.po
  • shared/lib/board.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/kanban-b1-comments

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.

# Conflicts:
#	services/jtype-web/frontend/src/api.ts
#	services/jtype-web/frontend/src/pages/Kanban.tsx
#	services/jtype-web/src/lib.rs
#	services/jtype-web/tests/kanban_tests.rs
#	shared/components/board/BoardPeek.tsx
#	shared/components/board/BoardSurface.tsx
#	shared/components/board/types.ts
#	shared/i18n/locales/en/messages.mjs
#	shared/i18n/locales/en/messages.po
#	shared/i18n/locales/ja/messages.mjs
#	shared/i18n/locales/ja/messages.po
#	shared/i18n/locales/ko/messages.mjs
#	shared/i18n/locales/ko/messages.po
#	shared/i18n/locales/zh/messages.mjs
#	shared/i18n/locales/zh/messages.po
#	shared/lib/board.ts
@cnjack cnjack merged commit 9f46259 into main Jun 23, 2026
3 checks passed
@cnjack cnjack deleted the feat/kanban-b1-comments branch June 23, 2026 04:27
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.

1 participant