Skip to content

Serve each item record once under page protocol 10 - #3184

Merged
max-sixty merged 1 commit into
mainfrom
items-served-once
Oct 19, 2026
Merged

max-sixty merged 1 commit into
mainfrom
items-served-once

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

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).

This was written by Claude Code on behalf of max-sixty

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
max-sixty marked this pull request as ready for review October 19, 2026 23:28
@max-sixty
max-sixty merged commit dd48659 into main Oct 19, 2026
4 checks passed
@max-sixty
max-sixty deleted the items-served-once branch October 19, 2026 23:34
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants