Skip to content

Show each queue row's answer once its Asks are answered - #1729

Merged
max-sixty merged 4 commits into
mainfrom
agent-aa52d8cd3cdb9a33a
Oct 4, 2026
Merged

max-sixty merged 4 commits into
mainfrom
agent-aa52d8cd3cdb9a33a

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A side-list queue showed no progress: #1556 removed the open-Ask count from tab rows, so a row whose item was answered looked the same as one still open. Now, once every Ask in an item is answered, its row shows a check beside the name. Where the item holds one Ask, the picked option's title follows the check, cut to the row's width. The tab's accessible description adds "Answered: <title>", or "All N Asks answered" for several Asks.

Whether an Ask is answered comes from the admitted Ask inventory, as the Asks drawer reads it, so a pick and an undo both reach the row when their POST's state is adopted (about 35ms against a local server). AGENTS.md settles Ask readings at that boundary and forbids the browser folding the answer a second time. An undo shows "✓ No options selected" for that round trip, as the drawer row does. The words come from the owning widget's answer reader.

  • asks/answer.js is the one home for an Ask's answer words. The drawer's row model and lf-tabs both read it. answersWithin(root) gives the answers of the Asks inside an element, across declared shadow roots. watchAnswers reads again once those Asks' widgets have presented, because a widget registers its answer reader as it renders, so a revision that rebuilds one has no words at the publication itself. A widget declaring two answer readers is reported and costs only its own row the answer.
  • A row asks whether its item is decided, so it should stay checked after the agent settles the question. The page's Ask inventory (inventory in asks.py) now keeps an Ask whose standing answer admission marked as meaning.answer, after a later version retires the question around it, as settled does. Interim, with a side effect on every page: such an Ask also stays in the Asks drawer as an answered row and keeps counting in the banner's Asks progress (7/9 after seven settled rounds, where main reads 0/2), and a re-pick on a settled group, which admission does not stamp as an answer, drops it. The forthcoming Tasks model replaces this reading; comments at both sites say so.
  • The answer column is reserved only on rows whose panel authors an Ask, so an answer moves no row and other rows wrap their names as before. The answer is an inline-size container that hides its words below 5em, so a name that wraps leaves the check alone, and the words never widen a stacked phone row.

test_a_side_list_is_a_queue_beside_the_item_it_opens replaces its assertion that a pick leaves the row unchanged: it checks the row and its description after a pick, holds the undo's POST to check the row stays answered until the reply lands, and settles the group by revision to check the row keeps the answer. The feature gallery's side-list scenario and page-authoring.md ("A workspace") describe the row, the corpus is regenerated, and the TODO entry is removed.

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

max-sixty and others added 4 commits October 4, 2026 08:20
A side-list queue showed no progress: #1556 removed the open-Ask count
from tab rows, so an answered item's row looked the same as an open one.
Now, once every Ask in an item is answered, its row shows a check beside
the name. Where the item holds one Ask, the picked option's title follows
the check, cut to the row's width. The tab's accessible description adds
"Answered: <title>", or "All N Asks answered" for several Asks.

Whether an Ask is answered comes from the admitted Ask inventory, as the
Asks drawer reads it, so a pick reaches the row when the POST's state is
adopted (about 35ms against a local server). AGENTS.md settles Ask
readings at that boundary and forbids the browser folding the answer a
second time. The words come from the widget's `answer` reader over its
current state, so an undo clears the row in the turn it is sent.

- `asks/answer.js` is the one home for an Ask's answer words. The
  drawer's row model and lf-tabs both read it, and widget-api exports it
  with `allAsks`.
- lf-options' `answer` reader returns "" when nothing is picked, unless
  Done stands. It used to say "No options selected", which showed for one
  round trip after an undo, while the log still held the Ask answered.
  The scope contract in keyboard/scopes.js says so.
- The row keeps the check's column whether or not it is answered, so an
  answer moves no row. In the stacked phone layout the row shows only the
  check, because words there would widen the row and reflow the line.

test_a_side_list_is_a_queue_beside_the_item_it_opens now checks the row's
answer and description after a pick and after undo, in place of the
unchanged text it used to assert. The feature gallery's side-list scenario
and page-authoring.md describe the row; the corpus is regenerated.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review of the queue-answers change found five gaps, fixed here.

A row asks whether its item is decided, but the Ask inventory dropped an
Ask once a revision made it stop asking, so settling an answered
lf-options group left a blank row beside "Settled: Fix". The page's Ask
inventory (`asks.py`, `inventory`) now keeps an Ask whose standing
answer admission marked as `meaning.answer`, after a later version
retires the question around it. The Asks drawer lists such an Ask as
answered and the banner's progress keeps counting it.

`asks/answer.js` owns the region reading: `answersWithin(root)` gives
the answers of the Asks inside an element, across declared shadow
roots. `watchAnswers` reads again once those Asks' widgets have
presented, because a widget registers its answer reader as it renders,
so a revision that rebuilds one has no words at the publication itself.
lf-tabs only draws the result. A widget declaring two answer readers is
reported and costs only its own row the answer.

Answered is now only the inventory's reading: null in `askAnswers` is
unanswered, and the lf-options reader and the `answer` contract in
keyboard/scopes.js are back to what main has. A pick and an undo both
move the row when their POST's state is adopted, as the drawer does. An
undo shows "✓ No options selected" for that round trip, as the drawer
row does.

The answer column is reserved only on rows whose panel authors an Ask,
so other rows wrap their names as main does. The answer is an
inline-size container that hides its words below 5em, so a name that
wraps leaves the check alone rather than a clipped letter, and the
words never widen a stacked phone row.

