Skip to content

feat(kanban): card dependencies (blocked_by / blocks / relates)#36

Merged
cnjack merged 2 commits into
mainfrom
feat/kanban-d1-dependencies
Jun 23, 2026
Merged

feat(kanban): card dependencies (blocked_by / blocks / relates)#36
cnjack merged 2 commits into
mainfrom
feat/kanban-d1-dependencies

Conversation

@cnjack

@cnjack cnjack commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What

Adds card-to-card dependencies to the kanban — blocked_by, blocks, and relates. Implements D1 from the roadmap (design §1).

Dependencies live in card markdown frontmatter (comma-separated [[slug]]), so they ride the existing document-sync pipeline to both desktop and webno DB migration, no new sync gate, no new WebSocket event.

Changes

  • jtype-core — parse blocked_by / blocks / relates via parse_card_links (unwraps [[ ]], mirrors parse_card_tags) into BoardCardInfo. +2 unit tests.
  • shared/lib/board.tsBoardViewCard dependency fields + parseLinks / serializeLinks / cardSlug, and blockedCounts(): counts a card's distinct unfinished blockers, combining its own blocked_by with the reverse blocks edges of other cards (done-column aware, deduped, cycle-safe).
  • BoardSurface — a red 🔒 blocked badge on cards showing the blocker count, resolved against all cards (a blocker may be filtered out of view).
  • BoardPeekBlocked by / Blocks / Relates pickers over sibling cards, mapping slug↔title for display while storing slugs; unresolved refs (renamed/cross-board) are preserved.
  • Desktop + web adapters thread the fields through the normalized model and serialize them back to frontmatter on updateCard.
  • tests/unit/boardDependencies.spec.ts + i18n (zh translations added).

Verification

  • tsc --noEmit clean (root + web), 10 TS unit tests + 36 jtype-core tests pass, web vite build ok.
  • Throwaway in-browser harness confirmed: the blocked badge for forward (blocked_by) and reverse (blocks) edges, that a card blocked only by a done card shows no badge, the Peek editor resolving design-spec → "Design spec", and live re-derivation — editing one card's "Blocks" made the target card's badge appear immediately.

Follow-up (design phase 2/3)

Edit-time cycle warning, unresolved-reference greying in the editor, and rename-link propagation. The current blockedCounts is already cycle-safe (no recursion); these are UX niceties.

🤖 Generated with Claude Code

Add card-to-card dependencies stored in markdown frontmatter so they ride the
existing document-sync pipeline to both desktop and web — no DB migration, no
new sync gate, no new WS event.

- jtype-core: parse `blocked_by` / `blocks` / `relates` frontmatter (comma-
  separated `[[slug]]`) via parse_card_links into BoardCardInfo; +2 unit tests.
- shared/lib/board.ts: BoardViewCard dependency fields + parseLinks /
  serializeLinks / cardSlug helpers and blockedCounts() — counts a card's
  distinct *unfinished* blockers (own blocked_by ∪ reverse blocks edges,
  done-column aware, dedup, cycle-safe).
- BoardSurface: red lock "blocked" badge on cards (count of unfinished blockers),
  resolved against all cards (not just the filtered view).
- BoardPeek: Blocked by / Blocks / Relates pickers over sibling cards, mapping
  slug<->title for display while storing slugs; unresolved refs preserved.
- Desktop + web adapters: thread the fields through the normalized model and
  serialize them back to frontmatter on updateCard.
- tests/unit/boardDependencies.spec.ts: cover the helpers (parse/serialize/slug/
  blockedCounts incl. reverse edges, dedup, custom done column).
- i18n: extract new shared strings, add zh, compile.

Verified: root+web tsc clean, 10 TS unit tests + 36 jtype-core tests pass, web
build ok, and a throwaway harness confirmed the blocked badge (forward + reverse
edges, done-aware), the Peek editor with slug→title resolution, and live
re-derivation when a dependency is edited.

Follow-up (design phase 2/3): edit-time cycle warning, unresolved-reference
greying, rename-link propagation.

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 16 minutes and 11 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: 370c39a3-0d98-4d8b-aaaf-0ec8f9521dd4

📥 Commits

Reviewing files that changed from the base of the PR and between b089b6d and cf1ef83.

📒 Files selected for processing (16)
  • services/jtype-core/src/lib.rs
  • services/jtype-web/frontend/src/pages/WebBoardView.tsx
  • shared/components/board/BoardPeek.tsx
  • shared/components/board/BoardSurface.tsx
  • 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
  • src/components/BoardView.tsx
  • src/lib/types.ts
  • tests/unit/boardDependencies.spec.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/kanban-d1-dependencies

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.

…encies

# Conflicts:
#	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
@cnjack cnjack merged commit 228b5cd into main Jun 23, 2026
3 checks passed
@cnjack cnjack deleted the feat/kanban-d1-dependencies branch June 23, 2026 04:43
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