Skip to content

feat(positron): kanban ViewState contract — the room's work board - #1736

Merged
joelteply merged 2 commits into
canaryfrom
feat/positron-kanban-contract
Jul 3, 2026
Merged

joelteply merged 2 commits into
canaryfrom
feat/positron-kanban-contract

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Unit 3a — the kanban ViewState contract

Advances #89 ("projections first" governing decision) and #117 (positron O1..O6 build-out). After the wall projection landed (Unit 1 contract + Unit 2 runtime projector, merged to canary), kanban is the next non-chat surface genuinely worth a persona perceiving — the persona already grounds chat (WallSource) and its OWN live work (ActiveWorkSource), but NOT the room's full work board. A projected KanbanViewState is a new surface, not a double-grounding of one it already reads.

This PR is the contract only (positron side, pure types), mirroring wall.rs field-for-field. The runtime projector reading airc's work_board() is Unit 3b; the O6 observer grounding it is the unit after.

What's here

  • kanban.rs (new) — KanbanViewState { room_id, lanes, cards }, a first-class positron ViewState routing through the SAME seam renderers + the O6 observer bridge key off for chat/wall.
    • KanbanCardView — title/body/state/priority/lane; CREATOR carries the same identity axes a chat/wall author does (SenderKind + Provenance + opaque integrations, resolved substrate-side); ASSIGNEE is a lighter resolved id+name status pointer; optional PR landing link.
    • KanbanLaneView — named swimlane (planned→done) + its card ids.
    • KanbanCardState / KanbanLaneState / KanbanPriority — positron-neutral enums MIRRORING airc's CardState/LaneState/Priority variant-for-variant (snake_case wire, same serde as airc), so the contract lib stays free of an airc-work dependency. The continuum projector (Unit 3b) maps airc→positron at the seam.
  • kinds.rs — KnownKind::Kanban → wire_name "kanban".
  • lib.rs — module + re-exports.

Discipline

  • REPLACE-on-change projection documented (re-read airc's authoritative work_board() fold, swap whole vectors) so Unit 3b re-reads rather than delta-folds — one board fold, in airc (compression), exactly as the wall projector re-reads wall_posts().
  • Neutral positron: an AI creator is an Agent; whose agent rides integrations, read at the app layer. No airc-work dep.
  • Fail-loud, not default: unclaimed cards serialize with absent assignee/PR — a test pins that (no empty-string/zero placeholders).

Tests (one mod, each with `// what this catches:`)

Round-trip, honest-empty board, unclaimed-card optionality, snake_case wire-vocabulary parity with airc, and the ViewState::kind() single-source assertion. All green (cargo test -p continuum-positron kanban → 12 passed incl. ts-rs export bindings).

🤖 Generated with Claude Code

…fine-once

Unit 3a of the #89 "projections first" governing decision: after wall
(Unit 1 contract + Unit 2 runtime projector, merged), kanban is the next
non-chat surface genuinely worth a persona perceiving. The persona
already grounds chat (WallSource) and its OWN live work (ActiveWorkSource),
but NOT the room's full work board — so a projected KanbanViewState is a
new surface, not a double-grounding of one it already reads.

This unit is the CONTRACT only (positron side, pure types), mirroring
wall.rs field-for-field:

- `KanbanViewState { room_id, lanes, cards }` — top-level `kind="kanban"`
  payload; a first-class positron `ViewState` (routes through the SAME
  seam renderers + the O6 observer bridge key off for chat/wall).
- `KanbanCardView` — one board card: title/body/state/priority/lane, the
  CREATOR carrying the same identity axes a chat/wall author does
  (SenderKind + Provenance + opaque `integrations`, resolved substrate-
  side), the current ASSIGNEE as a lighter resolved id+name status
  pointer, and an optional PR landing link.
- `KanbanLaneView` — a named swimlane grouping (planned→done) with its
  card ids.
- `KanbanCardState`/`KanbanLaneState`/`KanbanPriority` — positron-neutral
  enums MIRRORING airc's `CardState`/`LaneState`/`Priority`
  variant-for-variant (snake_case wire, same as airc's serde), so the
  contract lib stays free of an `airc-work` dependency; the continuum
  projector (Unit 3b) maps airc→positron at the seam.
- `KnownKind::Kanban` → wire_name "kanban".

REPLACE-on-change projection discipline (re-read airc's authoritative
`work_board()` fold, swap the whole vectors) is documented so Unit 3b's
projector re-reads rather than delta-folds — one board fold, in airc
(compression), exactly as the wall projector re-reads `wall_posts()`.

Tests (one mod, each with `// what this catches:`): round-trip,
honest-empty board, unclaimed-card optionality (no assignee/PR
placeholders — fail-loud-not-default), snake_case wire-vocabulary parity
with airc, and the ViewState::kind() single-source assertion.

Advances #89 / #117 (O1..O6). Next: Unit 3b runtime projector reading
airc `work_board()` → KanbanViewState, then O6 grounds the projected
board.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… not Rust Ord

Review of #1736 flagged the word 'ordinal' as implying a Rust ordering
contract that KanbanPriority deliberately doesn't carry — ordering never
crosses the wire; a TS renderer sorts on the string values in declaration
order. Reword to name the scale (P0 highest) and the boundary explicitly.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 2c8769e into canary Jul 3, 2026
4 checks passed
@joelteply
joelteply deleted the feat/positron-kanban-contract branch July 3, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant