Skip to content

feat(positron): NavViewState contract — the define-once navigation state (nav slice 1) - #1830

Merged
joelteply merged 1 commit into
canaryfrom
feat/nav-viewstate-contract
Jul 5, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/nav-viewstate-contract

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

First brick of docs/design/NAVIGATION-ACROSS-MODALITIES.md. The neutral, per-CITIZEN nav view (sibling to
the per-room chat/wall/kanban views) that every surface renders in its own idiom — desktop panels, phone
tabs+push, terminal keys, persona MENU — and the web additionally projects onto the URL:

  • NavViewState { user_id, current_tab?, open_tabs[], last_read: map, bookmarks[] }, kind="nav".
  • NavTab { id, title, kind, unread } — unread DERIVED from last_read at projection, not stored twice.
  • NavTargetKind { Room | Content | Persona }; NavBookmark { target, label, kind }.
  • last_read[room] is the KEYSTONE dual-consumer row: human unread badge AND the persona's RAG "what's new
    since I last looked" cursor (the bookmark ChannelDigest already keeps). One write path, two readers.

Mirrors the kanban/wall contract pattern exactly (open self-registered KIND, ts-rs mirror, structs-not-
Value). ts-rs exports NavViewState/NavTab/NavBookmark/NavTargetKind with last_read as Record<string,number>
(no u64→bigint drift). 6 tests green. NEXT: positron_nav_source projector (re-read airc scoped-state #89,
like kanban) + markRead command + web render.

Co-Authored-By: Claude Opus 4.8 [email protected]
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ate (nav slice 1)

First brick of docs/design/NAVIGATION-ACROSS-MODALITIES.md. The neutral, per-CITIZEN nav view (sibling to
the per-room chat/wall/kanban views) that every surface renders in its own idiom — desktop panels, phone
tabs+push, terminal keys, persona MENU — and the web additionally projects onto the URL:

- NavViewState { user_id, current_tab?, open_tabs[], last_read: map, bookmarks[] }, kind="nav".
- NavTab { id, title, kind, unread } — unread DERIVED from last_read at projection, not stored twice.
- NavTargetKind { Room | Content | Persona }; NavBookmark { target, label, kind }.
- last_read[room] is the KEYSTONE dual-consumer row: human unread badge AND the persona's RAG "what's new
  since I last looked" cursor (the bookmark ChannelDigest already keeps). One write path, two readers.

Mirrors the kanban/wall contract pattern exactly (open self-registered KIND, ts-rs mirror, structs-not-
Value). ts-rs exports NavViewState/NavTab/NavBookmark/NavTargetKind with last_read as Record<string,number>
(no u64→bigint drift). 6 tests green. NEXT: positron_nav_source projector (re-read airc scoped-state #89,
like kanban) + markRead command + web render.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit a5889bd into canary Jul 5, 2026
@joelteply
joelteply deleted the feat/nav-viewstate-contract branch July 5, 2026 17:21
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