Repository navigation
feat(positron): wall ViewState contract — KnownKind::Wall + WallViewState - #1734
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.rsdefines 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-ownedWallPostPublishedrows; 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.[[positron-identity-security-first-class]]— reuses chat'sSenderKind+Provenance+ opaqueintegrationsbadge map, not a duplicate. positron stays neutral: an AI author is anAgent; whose agent ridesintegrations.src/kinds.rs—KnownKind::Wall+wire_name() => "wall"(no default arm, per[[fallbacks-are-illegal-fail-loud]]); extendswire_nametest.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.rswall classification (TranscriptKind::WallPostPublished→ change signal) + spawn wiring, which re-readsAirc::wall_posts()via the existingWallReadertrait.Validation
cargo test -p continuum-positron— green: serde round-trip + honest-empty-board + ts-rs binding export (WallViewState.ts,WallPostView.ts) +wire_nameregression. Contract crate (no llama dep) so no metal features needed.🤖 Generated with Claude Code