Skip to content

feat(positron): wall ViewState contract — KnownKind::Wall + WallViewState - #1734

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

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

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Unit 1 of task #89 (non-chat ViewState projections). The positron-side contract for the room wall — its pinned shared documents (plan, rules, agenda, recipe) — so the wall widget is defined once for web, terminal, mobile, and AI-observer surfaces, exactly as chat.rs defines the chat contract independently of its projector.

What this is

  • src/wall.rs — WallViewState { room_id, posts: Vec<WallPostView> } + WallPostView (post_id, room_id, category, author identity axes, body, timestamp). A VIEW onto airc-owned WallPostPublished rows; airc's supersede projection (Airc::wall_posts) is the truth, re-read on change — never re-folded here (compression: one supersede impl, in airc). REPLACE-on-change so an unpin shows as absence.
  • Attribution woven in from day one per [[positron-identity-security-first-class]] — reuses chat's SenderKind + Provenance + opaque integrations badge map, not a duplicate. positron stays neutral: an AI author is an Agent; whose agent rides integrations.
  • src/kinds.rs — KnownKind::Wall + wire_name() => "wall" (no default arm, per [[fallbacks-are-illegal-fail-loud]]); extends wire_name test.
  • src/lib.rs — pub mod wall + re-export.

Scope boundary

Pure contract — no bus/airc wiring. That's Unit 2: the runtime projector (ipc/positron_wall_source.rs) + inbound_attach.rs wall classification (TranscriptKind::WallPostPublished → change signal) + spawn wiring, which re-reads Airc::wall_posts() via the existing WallReader trait.

Validation

cargo test -p continuum-positron — green: serde round-trip + honest-empty-board + ts-rs binding export (WallViewState.ts, WallPostView.ts) + wire_name regression. Contract crate (no llama dep) so no metal features needed.

🤖 Generated with Claude Code

…tate

Unit 1 of task #89 (non-chat ViewState projections). The positron-side
*contract* for the room wall — its pinned shared documents (plan, rules,
agenda, recipe) — so the wall widget is defined once for web, terminal,
mobile, and AI-observer surfaces, exactly as chat.rs defines the chat
contract independently of its projector.

- src/wall.rs: WallViewState { room_id, posts: Vec<WallPostView> } and
  WallPostView (post_id, room_id, category, author identity axes, body,
  timestamp). Attribution woven in from day one per
  [[positron-identity-security-first-class]] — reuses chat's SenderKind +
  Provenance + opaque integrations badge map, not a duplicate (compression).
  A VIEW onto airc-owned WallPostPublished rows; the airc supersede
  projection (Airc::wall_posts) is the truth, re-read on change — never
  re-folded here. REPLACE-on-change so an unpin shows as absence.
- src/kinds.rs: KnownKind::Wall + wire_name() => "wall" (no default arm,
  per [[fallbacks-are-illegal-fail-loud]]); extends the wire_name test.
- src/lib.rs: pub mod wall + re-export WallViewState/WallPostView.

Pure contract — no bus/airc wiring (that's Unit 2: the runtime projector
in ipc/positron_wall_source.rs). Fully unit-tested: serde round-trip +
honest-empty-board + ts-rs binding export.

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

Review found the one real mirror gap: ChatViewState impls ViewState but
WallViewState didn't — so wall state could be framed into an envelope but
not handled anywhere generic over `dyn ViewState`/`P: ViewState`, which is
exactly what renderers (LitHost) and the O6 observer bridge route off.

- impl positron_core::ViewState for WallViewState: kind() single-sources
  KnownKind::Wall.wire_name(); revision() stays the trait default (None) —
  the wall revision is an envelope-level counter, never a payload field
  ([[compression]]). Mirrors chat.rs verbatim.
- guard test wall_view_state_is_a_positron_view_state pinning
  kind()=="wall"==wire_name() + revision()==None (the drift regression).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit bd297d5 into canary Jul 3, 2026
2 checks passed
@joelteply
joelteply deleted the feat/positron-wall-contract branch July 3, 2026 04:59
@github-actions github-actions Bot added size: L and removed size: M labels Jul 3, 2026
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