Repository navigation
Serve each item record once under page protocol 10 - #3184
Merged
Merged
Conversation
Each view of `/api/state` carried an item's record up to five times: in `document.items` or `thread.items` under `all`, again under `user` and `unanswered`, and again inside its On me or Done row as `item`. The browser already overwrote the row's copy with its own record, so the extra copies only cost bytes and gave `page state` readers two places to look. Now each view serves `items`, one list of records, the document's then its frozen threads'. A widget or approval row names its item by `id` and carries no `title` or record; the publisher joins the row to the current record as before, so `readQueues()` rows still carry `item`. `readItems()` selects `user` and `unanswered` from the records' `next_actor` and `status`, which is what the server's lists held. `thread.user_prompt` is gone too. The thread card reads its thread's items (`readThreadRecords` now hands each thread its `items`) and marks every message holding an open question answered in words "Waiting on me", where it used to mark only the latest; the user's next message answers all of them, so each is waiting. `WorkReading.prompts` and the test of its content version go with it. The protocol moves from 9 to 10, since a page vendored at 9 reads the old fields. On the served-records fixture the view shrinks from 11.6 KB to 9.3 KB. To-do and update rows still carry the few fields a row draws (a to-do's title and running line, an update's stage). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
marked this pull request as ready for review
October 19, 2026 23:28
leaf-agent
approved these changes
Oct 19, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 19, 2026
Main's #3184 served each item record once under page protocol 10, so the served-state schema follows it: a view serves `items`, one list of records; its `document` and `thread` lose their item collections; a widget or approval queue row names its item by `id` with no record or title; a thread loses `user_prompt`. The protocol baseline restarts at 10 from the current contract. The kernel and browser runtime bundle are rebuilt. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 20, 2026
A to-do still reached `page state` and the browser three ways: its record in `todos`, a copy of its title, start and voice in its On me or On <agent> row, and a copy of its title and start line in its thread's `attention.todo`. #3101 kept the row and attention copies because the banner's side panel read them. The banner is gone (#3100), so this change shrinks both to ids, as #3184 did for item rows (now obligation rows, #3196). **Served state.** A to-do row now carries what an obligation row does (`kind`, `id`, `owner`, `subject`, `thread`, `live`), and a thread waiting on a to-do names it by id in `attention.todo` (`served_state/queues.py`, `served_state/browser.py`, `state.schema.json`). **Browser.** The publisher (`localQueues` in `application.ts`) joins each to-do row to its current record as `todo`, as it joins an obligation row as `obligation`. `queueTitle`, the panel's On card and the status explanation read the title and start line from that record. `module-reading.md` says a `readQueues()` to-do row carries `todo`. **Agent instruction.** `conversation-loop.md` now says a row names its obligation or to-do by `id`, and that a to-do's record in `todos` holds its `title` and the start `running` on it. The new eval case `on-lists-read-todo-records` gives the agent a shrunk reading whose `todos` are listed in a different order from the rows, then asks what waits on each side. On Claude Code the merge base passed 2 of 2 and the change 2 of 2, both before and after merging #3196's rename. Agents already joined the rows to their records; the new line keeps the reference accurate. **Protocol 11 → 12**, since a page vendored at 11 reads a to-do row's title from the row. The delivery-format snapshots move with it. Tests: `pnpm run check:framework`, `pnpm run test:runtime`, the model todo, workflow, obligation, activity and fold tests, the interact-contract snapshots, the served-state schema test, and two browser tests (a to-do on the user ending from the panel, and the Plan tab's place line). > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Each view of
/api/statecarried an item's record up to five times: indocument.itemsorthread.itemsunderall, again underuserandunanswered, and again inside its On me or Done row asitem. Thebrowser already overwrote the row's copy with its own record, so the
extra copies only cost bytes and gave
page statereaders two places tolook.
Now each view serves
items, one list of records, the document's thenits frozen threads'. A widget or approval row names its item by
idand carries no
titleor record; the publisher joins the row to thecurrent record as before, so
readQueues()rows still carryitem.readItems()selectsuserandunansweredfrom the records'next_actorandstatus, which is what the server's lists held.thread.user_promptis gone too. The thread card reads its thread'sitems (
readThreadRecordsnow hands each thread itsitems) and marksevery message holding an open question answered in words "Waiting on
me", where it used to mark only the latest; the user's next message
answers all of them, so each is waiting.
WorkReading.promptsand thetest of its content version go with it.
The protocol moves from 9 to 10, since a page vendored at 9 reads the
old fields. On the served-records fixture the view shrinks from 11.6 KB
to 9.3 KB.
To-do and update rows still carry the few fields a row draws (a to-do's
title and running line, an update's stage).