Skip to content

Count On me at the front of the tab's title while it is above zero - #5591

Merged
max-sixty merged 3 commits into
mainfrom
tab-on-me-count
Nov 6, 2026
Merged

max-sixty merged 3 commits into
mainfrom
tab-on-me-count

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Someone waiting on the agent has the terminal in front of them and the page in a background tab. The favicon shows the agent's state, but nothing in the tab says whether anything waits on them. While On me holds anything, the tab now reads "(2) Finish the ship review"; at zero it shows the authored title unchanged.

The count is On me's own reading (onUserCount in queue-api.js), which the panel's badge now calls too, so the tab and the badge always show one number.

The authored <title> is never written: a revision replaces head nodes that differ from its source (version.js, activateHead), so a prefix written into it would make every revision replace it. A runtime-marked <title> placed first in the head carries the count, and exists only while the count is above zero; document.title reads the first one. All pages' row for this page and a thread card's trail, the place a quote with no heading above it names, now read authoredTitle(), so neither shows the count. A revision replaces the authored title node, which a head observer follows; its work is one head's.

Tested: tests/runtime/tab-title.test.mjs (count to zero and back, a revision replacing the title node while a count shows, All pages and a thread card's trail reading the authored title); the browser tests that assert a page's title across live revisions (test_live_revision_retains_the_runtime_favicon, test_an_old_document_state_request_cannot_update_the_new_revision, test_a_pointed_comment_finds_its_row_again_after_a_revision_replaces_it); a leaf-dev probe of ship-review in Chromium and Firefox, where the tab reads "(3) Finish the iOS ship review"; pnpm run test:runtime and pnpm run check.

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

A user waiting on the agent has the terminal in front of them and the page in a tab;
the favicon shows the agent's state but nothing says whether anything waits on them.
The tab now reads "(2) Finish the ship review", with no prefix at zero.

The count is queue-api's onUserCount, the panel badge's own reading (the badge now
calls it too). The authored <title> is never written, since a revision replaces head
nodes that differ from its source; a runtime-marked <title> placed first in the head
carries the count and exists only while it is above zero (tab-title.js). All pages read
document.title for this page's row, which now says the tab's, so it reads
authoredTitle(); no other reader of document.title exists in browser/, packages/ or
src/ (tests only set it in page scripts). A head observer follows an authored title
changed by a revision.

@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 description says no other reader of document.title exists in browser/, but a thread card's trail still uses it as its fallback: browser/runtime/thread/thread-card.js, in the quote's trail: field, .join(" › ") || document.title. If a quoted passage has no heading above it, its card now shows "(2) Finish the ship review" as the passage's place, and #quoteHead's title attribute shows it too. The trail is computed when the card is built, so the number also goes stale as On me changes. Changing that fallback to authoredTitle() keeps the trail on the page's own title. The line is outside the diff, so I can't attach a suggestion to it. Happy to push the one-line fix if you'd like.

Comment thread browser/runtime/tab-title.js Resolved
…s count

A thread card's trail fell back to document.title, which now carries On me's count, so a quote with no heading above it named its place "(2) Finish the ship review" and kept that number as On me changed. It reads authoredTitle() as All pages does. The test now replaces the authored title node, as a revision does.
@max-sixty
max-sixty merged commit 119acbd into main Nov 6, 2026
6 checks passed
@max-sixty
max-sixty deleted the tab-on-me-count branch November 6, 2026 03:34
leaf-agent added a commit that referenced this pull request Nov 6, 2026
… page's title

The live-keys page holds one obligation, so since #5591 its tab reads
"(1) Live keys second" after the revision; the test still expected the bare title
and timed out on it. The revision the assertion waits for is unchanged.
leaf-agent added a commit that referenced this pull request Nov 7, 2026
…5631)

