Repository navigation
Make Questions and Threads two doors to one side panel, walked with q - #2051
Conversation
Adds notes/what-needs-you: a Leaf page proposing six directions for tracking what the user owes the agent and what the agent owes the user (total turn, one queue, loops, a ledger in the page, page rounds, and review passes), with a recommendation for loops, and research.md holding the evidence behind it: prior art across review tools, agent harnesses and the theory of commitments, a hand classification of 169 real Leaf threads, and each mechanism's falsifier measured on the logs. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…and what loops keep Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Each flow (a background subagent, a dispatch to another session, a mixed message resolved at once) lists its events and a sequence diagram, then a tab per model showing what each step leaves on the user's list and the agent's. Tracing the dispatch showed C's hand-off closed the request and unblocked its Ask before the result existed, so handing now moves the request to the receiving session. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The per-model tabs hid the comparison: each flow is now one table at the available width, a row per event and a column per model, with cells that lose work or depend on the agent tinted. Below 900px the rows stack, each cell labelled with its model. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
C's cells said "answer: pulse", after its drawer heading, which read as something other than the pulse Ask the other columns list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A wide table names each model's record, where it lives, what counts as on the user and on the agent, and the verbs each item offers; four JSON tiles show the query's answer at flow 2, step 6. Today's answer spans asks, workflows and the browser-only thread attention. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Directions, Flows, What changes and Evidence, with each flow's sequence diagram folded above its table. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…uestion Adds a Plan tab proposing Pi Durable's task as the one record behind both queues (yours and the agent's), shipped in four steps, and rebuilds the Compare tab around timelines answering: is running work on the agent, what one item spans across a back-and-forth, and how many items one message makes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Adds `leaf task open PAGE THREAD TITLE` and `leaf task end PAGE TASK done|failed|dropped [DETAIL]`, written as new `task` and `task_end` log kinds (tasks.py owns the fold, the door's gate and the writers). A task stands on an open thread until its outcome is written: a reply, a resolution, a version or the end of the session leave it open, which is what holds work that outlasts the turn that took it on. Behavior that moved: - A thread an open task holds reads `waiting` with reason `task` when no workflow holds it; its card reads "Task open", and the margin and Page Map carry that label. - The banner's explanation names every open task, so one on a thread the user resolved stays visible. - `leaf page state` carries each thread's `attention`, the open `tasks` (also per thread in `page state PAGE THREAD`), and `queues`: `on_you` (open Asks, prose questions, failed responses) and `on_agent` (owed answers, claimed work, open tasks), selected from readings the served state already makes. - A waiting card whose attention names no workflow no longer folds its status (thread-card.js matched undefined ids). - conversation-loop.md tells the agent to open a task for work that outlasts the turn and end it when the result lands; the new eval case task-outlasts-the-turn scored base 0/2, change 2/2 on Claude Code. Tests that asserted the exact `page state` thread shape now include `attention`. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The page now covers only the task model: what is built, the task record and its states, the two queues, the cases a task keeps, the evidence behind it, and an Ask for the next step. The six directions, the B/C/D comparisons and the prior-art survey are gone from the page; research.md keeps the research. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The user wants "item" left arbitrary for now, so the page no longer lists the kinds as a fixed table; it names today's sources and says the set isn't a contract. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Answers the user's page comments: a table of the five records that hold someone to something (Ask, prose question, owed reply, claim, task), how each is registered and what it looks like, how they meet today, and how Pi Durable separates message delivery from work. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The user set the model in a page thread: an Ask parallel to a task, a queue each, either side adding to the other's, and a paging through the user's queue. The plan now runs from that, and the superseded step Ask is kept settled under finished work. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The banner's explanation switched to a bare count once a third task opened, so a task on a thread the user had resolved lost the one place that named it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # notes/what-needs-you/page.html
`a` and Shift+a now page through everything on the user, in page order: each open Ask, each other thread whose attention is the user's (a question left in prose, a failed reply to send again), and each page move handed back to them. A thread holding an open Ask is reached once, as that Ask. `t` still walks every open thread. The banner's status sentence ends with "N on you · M on <agent>", and its disclosure names the kinds. What is on the user has one rule, now stated on both sides of the wire: `agent_state.queues` selects it from the served Asks, thread attention, workflows and tasks, and `runtime/queues.js` selects the same items from the publisher's reading of those four, which already folds this tab's sends into attention. The publisher carries the result as `effective.queues`. `served_records.py` folds a reading both selections must agree on, and a runtime test holds them to it. The Python rule changed to list a thread once: a thread with a failed reply is one `recovery` item named by the thread, and a page widget's failed move stays a `recovery` item of its own. Arrival stays with each item's owner. `queue-walk.js` replaces the Ask walk (`ask.walk` becomes `queue.walk`): an Ask arrives through the Ask view's `arriveAtAsk`, the drawer's arrival, and a thread through the arrival the t walk makes (`navigation.js`, `arriveAtThread`), so a change to where a walked thread lands applies to both walks. The walk announces "Ask 2 of 3 waiting on you" or "Thread 1 of 3 waiting on you". The render gate's Ask screens walk past the threads `a` now stops at. Behaviour the tests moved: - The Ask walk's position reads "waiting on you" where it read "open", and the command reference names the walk "Ask or thread waiting on you". - Two narrowing tests press Shift+a: the thread the list shows waits on the user too, so the hidden Ask now stands before the user's place. - Status sentence and disclosure assertions include the queue counts. - The status-press test grows its sentence to "running tests", since the counts now share the row at 390px. - Two widget tests wait for the arrival's glide before reading where it started; they read the scroll mid-glide and failed on main too. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…n it is sent
Follows the review of the queue walk.
The banner's row gives the agent's side only as the queue count. The
delivery counts ("1 waiting", "1 queued") and "N saved" leave the row; the
disclosure keeps them, and names each open task's title inside the "Waiting on
<agent>" sentence instead of an "Open tasks" one. The counts stand in their own
span after the sentence, inside the same press, at their own width, so a long
sentence truncates before them. The status box declares itself a text reflow
region: the sentence and the counts repack inside it as news rewrites either.
The shift watch let a text region's controls neither grow nor shrink; it now
holds them to what it holds every box to, staying put without being carried,
so a press growing at its trailing edge is allowed and a carried one is not.
A thread message this tab is still sending is an `answer` on the agent's queue,
with no answer named and the stage `sending`, so a reply leaves the user's
count and joins the agent's in the same turn. A widget move still sending
owes nothing yet, and the Ask it answers stays open until the server says so.
The walk's position names its whole list and then the kind it stands on:
"3 of 4 waiting on you · Thread". The command descriptions, the shipped
references and the gallery name the third kind of item, a move to send
again.
`served_records.py` now folds claimed work and a page move whose pickup failed
into the reading both queue selections must agree on; `model_folds.reading`
takes the status store's work claims to do it. The stage check for work under
way has one home, `thread/workflow.js` `atWork`, which the queues, the live
workflow check and the margin's receipt face read. Comments that still named
the Ask walk name the queue walk.
Behaviour the tests moved:
- Status row assertions drop "· N waiting" and "· N saved" and read the counts
from `.lf-status-queues`; disclosure assertions include the queue sentence.
- The status-press test checks the counts stay whole when the sentence
truncates at 390px.
- The queue walk test holds the reply's POST and sees both counts move
before it answers.
- Walk positions read "N of M waiting on you · Ask".
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…n the test The queue counts leave the status press and stand at the trailing edge of the status room, beside the banner's controls, at their own width. That edge never moves, so a changing agent sentence cannot carry the counts and a changing count grows them leftward only, which the stability contract already allows; the sentence still gives up its room to the ellipsis first. The previous commit's text reflow region on the status, and the shift watch change it needed, are gone: the shift watch is as it was on main. Inside the banner's control row the counts would not fit beside Approval, which leaves about 84px at 1280px. test_a_thread_says_what_the_agent_is_doing_about_it has failed since #1694, which holds news that would move an open short panel thread behind the card's news notice. The test appended the user's follow-up and the agent's answer straight to the log, so both waited behind that notice and never drew. The follow-up is now sent from the card, as the user's own words show at once, and the test opens the notice for the agent's answer before reading it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/runtime/navigation.js # skills/leaf/assets/runtime/reading-place.js # tests/test_render_startup.py
The queue counts at the status row's trailing edge grew leftward when a count changed, so their words moved. Chrome reported that as a layout shift, and the shift watch then audited the whole frame and caught a panel motion it misses on main: a reaction arriving from another tab grows an open short card in the Threads panel by 28px (its reaction strip is not held behind the news notice), and the filter labels widen by 2px. That defect is main's and is left as it is. The counts now take the idiom every generated control with changing words takes (`reserve`, as Threads does for "Threads: 999"): their box keeps the width of the counts they usually reach, under ten a side, and their words start at its fixed leading edge. A count changing moves none of them, and a sentence changing reaches them only as the press's ellipsis. The status-press test grows its sentence to "testing", which fits beside the reserved box at 390px. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…pdates to their input Two narrowing tests failed under the typed-words check from #1707, on main as well as here: walking to an Ask whose thread a Threads search hides clears the search, and the check said the words left with no key. Both sides of that were wrong, and each fix alone leaves the tests red. The runtime reached the Ask after `await materializeAsk(...)` even when the Ask's nodes already stood, so the reveal that widens the narrowing, and clears the search the user typed, ran after a native await, outside the key's turn. `materializeAsk` now answers at once for an Ask that stands and returns a promise only when the thread's markup has to be built, so the arrival, and what it does to the page, is the key's doing in its own turn. The check's causal tracking did not follow reactive element updates. Lit's `requestUpdate` defers the update behind a native await, so a Web Awesome field redrawn for a key, as the Threads search is, lost its cause. `input_work_watch.js` now records the source of the request that starts an update and runs `scheduleUpdate` under it, for every element class that defines Lit's update lifecycle. New tests in `test_render_words_watch.py` hold a key's deferred update as the key's and keep the same update with no input behind it a loss. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ve update by its connection Follows the final review of the queue walk. A follow-up the user sends in a thread the agent already owes counted as a second `answer` while its POST was in flight, so "N on Claude" read N+1 and then N once the server answered: the server owes a thread one answer, to its latest move. A thread message still being sent now takes the place of the served answer for its thread in `selectQueues`. The runtime test and the held-POST browser test both cover the follow-up. `input_work_watch.js` credited an element's first update to whatever made it, though Lit holds that update until the element is connected: an element made under a key and connected by passive work had its first update credited to the key. Connecting the element now names that update's source. The negative words test gains that case. The queue counts' digits are tabular, and their reserved box only grows while the page is open, so counts past nine a side widen it once instead of moving on every change. `materializeAsk` is now only the thread materialization, awaited where an Ask's nodes are missing, beside a synchronous lookup. Comments no longer place the counts beside the banner's controls: at desktop width they end the status area, mid-banner. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The What needs you page gets a Top bar and keys tab. It lists where the top bar and the keys present the Threads and Queue panels differently, each checked on a served page, and asks which of three top bars to build: today's, matching doors over each panel, or matching doors with both panels on the right. It proposes pairing each panel with its walk: g A opens Tasks as g T opens Threads. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A bare "Tasks: 3" doesn't say whose the three are. The Top bar and keys tab now lists what can be on each side and offers four pairs of names, recommending Decisions for the user's side and Claude's tasks for the agent's; the model's one task record keeps its name in the code. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The user picked Decisions for their side and Tasks for the agent's. The naming Ask becomes a record of that choice, and the sketches and key notes say Decisions. A new Ask weighs obligation, commitment and item as the name of the record both sides share, which frees task for the agent's side and from the harness's task. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The user decided that Task on the page means the agent's side while task stays the name of the record both queues share. The page records that in place of the Ask for a new name, and a TODO keeps the rename, with the candidates weighed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The top bar presented the two panels as different kinds of thing: Threads had a labelled toggle over its panel on the right, while the queue's door was bare counts in the middle opening a drawer on the left, with no open state and no go-to chip. The user picked matching doors with both panels on the right, and named the sides Questions (what's on the user) and Tasks (what's on the agent). - The banner ends with "Questions: N" beside "Threads: N" on the row, in the Threads toggle's face; the agent's "Tasks: N" follows the status. - The Questions panel (formerly the Queue panel) opens on the right edge at the thread panel's width and by its handle. Selecting one in the other's place swaps them without a slide: auxiliary surfaces now declare their edge. - Its groups are Questions, Tasks and Done; a thread question's row says Thread and a task on the user says To do. - The queue walk moves from a/A to q/Q, since d already pages down and the walk should carry the name's letter, as t does for Threads; g Q still opens the panel, and its head gains Next question as Threads' has Next unread. The arrows now step thread titles in the Threads panel, as they step rows in Questions. - What is laid out beside the page reads the right edge's cover from the declared occluders (`geometry.rightCover`), so the comment box keeps clear of whichever side panel is open, and the Page Map offer sees a margin row either one hides. In the code both sides stay tasks; renaming the shared record is in TODO.md. Tests move to the new words, keys and placement, with new ones for Next question and the thread-title walk. The shipped references and eval prompts change only the key letter and the panel's name, so no guidance eval was run. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # docs/how-it-works.html # skills/leaf/assets/runtime/auxiliary-surfaces.js # skills/leaf/assets/runtime/banner-status-view.js # skills/leaf/assets/runtime/banner-toolbar.js # skills/leaf/assets/runtime/banner.js # skills/leaf/assets/runtime/chrome.css # skills/leaf/assets/theme.css # tests/test_render_controls.py
The banner's mount marked the Questions door as offered-only news and hid it, so it vanished until a question arrived; it is now an ordinary control. The review's fixes word comments and titles for Questions and Tasks, keep the comment composer clear of whichever panel covers the right edge, and drop the leftover queueOffered plumbing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # .claude/skills/developing-leaf/references/glossary.md # TODO.md # skills/leaf/assets/runtime/banner-toolbar.js # skills/leaf/assets/runtime/thread/panel.js # tests/test_render_navigation.py # tests/test_render_threads.py
Main's Comment on the page joins the desk row at rank 105, so Questions moves to 107 and stays beside Threads, and on a phone all three wait at the head of More. The Tasks count's room is the 4em "Tasks: 9" measures, which keeps the banner one row at 800px with the extra door. The Questions door claims no count before the log's first answer, as the Threads door claims none. In the go-to sequence, the door to the surface that stands now leads the line, so its close stays in reach when the panel narrows the line, and owners' destinations rank before the fixed doors, so Resume writing, which the kept draft's notice names, is not the first hint a narrow line drops. Tests follow: the phone's Questions door is behind More, the disclosure-focus case runs at a width the panel stands beside, the margin-card case runs wide enough to keep its marker clear of the right-edge panel, and an informational page's row now holds Questions. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The door already withheld its count until the first answer, but a press opened the panel on an empty reading that said "Questions · 0" and "No questions for you." It now names its two lists without counts and says it is loading, as Threads does. Stale names in comments and TODO.md follow the Questions rename. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
On a phone the Questions door waits behind More, which says a question is there as it says an approval is open, so tests on pages with open Asks find More as "More page controls, questions waiting". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # .claude/skills/developing-leaf/references/glossary.md # skills/leaf/assets/leaf.js # skills/leaf/assets/runtime/auxiliary-surfaces.js # skills/leaf/assets/runtime/chrome-layout.js # skills/leaf/assets/runtime/chrome.css # skills/leaf/assets/runtime/drawers.js # skills/leaf/assets/runtime/keyboard/go-to-sequence.js # skills/leaf/assets/runtime/queue-panel.js # skills/leaf/assets/runtime/queue-walk.js # skills/leaf/packages/default/runtime/annotation-overlay/composing/floating-response.js # skills/leaf/references/authoring-asks.md # tests/_regtest_outputs/test_interact_contract.test_each_case_of_an_event_is_told_what_the_snapshot_shows__0/snapshot.yaml # tests/test_chrome_contracts.py # tests/test_render_controls.py # tests/test_render_options.py
A conflict resolution mangled the drawer-door check that no dialog is modal once the drawer closes; it reads the native modal dialog again. The event contract snapshot names the Questions panel, as its source does. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/scripts/leaf/served_state/browser.py
On a phone the Questions door and Approval both wait behind More, and each marks its news there. An answer that settled the last question and opened the approval marked them one after the other, so More's dot came down and went straight back up in one script, which the write watch catches. The door now repaints once the script ends. Tests main added since the last merge walk with q, read the walk's "update to send again" wording, and expect a thread question's row to say Thread. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The keyboard table and the Ask's comment route on how-it-works still taught the walk as `a`; they say `q`. A focused Questions panel row named its keys "In the Queue" beside the panel's "In Questions", so the shortcut bar and the reference gave one panel two names; the row says "In Questions" too. Comments that still said Queue row, Leaves drawer or a shared drawer edge follow the code. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
At 490px, opening search moves Tasks: 1 below the banner’s visible second row, so the agent’s task count disappears while the search steps stand. The changed test_the_counts_lead_the_second_row_where_the_run_leaves_room expects that shorter count to remain visible; it fails both in CI and locally with drawn: false, top: 88. The second-row layout needs to seat the count beside those steps, or the intended behavior and test need to agree.
The same CI job also failed two seeded-example replay tests before either keyboard journey. I ran those two tests on main and got the same 0/2 and 0/1 Ask readings, so they do not account for this banner finding.
CI found the new 490px Tasks count visibility contract fails when search opens.
…ont allows At 490px, "Tasks: 1" stands whole beside a finger's search steps under macOS's font and wraps out of the banner under Linux's, which CI runs. The test now holds what both share: the count is drawn whole and live, or gone and inert, and the steps are never cut. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ions door as it reads Since #2020 admission records a pick's state operation in `meaning.state`, and the projection leaves out a pick that records none. Seed logs are copied verbatim, never admitted, so review-queue, current-proposed-comparison, ship-review and the feature gallery replayed no picks and their replay tests read no answers. Each writer event's meaning is now the one admission stores today, as are the two hand-built events in the margin and gate tests. The version button says "Showing vN" since #2025; the tests that read its exact words follow. The Questions door's accessible name begins with its visible words ("Questions: 2 waiting on you"), which axe's label-in-name rule requires. The projection tests that read the door as withheld when nothing waits now read "Questions: 0", the door standing on every page. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Main's one side panel for Threads and Questions (#2051) conflicted with this phase's surface closes. Selecting a surface on the same edge swaps it where it stands: the previous surface's `hide({ swap })` runs inside `closeLayer`, which hands a user who stood in it to its opener or the closer's `land`, and the drawers' hide takes only `swap`. The withheld composer bar keeps main's covered-panel case inside its `closeLayer`, and queue-panel's header names the keyed hold. The auxiliary dialog's re-seat now lands through its `closeLayer`: the hold put across it puts the user back, or a user entering a covering surface from outside lands on its landing, as the close's `seatLanding`. The lint refused that entry as a return after the re-seat's popover hides. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The design page still said the top bar and keys change was on its branch and not yet on main, and named the left-edge drawer by its old name, Leaves. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The banner treated Threads and the queue differently: Threads was a door on the row that opened a panel on the right, while the queue was a pair of counts beside the status that opened a drawer on the left. This makes them two matching doors to one side panel, and names the two sides of the queue for whose they are.
What the user sees
auxiliary-surfaces.js: each surface declares itsedge). The left edge keeps only the Pages drawer.Questions: Nand stands on every page, as Threads does; before the log's first answer it claims no count. The agent'sTasks: Ncount beside the status opens the same panel. On a phone the door waits behind More, whose dot and name say "questions waiting".q/Shift+qwalk the questions (wasa),g Shift+Qopens the panel, and its head carries a Next question button, as Threads' carries Next unread. ↑/↓ walk the thread titles in the Threads panel, as they walk the Questions panel's rows.geometry.rightCover).gsequence, the door to the surface that stands leads the line, so its close stays in reach when the panel narrows it, and other owners' destinations (Resume writing among them) rank before the fixed doors.Internally
taskstays the shared record's name for now;Taskin the UI means the agent's side.Navigating the diff
runtime/drawers.js,queue-panel.js,queue-walk.js,banner.js,banner-toolbar.js: the door, its seat (row on a desk, More on a phone, rank 107 between Comment on the page and Threads), its words and the walk's keys.runtime/auxiliary-surfaces.js,thread-panel.js,chrome.css,theme.css: the shared edge and the in-place swap. The banner's reserved room grows by the door (37em of actions; the Tasks count's 4em is whatTasks: 9measures), which keeps one row at 800px.markBannerControlnow paints once a script: an answer that settled the last question and opened the approval used to take More's dot down and put it back in one script.mainbreak this PR also fixes): since Clarify navigation and keep decided pages editable #2020 admission records a pick's state operation inmeaning.stateand the projection leaves out picks without one, but seed logs are copied verbatim, so review-queue, current-proposed-comparison, ship-review and the feature gallery replayed no picks. Their writer events now carry what admission stores today, and the tests reading the version button's exact words say "Showing vN" (Unify addressed replies, author workflows, and UI vocabulary #2025). These are nightly tests, which is whymainstayed green; they ran here because this branch touches their files.docs/how-it-works.htmland the glossary sayqand Questions.notes/what-needs-you/page.htmlrecords the choice (option B, "matching doors, both panels on the right") and the naming decisions.Testing
npm run test:runtimepasses, and so does the broad selection apart from failures that also fail onmainat the merged tip. The browser files the change touches (navigation, controls, chrome contracts, startup, threads, margin, widgets) were run on this branch and onmainside by side; every remaining failure reproduces onmain(among them the drafts write-watch cases, the growing-comment aim case, several margin and feature-gallery cases, and the focus-ring sampling case).