Skip to content

feat(kanban): v2 attention-first board - #720

Draft
kartikkabadi wants to merge 7 commits into
Emanuele-web04:mainfrom
kartikkabadi:kanban-board-v2
Draft

feat(kanban): v2 attention-first board#720
kartikkabadi wants to merge 7 commits into
Emanuele-web04:mainfrom
kartikkabadi:kanban-board-v2

Conversation

@kartikkabadi

@kartikkabadi kartikkabadi commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Land the S1 "Kanban v2" redesign as a small ordered set of commits. New shared domain module first, then the web-side attention-first board, the needs-review filter with its fold/reveal, stuck detection, and the F1/C2/H5 reliability fixes:

  • feat(kanban): add shared v2 attention-first domain modulepackages/shared/src/kanban.ts + tests: v2 column/attention derivation over a structural input with an injected clock (no wall-clock calls), scheduled wait KANBAN_STUCK_WARN_MS (20 min) / KANBAN_STUCK_HARD_MS (40 min), label maps. Exposed via the @synara/shared/kanban subpath export.
  • fix(kanban): refine needs-review pill on raw flags, not display copyrefineAttentionFlagsForLivePr operates on raw KanbanAttentionFlag entries; the pill maps display copy through KANBAN_ATTENTION_LABELS after refinement so it never drifts from the flag set (M3/C3). F1 durable thread-shell last-activity heartbeat feeds the derivation; C2 gates the board clock on live-work candidates. Persists the needs-review filter and reveal fold in the kanban UI store. H5: expired optimistic dispatches stay silent when the thread left the display set.
  • feat(kanban): render the attention-first v2 board and reveal fold — v2 view-mode toggle, Awaiting-you column, needs-review filter control, per-column render caps with the fold/reveal and a reachable "Show fewer" even at zero hidden cards, plus the raising-hand status glyph.

decisions.tsv (a coordinator decision trail) is ignored at the repo root and is not part of this PR.

Review pass (2026-08-21)

  • useKanbanBoard now memoizes the board build and the display-threads selector, so the C2 clock gate, the durable-heartbeat selector, and the composer-draft equality check actually prevent rebuilds instead of being discarded every render.
  • Awaiting-you cards keep their unsent-prompt companion draft card (previously Done-only), and the view clock keeps ticking while a stuck Awaiting-you card shows "Worked for".
  • Dropped the dead attentionLabels card field (the renderer maps flags through KANBAN_ATTENTION_LABELS itself) and made now required in the web column adapter — its only production caller always passed it.
  • New real-chromium browser test renders the four-column v2 board with attention pills and the needs-review filter.
  • ThreadDiagnosticsQuery.test now uses relative timestamps: the 30-day retention purge deletes rows older than a month, so the old absolute fixture dates silently vanished once real time moved past them (this is what turned CI red on Aug 21 with no code change).

Test plan

  • bun fmt — clean
  • bun lint — 0 errors
  • bun typecheck — web + shared clean (server untouched by this PR)
  • bun run test — server 334 files / 3824 tests green, web 3973/3978 (5 pre-existing local env failures in ChatMarkdown/Sidebar, reproduced on the pristine branch), shared 574 green
  • Browser E2E: KanbanProjectBoardView.browser.tsx green in chromium
  • Focused kanban suites: web 112 tests, shared 40 tests green

Manual checks worth a glance

  • v2 board: cards land in Draft / In Progress / Awaiting you / Done with attention pills on failed/stuck/awaiting-*/needs-review.
  • Needs-review filter folds each column at 30 rows; the reveal toggle shows the tail and keeps "Show fewer" reachable while revealed.
  • A busy-but-quiet streaming turn must not flip to "Stuck" until the durable heartbeat genuinely ages out (20/40 min).

Made with Cursor

kartikkabadi and others added 4 commits August 16, 2026 11:36
Extract the v2 column derivation, attention flags, and stuck thresholds
into the shared package so the web board and server-side read-board tool
share one vocabulary and one derivation (D2). Pure structural inputs and
an injected clock keep the module unit-testable without wall-clock calls.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rename refineAttentionLabelsForLivePr to refineAttentionFlagsForLivePr and
operate on raw KanbanAttentionFlag entries so the pill never drifts from
the flag set; display copy maps through KANBAN_ATTENTION_LABELS after
refinement. Feed the durable thread-shell last-activity stamp into the v2
derivation (F1 heartbeat), gate the board clock on live-work candidates
(C2), and persist the needs-review filter and reveal fold in the kanban UI
store. Widen the column vocabulary to the v2 four-column set and keep the
column label map scoped to classic keys. Stay silent when an expired
optimistic dispatch cannot be confirmed as reverted (H5).

Co-authored-by: Cursor <cursoragent@cursor.com>
Thread the v2 view-mode toggle and needs-review filter through the kanban
route, the overview flatten order (Awaiting you after In Progress), and the
per-column render caps. The project board exposes a reveal toggle that
drops the column caps so the folded needs-review tail renders, with the
Show fewer affordance reachable while revealed even at zero hidden cards.
Add the shared needs-review filter control.

Co-authored-by: Cursor <cursoragent@cursor.com>
decisions.tsv is a cross-agent coordination artifact, not something this PR
should carry. Root-scope it out of version control.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added size:XXL vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Aug 16, 2026
@kartikkabadi
kartikkabadi marked this pull request as draft August 17, 2026 01:15
Five untracked files (.e2e-probe/, apps/web/e2e-{seed-prs,seed-state,wsdispatch}.ts,
apps/web/f1-derivation.ts) are local throwaway tooling for manual verification
against an isolated dev instance — they reference PR Emanuele-web04#720 itself and isolated
ports. They are not part of the shipped feature, so root-scope them out of
version control instead of carrying them in the PR.
kartikkabadi and others added 2 commits August 21, 2026 16:48
…ns, defuse retention time-bomb

- Memoize the board build and the display-threads selector in useKanbanBoard so
  the three stabilization layers (C2 clock gate, heartbeat selector, draft
  snapshot equality) actually prevent rebuilds instead of being discarded every
  render.
- Extend the unsent-prompt companion card to Awaiting-you cards: a settled
  thread blocked on the human keeps its drafted follow-up visible, matching the
  classic Done-column behavior.
- Keep the v2 view clock ticking while stuck Awaiting-you cards carry an active
  work start, so their "Worked for" label does not freeze.
- Drop the dead attentionLabels field (the renderer maps flags through
  KANBAN_ATTENTION_LABELS itself) and require the board clock in the web column
  adapter; its only production caller always passed one.
- Consolidate duplicated test blocks (label maps, PR-refinement twins, reveal
  affordance truth table).
- Add a real-chromium browser test rendering the four-column v2 board with
  attention pills and the needs-review filter.
- Use relative timestamps in ThreadDiagnosticsQuery.test: the 30-day retention
  purge deletes rows older than a month, so absolute fixture dates silently
  vanished once real time moved past them (this is what turned CI red on Aug 21).

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@kartikkabadi

Copy link
Copy Markdown
Contributor Author

Review pass pushed (07c67ab): memoized board build + selector, awaiting-you companion draft cards, dead attentionLabels field dropped, chromium browser E2E for the v2 board, and a defused 30-day-retention time-bomb in ThreadDiagnosticsQuery.test (relative timestamps — this is what turned CI red on Aug 21 with no code change). Full local verification green: fmt/lint/typecheck, server 3824 tests, web focused suites, browser E2E. Heads-up: CI has not started for the new head SHA (only label bots ran); close/reopen + empty pushes did not trigger it. Local runs are documented in the PR body.

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

Labels

size:XXL vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant