Skip to content

feat(kanban): read-path UI — Boards rail, routes, live board view (Phase 2) - #4208

Open
AlexMooreProblems wants to merge 2 commits into
block:mainfrom
AlexMooreProblems:kanban-phase2
Open

feat(kanban): read-path UI — Boards rail, routes, live board view (Phase 2)#4208
AlexMooreProblems wants to merge 2 commits into
block:mainfrom
AlexMooreProblems:kanban-phase2

Conversation

@AlexMooreProblems

Copy link
Copy Markdown

Phase 2 — Read path (desktop UI)

Read-only rendering of CLI-created kanban boards in Buzz Desktop. Stacks on #4200 (Phase 1: kinds 31001/31002/31003 + buzz boards/buzz cards CLI); once #4200 merges, this PR's diff collapses to just the desktop UI.

What's here

  • Kind constants 31001/31002/31003 in desktop/src/shared/constants/kinds.ts.
  • desktop/src/features/kanban/lib/: kanbanTypes.ts (tag parsers by name, never index-fixed; NIP-33 LWW collapse; rank sort via base-36 string <), boardQueries.ts (boards {kinds:[31001]}, board by #d, cards by #a board-ref; live subscriptions), useLiveBoard.ts.
  • BoardRail in AppSidebar.tsx immediately after Direct messages.
  • Routes /boards + /boards/$boardId (registered in routes.ts, routeTree.gen.ts regenerated).
  • Components: BoardList, BoardView, KanbanColumn, CardTile, CardDetailModal (read-only; Radix Dialog + Markdown renderer).

Verification

  • tsc clean; desktop test suite 3911 pass / 0 fail (incl. 5 new parser tests).
  • vite build succeeds; biome + file-size/px-text/pubkey-truncation guards pass.

Known follow-ups (P3)

  • Inline create + @dnd-kit drag-drop + live moves/renames; optimistic exit-5 rollback.
  • Sharing UI + permission gating; confirm channel-shared (h) board discovery before writing it.

Co-authored-by: Alex Moore mooorealexandert@gmail.com
Signed-off-by: Alex Moore mooorealexandert@gmail.com

npub1t6rfa6zdpy7psx6pt6txjkkplu8rwlzsrwu0d5ygpdz9uqcxnrwqphzvma and others added 2 commits August 1, 2026 18:47
Implements Phase 1 of the Kanban board: adds kind constants and a
base-36 order-preserving rank codec in buzz-core, board/card/move
builders in buzz-sdk, the `buzz boards` / `buzz cards` CLI surface, and
relay ingest scope for all three kinds.

Kinds (NIP-33 parameterized-replaceable, owner-authored, global-only):
- 31001 KIND_KANBAN_BOARD: ordered columns live on the board event.
- 31002 KIND_KANBAN_CARD: single `column` + `rank`; a move replaces the
  card event, giving last-write-wins via NIP-33.
- 31003 KIND_KANBAN_CARD_MOVE: optional non-replaceable audit trail.

buzz-core
- kind.rs: add KIND_KANBAN_BOARD=31001, KIND_KANBAN_CARD=31002,
  KIND_KANBAN_CARD_MOVE=31003.
- kanban.rs: base-36 order-preserving fractional rank codec with
  strict betweenness (no trailing-0 invariant so string compare ==
  numeric order). Unit-tested incl. a 5,000-insert fuzz.

buzz-sdk
- builders.rs: BoardMeta/build_kanban_board, CardMeta/build_kanban_card,
  and a move-audit builder, with `h`/`invite` share tags and NIP-32
  namespaced `["l", <label>, "kanban"]` labels.

buzz-relay
- ingest.rs: register all three kinds in required_scope_for_kind
  (Scope::UsersWrite) and is_global_only_kind; add unit tests asserting
  the scope + global-only behaviour.

buzz-cli
- boards.rs / cards.rs: `boards create/get/list/update/add-column/
  rename-column` and `cards create/list/get/move/update`, wired into the
  clap command tree.
- Buffer via a shared submit_lww_event that surfaces a superseded NIP-33
  write ("duplicate:" response) as CliError::Conflict → exit code 5,
  mirroring `buzz mem`.
- Fix the column-tag parser to parse name/wip/order by key rather than
  fixed index: the 6-element no-wip form (["column",id,"name",<name>,
  "order",<n>]) was reading the trailing order value into wip and losing
  the order, corrupting boards with no-WIP columns on rename/add. Added
  regression tests.

Validation: cargo test -p buzz-core -p buzz-sdk -p buzz-cli (all pass),
relay ingest tests (all pass), and an e2e against the isolated test
relay proving card move LWW (same card id, new column) and the exit-5
conflict surfaced when two moves race (49/60 attempts produced a
conflict; single-winner races show exit 0 + exit 5).

Co-authored-by: Alex Moore <mooorealexandert@gmail.com>
Signed-off-by: Alex Moore <mooorealexandert@gmail.com>
… (Phase 2)

Builds the P2 read path for the kanban feature on top of kanban-phase1
(kinds 31001/31002/31003). Read-only: renders CLI-created boards and cards.

- kinds: add KIND_KANBAN_BOARD/CARD/CARD_MOVE to desktop kinds.ts (mirror of
  buzz-core).
- data layer (features/kanban/lib): kanbanTypes.ts tag parsers keyed by name
  (never index-fixed — same requirement as the P1 no-WIP fix), NIP-33 LWW
  collapse, rank sort via base-36 string compare; boardQueries.ts TanStack
  Query fetchers (boards by kinds:31001, board by #d, cards by #a board ref)
  + live subscription invalidation; useLiveBoard.ts grouping by column.
- rail: BoardRail SidebarSection inserted immediately after Direct messages,
  wired to the sidebar collapse state (uses existing collapsedSections map so
  AppSidebar stays under the file-size ratchet).
- routes: /boards (list) + /boards/$boardId (view), registered in routes.ts
  and routeTree.gen.ts.
- components: BoardList, BoardView, KanbanColumn, CardTile, CardDetailModal
  (read-only; Radix Dialog + Markdown renderer). Disabled "+ New card" /
  Share / Filter affordances defer to P3/P4.
- tests: 5 kanbanType parser tests (columns by name without wip, board/card
  parsing, LWW collapse, title derivation).

Verified: typecheck clean, 3911 desktop tests pass, production build
succeeds, biome + file-size/px-text/pubkey-truncation guards pass. Live GUI
render against a CLI-created board + the shared/invite indexing question are
flagged at the P2 gate for manual confirmation.

Co-authored-by: Alex Moore <mooorealexandert@gmail.com>
Signed-off-by: Alex Moore <mooorealexandert@gmail.com>
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