Skip to content

One collapse contract for every view: kanban, wall and roster declare only their shape (card 00f719c0) - #5828

Merged
joelteply merged 1 commit into
canaryfrom
fable/views-collapse-contract
Nov 7, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fable/views-collapse-contract

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Card 00f719c0, follow-up to #5827 (merged). This serves the residents' speed and focus (path step 1 "Fast", order-of-work line 2). Joel's requirement: "the system will be smart about collapsing and all positronic controls collapse easily without having to independently manage this at each consumer". Every activity's views have to collapse the same way, so this PR delivers the generic contract, and the kanban, the wall and the roster are its first adopters.

The contract (continuum_context::nav)

An adopter declares only its shape, one Entry per subject:

RagRenderUnit::new(post.post_id, content, meta)               // typed key, whole, provenance
    .summary(first_line)                                       // optional; else derived by `levels::summarize`
    .pointer(format!("[wall post {id} ({cat}): persona/wall/list]"))
    .in_group(Group { label: "ledgers", expand: Expand::verb("persona/wall/list"), fold: Fold::Recent }, post.published_at_ms)

(A Need::Focus entry simply omits .in_group.) The rest comes free from nav::collapse and her view, the same for every view:

  • Her focus is whole and last (newest), so the allocation keeps it whole longest.
  • Each group shows its most recently changed standing(n) entries on their own. standing(n) is ⌈√n⌉, the geometric-mean rung levels already uses, not a fixed number. The rest of the group is ONE Node, with its count and the typed command that opens it, e.g. ▸ claimable (185) → \work/list claimable=true``. That is the same command a person's click maps to.
  • A Fold::All group (history) shows only its node.
  • Node counts are tallies, ordered after the body.
  • Supersede-on-key, ending what left, per-item levels in the act's one allocation, and the oldest-run fold (Source::fold, also a Node) all come from context_streams::blocks (Views are state: the board and the wall are keyed items in collapsed navigation (card 00f719c0) #5827).

In continuum-mind a view returns its entries and calls viewstate_rag::rag_items. That is collapse plus the ONE RagItem conversion, shared by every ViewState source, the board, the wall and who-is-here.

Adopters: shape only, with no collapse code of their own

  • Kanban (RoomBoardSource): declares its groups (claimable, held by others, merged/closed as Fold::All). Its own sorting, standing and node code from Views are state: the board and the wall are keyed items in collapsed navigation (card 00f719c0) #5827 is deleted.
  • Wall (WallSource): the posts the room pinned are her focus; card ledgers are the ledgers group, ordered by publish time.
  • Outlier B, the roster (people and presence, not cards): attached members are her room (focus); paged-out members are the away group, ordered by last_seen_ms. A test folds 9 away members into ▸ away (6) → \room/members`` with the 3 most recently seen standing. Changing one member's role changes only that member's keyed item. The roster has no collapse code of its own.

Positron nav state

NavViewState (continuum-positron/src/nav.rs) holds per-citizen tabs over rooms, content and personas (nav/select, nav/close, last_read). It has no item-level fold or expand. This PR adds no parallel tab model: a node's expand is a typed command a person's click issues too. Follow-up (owner Fable): persist expanded/collapsed nodes as typed nav/expand/nav/collapse on NavViewState for a view key, and use last_read[room] as the recency anchor.

Measured

Real-board replay (context_streams::blocks::tests::real_boards_are_collapsed_navigation_and_a_change_appends_only_its_cards) now declares the captured boards through nav::collapse. The results are unchanged from #5827:

  • Benchy: 47.3% → 2.0% of the prompt (build 19426f4).
  • Atlas: 57.6% → 6.1%.

The live 15-minute read on the M5 (board share and prefix reuse) is owned by Fable after deploy. Card 00f719c0 stays open until it is posted.

Validation (canary ef00698 + #5827 + this commit)

  • continuum-context --lib --examples: 103 + 21 ok.
  • continuum-cognition --lib (test-fixtures,metal): 967 ok.
  • continuum-mind --lib (CI's skip): 1107 ok.
  • continuum-mind --doc BindingIsUnstatable: 2 passed.
  • continuum-core mind_integration::registry: 45 ok, 1 failing: pinned_act_result_reaches_the_prompt_even_with_an_empty_broadcast (expect("saved inventory")). It fails identically on plain canary on this host.
  • Source-hygiene ratchets vs canary: every count unchanged, 87/87.

Ratchet: positron ViewState kinds that are not context Sources

13 → 10 (kanban, wall, roster), updated in MIND-CONTEXT-AND-ENGINE-CONFIG.md along with the adopter recipe.

422 insertions, 238 deletions. Deleted: the board's bespoke group, sort, standing and node code; the separate rag_item(RagRenderUnit) struct conversion; the unread kind/block metadata stamping.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

… only their shape

continuum_context::nav is now the contract (Joel: "all positronic controls collapse easily
without having to independently manage this at each consumer"). A view declares Entries: a
typed key, its whole, an optional summary (else derived by levels), its pointer, and its Need
(Focus, or a member of a Group { label, expand, fold } with its recency). nav::collapse does the
rest for every view: focus whole and last, each group's most recently changed standing(n)
entries plus ONE Node (count + typed expand command), Fold::All history as its node only.

- viewstate_rag: RagRenderUnit is nav::Entry; rag_items() = collapse + the one RagItem
  conversion, shared by every ViewState source, the board, the wall and who-is-here. Dropped the
  unread kind/block metadata stamping.
- RoomBoardSource: declares its groups (claimable, held by others, merged/closed as Fold::All);
  its own sorting/standing/node code is deleted.
- WallSource: pinned posts are her focus; card ledgers are the "ledgers" group by publish time.
- Outlier B, the roster (people, not cards): attached members are focus, paged-out members the
  "away" group by last seen; it folds into `▸ away (6) → room/members` with no code of its own.

Real-board replay unchanged: Benchy 47.3% -> 2.0%, Atlas 57.6% -> 6.1%.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 2ecd0a5 into canary Nov 7, 2026
18 checks passed
@joelteply
joelteply deleted the fable/views-collapse-contract branch November 7, 2026 15:40
joelteply added a commit that referenced this pull request Nov 7, 2026
…ards whole, each group's recent cards, one fold per group (card e0b2b5b1)

On the M5 (2026-11-07) work/list returned 241,460 chars (~80,884 tokens) as a
summary plus a handle, while the same board in her view was collapsed
navigation (#5827/#5828). The tool and the view now declare the board through
one owner:

- `persona::board_nav::group_of` (new): which group a card sits in off her
  focus and the `work/list` that opens it. `room_board_source` and `work/list`
  both call it (the closure in room_board_source is deleted).
- `work/list` with no filter: `continuum_context::nav::collapse` over the
  board, so her cards come back whole, each live group's most recently changed
  cards stand (nav::standing), and the rest of each group is one `folded`
  line naming the call that lists it whole. With a filter it is that group
  opened, whole.
- `nav::Origin::Node` carries its typed `Expand`, so a structured consumer
  never re-derives the command (viewstate_rag also records it).
- The "held by others" fold now opens with `work/list claimable=false` (before,
  plain `work/list`, which would now return the nav again, not the group).
- Deleted the per-tool truncation: `WorkListParams::limit`, its truncate and
  its note.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 7, 2026
…ards whole, each group's recent cards, one fold per group (card e0b2b5b1)

On the M5 (2026-11-07) work/list returned 241,460 chars (~80,884 tokens) as a
summary plus a handle, while the same board in her view was collapsed
navigation (#5827/#5828). The tool and the view now declare the board through
one owner:

- `persona::board_nav::group_of` (new): which group a card sits in off her
  focus and the `work/list` that opens it. `room_board_source` and `work/list`
  both call it (the closure in room_board_source is deleted).
- `work/list` with no filter: `continuum_context::nav::collapse` over the
  board, so her cards come back whole, each live group's most recently changed
  cards stand (nav::standing), and the rest of each group is one `folded`
  line naming the call that lists it whole. With a filter it is that group
  opened, whole.
- `nav::Origin::Node` carries its typed `Expand`, so a structured consumer
  never re-derives the command (viewstate_rag also records it).
- The "held by others" fold now opens with `work/list claimable=false` (before,
  plain `work/list`, which would now return the nav again, not the group).
- Deleted the per-tool truncation: `WorkListParams::limit`, its truncate and
  its note.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 7, 2026
…ards whole, each group's recent cards, one fold per group (card e0b2b5b1)

On the M5 (2026-11-07) work/list returned 241,460 chars (~80,884 tokens) as a
summary plus a handle, while the same board in her view was collapsed
navigation (#5827/#5828). The tool and the view now declare the board through
one owner:

- `persona::board_nav::group_of` (new): which group a card sits in off her
  focus and the `work/list` that opens it. `room_board_source` and `work/list`
  both call it (the closure in room_board_source is deleted).
- `work/list` with no filter: `continuum_context::nav::collapse` over the
  board, so her cards come back whole, each live group's most recently changed
  cards stand (nav::standing), and the rest of each group is one `folded`
  line naming the call that lists it whole. With a filter it is that group
  opened, whole.
- `nav::Origin::Node` carries its typed `Expand`, so a structured consumer
  never re-derives the command (viewstate_rag also records it).
- The "held by others" fold now opens with `work/list claimable=false` (before,
  plain `work/list`, which would now return the nav again, not the group).
- Deleted the per-tool truncation: `WorkListParams::limit`, its truncate and
  its note.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 7, 2026
…ards whole, each group's recent cards, one fold per group (card e0b2b5b1)

On the M5 (2026-11-07) work/list returned 241,460 chars (~80,884 tokens) as a
summary plus a handle, while the same board in her view was collapsed
navigation (#5827/#5828). The tool and the view now declare the board through
one owner:

- `persona::board_nav::group_of` (new): which group a card sits in off her
  focus and the `work/list` that opens it. `room_board_source` and `work/list`
  both call it (the closure in room_board_source is deleted).
- `work/list` with no filter: `continuum_context::nav::collapse` over the
  board, so her cards come back whole, each live group's most recently changed
  cards stand (nav::standing), and the rest of each group is one `folded`
  line naming the call that lists it whole. With a filter it is that group
  opened, whole.
- `nav::Origin::Node` carries its typed `Expand`, so a structured consumer
  never re-derives the command (viewstate_rag also records it).
- Every fold opens EXACTLY its group: `board_nav::BoardGroup` (claimable,
  held_by_others, merged, closed) is the typed group, `group_of` returns it,
  each node's call is `work/list group=<its group>`, and the `group` selector
  filters through `group_of` itself (Cormac on #5843: a `claimable=false` call
  behind "held by others" also returned her cards and every merged and closed
  card). `work/list`'s filters are one `Selector`.
- Deleted the per-tool truncation: `WorkListParams::limit`, its truncate and
  its note.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Nov 14, 2026
…e0b2b5b1) (#5843)

* Her newest result is irreducible at its whole; past the window it is its first page of content, never a summary and a handle (card 8a12dcd1)

Goal 7: her newest result is the step that ends her recursion. On the M5
(2026-11-07) it came in as a summary plus a handle 159 times in a day, about
105 follow-on acts re-read it, and 52 of those reads were themselves too large
and came back as another summary and handle.

The allocation (continuum-context `allocation::newest`, the one owner):
- `Newest` (Absent | Whole | Pageable { whole, least }) replaces the newest
  result's ladder of summary levels. It is chosen before the search against
  every other part at its hard limit, so her tools, grounding, view and older
  history collapse first and it is whole whenever the window holds it.
- Past that it is its FIRST PAGE, cut to the room left beside every hard limit,
  her reply's whole want and her grounding's handles; never below its least
  page (its note plus as much content as the note). While it pages, each held
  head level that fits beside her LEAST page stays (framing, then tools: a head
  change re-prefills her whole prompt, and a page needs no particular size);
  only one that cannot fit drops to its hard limit, loudly, and the page takes
  what the kept levels leave (Cormac on #5840). Grounding sits at its handles.
- A page binds the irreducible sum at its least page, never at the page.

The renderer (continuum-cognition `prompt/newest_result.rs`): measures whole
and least page, renders the granted page as her result's own content from its
start, cut at a line end (or inside an over-long first line), with a note naming
the call that reads on (`Reopen::Lines` / `Reopen::Bytes`) in the saved output
that slot IS (her call's own custody handle). The page is cut once her view is
fitted, to its grant and never more than the fit actually has beside the rest.

Copies migrated/deleted: the summary ladder (`level_newest`,
`newest_result_levels`, `too_large_note`), view.rs's level-index-to-cost
mapping, `ActPlan::newest_level`, the newest's entry in `chosen`.

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

* work/list returns the board's nav from the owner her view uses: her cards whole, each group's recent cards, one fold per group (card e0b2b5b1)

On the M5 (2026-11-07) work/list returned 241,460 chars (~80,884 tokens) as a
summary plus a handle, while the same board in her view was collapsed
navigation (#5827/#5828). The tool and the view now declare the board through
one owner:

- `persona::board_nav::group_of` (new): which group a card sits in off her
  focus and the `work/list` that opens it. `room_board_source` and `work/list`
  both call it (the closure in room_board_source is deleted).
- `work/list` with no filter: `continuum_context::nav::collapse` over the
  board, so her cards come back whole, each live group's most recently changed
  cards stand (nav::standing), and the rest of each group is one `folded`
  line naming the call that lists it whole. With a filter it is that group
  opened, whole.
- `nav::Origin::Node` carries its typed `Expand`, so a structured consumer
  never re-derives the command (viewstate_rag also records it).
- Every fold opens EXACTLY its group: `board_nav::BoardGroup` (claimable,
  held_by_others, merged, closed) is the typed group, `group_of` returns it,
  each node's call is `work/list group=<its group>`, and the `group` selector
  filters through `group_of` itself (Cormac on #5843: a `claimable=false` call
  behind "held by others" also returned her cards and every merged and closed
  card). `work/list`'s filters are one `Selector`.
- Deleted the per-tool truncation: `WorkListParams::limit`, its truncate and
  its note.

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

* Files this change touches leave clean: owner match by is_some_and, the board-read mark threshold and the ViewState wire decode say why

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

* work/list's select and listed take any iterator, and the nav entry's copies are taken before the card moves in: no new contract_shape sites

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

* The agentic surface ceiling moves 17986 -> 18094 for work/list's typed group, measured in CI

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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