Eight browser and journey tests have failed on main since #5591, which
counts On me at the front of the tab's title while it is above zero.
Each asserts a page's title after a revision or a delivery, and each
fixture holds an open obligation, so the tab now reads `(1) Live keys
rewritten` (or `(2) Widgets second`) where the test expected the
authored title alone. #5601 already updated one such assertion in
`test_current_location.py`; this updates the eight it left, to the count
each fixture holds. No runtime code changes.

The tests fail on `903e1d106` with `Page title expected to be 'Live keys
rewritten' Actual value: (1) Live keys rewritten`, and all eight pass
with this change (`uv run pytest -n 4` over the eight node ids, 8
passed). The first push run that shows them failing is
[42162679091](https://github.com/max-sixty/leaf/actions/runs/42162679091),
the first completed run after #5591 merged; scheduled run
[42205827418](https://github.com/max-sixty/leaf/actions/runs/42205827418)
shows them too.

<details><summary>Tests updated</summary>

- `tests/browser/projection/test_current_location.py`:
`test_a_revision_that_restates_an_obligation_preserves_the_users_location_in_it`,
`test_a_restated_obligation_returns_a_user_to_the_question_not_to_a_control`,
`test_a_revision_gives_back_what_the_user_moved_and_nothing_they_left`,
`test_a_revision_that_rewrites_a_draft_leaves_the_user_where_they_stand`,
`test_the_replacing_install_gives_back_the_same_apparatus`,
`test_a_user_working_an_obligation_keeps_it_across_a_replacing_document`
- `tests/browser/projection/test_revision_patches.py`:
`test_a_revision_replaces_the_widget_it_rewrote_and_keeps_the_one_it_did_not`
- `tests/journeys/test_render_application_boundary.py`:
`test_a_settled_delivery_activates_one_fresh_document_with_continuity`

</details>

Refs #4225 — automated triage
Refs #3985

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Nov 18, 2026
…iage workers (#5700)

When the push and schedule `ci` reports on `main` (#3985, #4225) are
diagnosed together, their workers now divide the failures instead of
each bisecting the same tests. The push report owns any failure a push
run also shows. The schedule report covers only what pushes don't run
(`journeys`, `nightly` tests, `test-macos`) and links the push report's
causes for the rest. The change is one paragraph in `running-tend`'s **A
red `ci` on main is live**.

A scheduled run includes every test a push runs (`ci.yaml`'s header), so
the two reports' failures overlap almost entirely. The daily sweep's
recovery dispatches both reports in one triage batch, and they run in
parallel. Nothing in the bundled triage reference or this overlay
divides the shared failures between them. The bundled ownership recheck
before filing catches only part of it: the bisect work is spent long
before a session files anything.

Changes to agent instructions wait for the control-plane owner. #5197
also edits this file, in a different section (**Weekly: test tier
budgets**), and the two don't conflict.

<details><summary>Evidence</summary>

- **Triage batch 42353712556 (2026-11-07).** Its #3985 job ran 193 min
and its #4225 job ran 196 min, almost all of it local `--run-main`
reruns and `git bisect` runs.
- #4225 found #5591's breakage and opened #5631 at 08:51. #3985 had
checked for owners only once, at 08:06, so at 10:31 it filed #5639 for
the same cause, which #5631 then closed.
- Both jobs tested #5428 against its parent (09:19 and 10:34), and both
bisected #5410's test (#4225 at 09:20–09:35, #3985 again before filing
#5643 at 11:01).
- #4225 noticed its sibling only at 11:05 ("A concurrent #3985 session
is filing the same causes right now"). It then waited about 12 min on
that job's filings, and its confirmed attributions "matched theirs".
That is roughly 60–90 min of browser-suite work that produced no new
owner.
- **Triage batch 41591090041 (2026-11-03).** The same pair ran in
parallel and filed three duplicate cause pairs (#5166/#5167,
#5168/#5170, #5153/#5154), which the sessions consolidated within
minutes.
- Both occurrences are recorded in the review-runs tracker #5067.

</details>

Co-authored-by: leaf-agent <[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