test_a_side_list_is_a_queue_beside_the_item_it_opens holds the undo's
POST and checks the row stays answered until it lands. It also settles
the group by revision and checks the row keeps "Fix". The page opens at
its live address, since a version URL never installs a newer revision.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The inventory's keeping of answered-then-retired Asks, and the region
reading built on it, stand until the Tasks model replaces them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The queue indicator changes the page-wide Ask inventory when an answered question is later settled. _answered_by_user now adds that retired source to all even though its when condition is false, while unanswered excludes it. paintAsks uses all for both drawer rows and the banner denominator, so settling seven queue items leaves seven answered questions in the drawer and changes progress from 0/2 to 7/9 on a page with two active Asks. The PR describes this as interim, but it changes the meaning of the shared inventory for every page to support one row indicator. Keep retired questions out of all and give queue progress its own durable decision reading at the shared boundary; that would preserve the drawer's active-Ask contract while keeping settled queue rows checked.

@max-sixty
max-sixty merged commit aab0683 into main Oct 4, 2026
13 of 14 checks passed
@max-sixty
max-sixty deleted the agent-aa52d8cd3cdb9a33a branch October 4, 2026 18:35
max-sixty added a commit that referenced this pull request Oct 5, 2026
The Asks drawer is gone, and a **Queue** panel takes its place. It lists
everything waiting on either side: what's on you, what's on the agent,
and what's done. The panel is experimental and expected to change a lot.
Its code headers, `skills/leaf/assets/AGENTS.md`, `packages.md` and the
glossary say so.

## The panel

- **On you · N:** open Asks, threads with a question for you, and sends
to retry.
- **On <agent> · N:** owed replies, claimed work (shown as "Working")
and open tasks.
- **Done · N:** folded at the foot. Answered Asks ("Answered <answer> ·
§ section") and ended tasks ("Done 5h · § section").

Each row shows the item's kind and its title or opening words. Ask rows
use the widget's own word, such as "Deletion" or "Rewrite", falling back
to "Ask". Each row also says where the item is: its section, plus age,
stage or outcome. Enter or a click on a row arrives exactly as `a` does,
through `queue-walk.js`'s `arriveAtItem`, which also reaches answered
Asks.

## One reading

- The two queues come from the same `queues` selection the `a` walk and
the banner counts read (`runtime/queues.js`). There is no third rule.
- Done comes from `selectDone`, beside them. It reads the existing Ask
reading and a new served `ended_tasks`, which the server selects from
`canonical_tasks`. Agent-facing `page state` is unchanged.
- `queue-list.js` owns its rows and exports the lookups other code
needs: `rowAt`, `standsAt`, `walkStops` and `shownItems`. The Ask view
mirrors its ring onto a row through `rowAt`, and the review-route check
asks the standing side (`sideOf`) rather than a class name.
- One consequence is wider: chrome whose declared side is exactly an
answered Ask now counts as standing on it, not only a Queue row. Focus
on a Threads card for a thread anchored on that Ask now shows the Ask's
ring and its revise shortcuts.

## Routes

- **Keyboard:**
  - `g` then `Shift+Q` toggles the panel and lands on the first row.
- ↑/↓/Home/End walk the rows, and the Done fold's heading is a stop. The
"Item n of m" position counts only items.
  - Enter arrives at the item, and Esc closes the panel.
- **Banner:** the "N on you · M on <agent>" counts are a button that
toggles the panel. They keep main's arrangement and reserved box. On two
rows, counts the banner doesn't draw are inert, so they aren't a hidden
Tab stop.
- **Touch:** a Queue entry in the banner's More menu.

## Removed

- The Asks drawer and `asks/drawer-list.js`.
- The "Asks n/m" banner control.
- `g Shift+A` and the `asks` surface key, now `queue`.

The "Accept all (N)" buttons stay in the Ask view.
`docs/how-it-works.html`, `docs/registry.html`, `module-authoring.md`,
`page-authoring.md`, the feature gallery and the corpus now name the
Queue.

## Tests

- New: `test_the_queue_panel_lists_both_queues_and_what_is_done`, and a
`selectDone` runtime test on a served "done" reading.
- `expect_asks_answered` now waits for the page's first state. It had
been passing on the "0/0" an empty reading gives. Three tests that only
passed through that race now expect main's interim "decided" count from
#1729:
-
`test_review_queue_decisions_replay_and_reach_the_next_revision_from_the_keyboard`:
2/2.
- `test_comparison_choice_replays_and_is_applied_by_the_next_revision`:
1/1.
  - `test_command_hub_an_absorbed_input_stays_fulfilled`: 1/5.
- `test_the_poll_leaves_the_banner_where_it_was`: its `displaced` helper
now accepts a box growing into free room on either side, provided one
edge holds. The counts grow leftward when a count reaches 10. Every
other control must still stay put.

Local: `npm run test:runtime` (211), `npm run test:browser` (76), `npm
run check:browser`, the panel, queue, banner and status tests plus the
shift watch (390), and `uv run pytest tests --nightly-changed-since
main`. Three failures there aren't this branch's:
- `test_local_worker_wrapper_announces_independent_bound_ports` needs
`worker/` npm packages installed.
- `test_the_ring_holds_on_a_seat_the_agent_has_still_to_answer` and
`test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus`
also fail on main.

## Also

- `test_the_ring_holds_on_a_seat_the_agent_has_still_to_answer` failed
on main since #1705, which made `c` continue an existing thread anchored
inside the held Ask. That is the behaviour the test was originally
written for, so the test now expects "comment on the thread" and presses
`c` to check it lands in the user's own thread.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

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