Repository navigation
fix(status): aggregate split workspace agent activity - #32
Conversation
|
Review 1 · Fail · 1 critical Does the change do what the task asked? No. Gate: major and worse must be fixed. The change fixes the original working/done split, but introduces a completion-status regression. Reading one finished pane causes the workspace to hide a sibling's unread finish, so the task is not fully met. Required
|
|
Review 2 · Pass Does the change do what the task asked? Yes. Gate: major and worse must be fixed. F1 is fixed: reading one finished agent no longer hides its sibling's unread completion. The original working/done aggregation remains correct, and the additional browser check passed through reloads and a new turn on an acknowledged pane. No remaining findings. No findings. |
|
Merging without a CodeRabbit review. The independent board review passed on 98e2e42 with no findings; its earlier unread-completion finding was fixed and rechecked, including reloads and a new agent turn. The human explicitly approved the CI exception because GitHub refuses to run Actions on this fork. Existing validation: 151 scoped tests, scoped typecheck, and desktop/phone browser regressions passed. |
* fix(status): aggregate split workspace agent activity (#32)
Aggregate all agent panes before presenting workspace and tab status. Preserve unread sibling completions until all completed panes have been acknowledged.
Covered by 151 scoped tests and desktop/phone browser regressions; independent review passed.
* fix(codex): confirm sends beside wrapped terminal footers
* fix(chat): reject ambiguous rendered Codex conversations (#34)
* fix(ipad): hardware-keyboard flash, landscape shell fit, field sizes and window controls on an iPad (supersedes #3338-#3341) (#3583)
Supersedes #3338, #3339, #3340 and #3341, four iPad fixes by @Noobear
that all change `src/lib/viewport.ts` and
`scripts/keyboard-viewport-regression.ts` and conflict pairwise. This
branch carries their commits unchanged (same author), in the order
#3341, #3340, #3339, #3338, resolves the conflicts, and fixes what
review found on each. The four PRs name no issue to close; this one
closes #3483, which #3339 and #3561 together fix.
Thank you, @Noobear: the four fixes, their regression cases and the
measurements from your own iPad are all here, and nothing more is needed
from you.
Closes #3483
## What changes for a user
- **Hardware keyboard on an iPad home-screen app (#3341):** a visual
viewport that shrinks for one frame on each key is no longer taken for
an on-screen keyboard, so the page does not flash.
- **iPad home-screen app in landscape (#3340):** the shell fits the area
under the status bar, so a tap into a field no longer slides the screen
up and back.
- **Fields (#3339):** text fields and selects follow the interface font
size like the labels beside them. On an iPhone or iPad a field that is
pressed or takes the focus is at least 16px while it has the focus, so
Safari does not zoom the page into it. Find in diff does the same on an
iPad (#3483).
- **Windowed iPad home-screen app, iPadOS 26 and later (#3338):** the
header's first button stays clear of the window's close, minimize and
full-screen controls.
## Commits
Author's commits, cherry-picked in order (the only conflict resolution:
one `PASS` line holding every suffix, and one `const ios` instead of
two):
| From | Commit |
|---|---|
| #3341 | fix(mobile): apply a shrinking visual viewport only once it
lasted a moment |
| #3340 | fix(mobile): fit an iPad home-screen app's landscape shell to
the visual viewport |
| #3339 | fix(settings): fields follow the interface font size; iOS arms
a pressed field to 16px |
| #3339 | fix(settings): arm a field from its label's press; disarm on a
cancelled press |
| #3339 | fix(settings): an armed field keeps an interface size over
16px instead of shrinking to it (maintainer, already on the PR) |
| #3339 | fix(settings): arm a field a handler focuses, not only a
pressed one (maintainer, already on the PR) |
| #3338 | fix(ipad): keep the header's first button clear of a windowed
app's controls (iPadOS 26) |
Then seven commits of this PR: the four fixes below (each
`Co-authored-by` the author, whose code they rework), the #3483
regression case, the changelog credit, and one for the review of this PR
itself (second table below).
## Findings and how each was resolved
Each MEDIUM was reproduced first as a failing case in
`scripts/keyboard-viewport-regression.ts` on the unfixed code, then
fixed; the case stays as the regression.
| # | Finding | Reproduced | Resolution |
|---|---|---|---|
| 1 | **#3341 MEDIUM** Every viewport event restarted the 40 ms wait, so
a keyboard opening under a stream of events was applied only 40 ms after
the last one. | Yes: twelve frames with an event each, `a keyboard
opening under a stream of viewport events counts while it opens` failed
(`data-keyboard` still off at 192 ms). | The first shrinking event
starts the wait; later ones leave it running. |
| 2 | **#3340 × #3341** timing contradiction: "shrinking" meant shorter
than `100lvh`, which is the steady state of an iPad home-screen app
under its status bar (and of a Safari tab with its toolbars), so every
sync waited there and #3340's own check read no height after the load. |
Yes: with both PRs in, `iPad landscape: the shell fits the visual
viewport` failed (`published: ''`, 820 instead of 796). | Shrinking is
measured against the state applied last, so a steady state and the first
sync of a page never wait. (The first version of this fix also said
Chrome shrinks all three viewports together; that was wrong, see finding
12.) |
| 3 | The one-frame check raced a real clock: an installed Playwright
clock keeps running, so a slow runner could let the 40 ms run out
between two steps. | Yes (probe: a 40 ms timer fired by itself after
`clock.install()`). | The scenario pauses the page clock; only `runFor`
moves it. |
| 4 | **#3340 MEDIUM** The iPad test read the layout (744px on its short
side); an enlarged page zoom (125% lays an 820-point side out at 656px)
or a narrow window turned the fit off. | Yes: `iPad landscape at 125%
page zoom: the shell fits the visual viewport` failed (656 instead of
637). | The screen's own short side is read. The cases now use the
layout a page zoom really produces (85%: 1388×965; 125%: 944×656) and
add a 600px window. |
| 5 | **#3339 LOW** An iOS press could leave the agent picker (a button
drawn as a select) at 16px for good; so could a field whose press ended
without the focus, and a disabled field pressed through its label. |
Yes: `a pressed picker button keeps the interface size` failed, and with
that one skipped `a picker button keeps the interface size after its
press` (16px instead of 14px). | Only a text field, a textarea or a
native select that can take the focus is armed. A press that ends in a
click without the focus is disarmed once the click's default is done; a
press that never ends in a click is cleared by the next press. |
| 6 | **#3338 MEDIUM** Every home-screen app narrower than its screen
got the 68px room, also iPadOS 16-18 Split View, Slide Over and Stage
Manager, which draw nothing in that corner. | Yes: `Split View on iPadOS
18: the window's controls are not there` failed. | A probe for iPadOS 26
and later: `CSS.supports("anchor-name: --a")` (CSS anchor positioning
arrived with Safari 26; a home-screen app's user agent on an iPad names
no system version). Where the controls are not drawn, nothing is marked,
measured or listened for. |
| 7 | **#3338 LOW** The one-point margin was smaller than what page zoom
rounds away (iPad mini at 300%: 377px × 3 = 1131 of 1133; at 115% in
portrait: 742.9 of 744). | Yes, with the whole-number widths of the
review: `full screen at 300% page zoom: the window's controls are not
there` failed. Whether WebKit reports whole numbers there was not
checked on a device. | The margin is the scale plus one point. |
| 8 | **#3338 LOW** No test of the default wide layout, where the room
goes on `.header-side`, nor of a window going full screen. | n/a
(coverage) | The cases build the app's zoned header with the sidebar's
top row: from 769px the room is on that row and the header adds none,
with the sidebar collapsed or under 769px it is on the header, never
both; a resize to full screen clears the mark and back sets it. |
| 9 | **#3338 LOW** No reference design named. | n/a | See "Reference
design". |
| 10 | Maintainer note on #3338: the mark only follows `resize`. | Not a
defect: every way in or out of a window changes its width. | Left as is,
said in a comment. An `orientationchange` listener would read the new
orientation against the old width for a moment. |
| 11 | Known limit from #3338, unchanged: a window as wide as the screen
but shorter is not detected. | n/a | Not in this PR. |
### Second round: the review of this PR (head `3cb28a6ed`)
Both reviewers and CodeRabbit found the shrink wait reaching further
than the bug it is for. Each row was reproduced first as a failing check
of `scripts/keyboard-viewport-regression.ts` on `3cb28a6ed`, with the
script reading each state in the event that set it.
| # | Finding | Reproduced | Resolution |
|---|---|---|---|
| 12 | **MEDIUM** The 40 ms wait had no platform gate and also held a
shrink while a keyboard was up: an iPhone's and Android's keyboard were
counted 40 ms late, a keyboard that grew kept a stale taller shell, and
so did a rotation. The comment and this body claimed Chrome shrinks all
three viewports together; `src/lib/viewport.test.ts` records 477 / 477 /
lvh 533. | Yes: the phone's keyboard (472px), a keyboard that grows
(400px), Chrome's measured numbers (477, 477, 533), a rotation with the
keyboard up, split view, the virtual keyboard and both home-screen phone
scenarios all failed `keyboard flag follows occlusion, not focus alone`
when read in their event. | The wait is for the reported case only: an
iPad (the platform an iPad reports and an iPad's screen, at least 744
points on its short side), no keyboard counted yet, and a visual
viewport shorter than the one applied last. Everything else is applied
in its event, in `main`'s order. |
| 13 | **LOW** The regression ran the clock 50 ms before every read and
its resizes-content case set lvh equal to the visual viewport, so no
case could see a delay. | Yes: with the read moved into the event, the
existing keyboard-up checks of every phone scenario failed on
`3cb28a6ed`. | The clock is paused and a state is read in its event;
only a case that must wait runs the clock. The one-frame and stream
cases moved to an iPad home-screen scenario; the phone gained a keyboard
that grows and `geometry(page, 477, 477, 533)`. |
| 14 | **MEDIUM** (Codex) A field that lost the focus while the shrink
waited was gone when the wait ended, so the keyboard was not counted and
covered the shell. | Yes: on the iPad scenario, blur during the wait:
`keyboard flag follows occlusion, not focus alone` failed after the
wait. | The focus a dip began with is kept until its wait ends. |
| 15 | **Minor** (CodeRabbit) An iPad window made smaller kept its old
shell height for 40 ms. | Yes: a smaller window (676 under 700) and a
rotation back to landscape both failed `height override follows keyboard
or measured standalone inset` in their event. | A dip leaves the window
as it was: the wait needs the same width and the same large viewport, so
a resized window and a rotation are applied in their event. |
| 16 | **LOW** A field disabled while it had the focus kept `data-armed`
(16px at rest) after the focus left. | Yes: `the blur of a field
disabled while focused disarms it` and `the next press disarms a field
that lost the focus without a blur` failed. | The blur disarms whatever
it leaves, and a press or a focus elsewhere clears anything left armed
without the focus. |
| 17 | **LOW** A pressed Settings select widened before the tap ended,
which can wrap its row's label and move the select from under the
finger. | Yes for the cause: `.select: a press leaves the size` failed
(16px at `pointerdown`), and an armed select is wider than at rest
(asserted). The tap missing on a device was not reproduced. | A native
select is armed only as it takes the focus; a text field, whose box does
not follow its text, is still armed by the press. |
### #3339's three review threads
All three are settled on this branch (they were raised on the PR's first
commit and answered by the author's second):
- *Changelog wording*: the fragment says the field "grows to at least
16px and keeps it while it has the focus".
- *Arm the field when its label is pressed*: done in the author's second
commit, with a regression case (`16px from a press on its label`).
- *Clear the armed state after an unsuccessful press*: a cancelled press
was handled in the author's second commit; finding 5 adds the press that
ends without the focus and the one that never ends in a click, each with
a case.
## #3483: Find in diff on an iPad
`scripts/diff-find-demo-regression.ts` gains the case #3561 left for
after #3339: on the demo, with the platform and touch points iPadOS
reports, at 1180 and at 820, the query a tap on Find focuses and the
query a tap focuses read 16px, 14px again once the focus leaves; a 20px
interface keeps 20px.
## Reference design
- **Window controls (#3338):** the answer of desktop apps that draw
their own title bar, the Claude and Codex desktop apps and Zed on macOS
among them: the top bar's first control starts to the right of the
window's controls, the bar keeps its height and nothing else moves. Ovis
already does this for Chrome's `window-controls-overlay` mode from
`titlebar-area-x`; iPadOS reports no such value, so the room is a
measured constant (68pt) converted through the page zoom.
- **Fields (#3339):** a field's text at the size of the labels around
it, as those apps draw their settings. The 16px while focused differs
from them on purpose: Safari zooms a web page into a field under 16px on
an iPhone, which an app with its own window does not face.
- **#3340 and #3341** change no design: they keep the shell where it
already was.
- These are named from how the apps are known to behave; none was opened
for this PR.
## Screenshots
Not uploaded here. Before/after shots were taken on the static demo and
handed to the maintainer: Settings → Appearance (selects and text
fields) and the New workspace dialog (Directory, the agent picker), as
an iPhone at 390px and an iPad at 1180px, at the default and a 20px
interface size, at rest and with a text field focused by a tap (32
shots, 16 side-by-side pairs). The computed sizes they show:
| | before: rest / focused | after: rest / focused |
|---|---|---|
| iPhone 390px, default (14px body) | 16px / 16px | 14px / 16px |
| iPhone 390px, 20px interface | 16px / 16px | 20px / 20px |
| iPad 1180px, default | 13px / 13px | 13px / 16px |
| iPad 1180px, 20px interface | 18.6px / 18.6px | 18.6px / 18.6px |
The agent picker (a button) follows the same resting sizes and is never
enlarged. A native select follows them too and is enlarged only once it
has the focus, not by the press. The shots were taken on the first head;
the second round changed none of the sizes in this table.
## Validation
All on head `1171f74d9` (the branch rebased onto `main` 68f1fa9fb, plus
the second round's commit) unless said otherwise.
- `bun run check fast`: passed (workflow syntax, generated types and
themes, typecheck, build; unit tests 14770 pass, 0 fail, 51 skip).
- In the CI runner image (`herdr-ci-runner:local`, as its own user, in a
checkout of its own at this head, through
`scripts/ci-browser-parallel.ts`), no retries:
- `scripts/ui-regression.ts`, `scripts/ui-contexts-regression.ts`,
`scripts/ui-contexts-layout-regression.ts`: 3/3 passed. They also run
the checks they import, among them `mobile-viewport`, `keybar-focus`,
`mobile-tabs`, `terminal-pinch`, `terminal-input-spacing`, `pane-find`,
`settings-tabs`, `header-lens-switch`, `split-view`, `tab-menu` and
`secret-input`.
- 54 scripts that name the header, the sidebar, fields, the composer or
the viewport: 54/54 passed, `keyboard-viewport-regression` and
`diff-find-demo-regression` among them.
<details><summary>The 54 scripts</summary>
`agent-helpers-fold-demo-regression`, `chat-greeting-demo-regression`,
`cliproxy-settings-regression`, `composer-draft-demo-regression`,
`composer-fit-demo-regression`, `composer-send-demo-regression`,
`context-menu-inputs-demo-regression`, `deep-link-demo-regression`,
`diff-find-demo-regression`, `drawer-modal-regression`,
`droplet-demo-regression`, `file-text-size-demo-regression`,
`file-viewer-mobile-regression`, `files-prompt-regression`,
`header-context-demo-regression`, `interface-font-demo-regression`,
`keyboard-viewport-regression`, `machine-dialog-regression`,
`mirror-fold-demo-regression`, `new-session-skills-browser-qa`,
`pane-input-focus-demo-regression`,
`phone-glass-header-demo-regression`, `phone-safe-area-demo-regression`,
`prompt-dock-demo-regression`, `push-health-demo-regression`,
`pwa-update-browser-qa`, `recent-folders-regression`,
`reconnect-header-demo-regression`, `repo-diff-browser-qa`,
`settings-pages-demo-regression`,
`settings-palette-search-demo-regression`,
`settings-rows-demo-regression`, `sidebar-activity-demo-regression`,
`sidebar-agent-tree-demo-regression`,
`sidebar-background-workspaces-demo-regression`,
`sidebar-branch-line-demo-regression`,
`sidebar-context-ring-demo-regression`,
`sidebar-declutter-demo-regression`, `sidebar-filter-demo-regression`,
`sidebar-heads-demo-regression`,
`sidebar-machine-layout-demo-regression`,
`sidebar-machine-removal-demo-regression`,
`sidebar-peek-demo-regression`,
`sidebar-selection-contrast-demo-regression`,
`sidebar-spacing-demo-regression`,
`sidebar-split-access-demo-regression`, `sidebar-split-demo-regression`,
`sidebar-tokens-demo-regression`, `tap-targets-demo-regression`,
`terminal-keyboard-demo-regression`, `terminal-served-font-regression`,
`terminal-viewport-regression`, `unconfirmed-input-demo-regression`,
`workspace-rows-regression`
</details>
- Each reproduction above: `scripts/keyboard-viewport-regression.ts` on
the host's Chromium, failing before its fix and passing after. For the
second round the script was also run once with its assertions collecting
instead of stopping, on `3cb28a6ed`'s code, to list every check that
fails there.
- The first head (`3cb28a6ed`) passed the same checks before the rebase
(fast checks, 3/3 and 50/50 in the image). Its GitHub run failed one
script this PR does not touch,
`background-agent-states-desktop-demo-regression` (a disabled row
button, `background-agent-detail-demo-run.ts:201`); its sibling failed
the same way on another PR's run (42808284998), and it passes here on
the rebased branch.
- Skipped: `bun run check full`, the integration suite, the Windows and
macOS jobs, and every script not listed above.
### iOS Simulator (the test Mac; iPhone 18 Pro and iPad Air 11-inch,
iOS/iPadOS 27.0, Safari 27.0)
Static demo only. Real touches; a probe logged sizes, `visualViewport`
and the marks. First round: `main` f88576037 against the branch at
`484e67f3e`. Second round, after the review: `main` 68f1fa9fb against
this head, with the probe timing each mark against its viewport event.
- **Safari's zoom (#3339), iPhone:** a control page proves this Safari
zooms: a 12px field goes to scale 1.33 when tapped and when a button's
handler focuses it; a 16px one stays at 1. On this branch, at the
default and at a 12px interface, the sidebar filter, a Settings select,
Find in diff (through its button and tapped) and Rename tab rest at the
interface size, read 16px while focused, return on blur, and the page
stays at scale 1 at the focus and 300 ms and 1200 ms after it. A field
focused by a handler is armed inside the focus event, and no zoom
followed. This was the open question on #3339.
- **Safari's zoom, iPad:** Safari on the iPad never zoomed into a field,
on `main` either: the 12px control stays at scale 1 in landscape and
portrait, and with the mobile site in landscape. So the zoom #3483
describes did not reproduce on an iPad. The sizes are as intended
(filter and select 13px → 16px → 13px, Find in diff 14px → 16px → 14px,
at 1180 and 820), but on this iPad they only change how a focused field
looks: it grows by 3px, and a select that keeps the focus after its menu
closes stays that size until the focus moves. See "A decision left to
the maintainer".
- **Window controls (#3338):** the home-screen app could be installed
and put in a window (641×583). On this branch it is marked, the room is
68px and the header's first button starts at x=68, clear of the
controls, which end about 61pt from the window's left edge. On `main`
the button sits at x=12, under them. In a Safari tab and in the
full-screen app nothing is marked. `CSS.supports("anchor-name: --a")` is
true on iPadOS 27.
- **Page zoom (#3338, #3340):** at 85%, 100%, 115% and 125% in a Safari
tab, `screen` stays 820×1180 while the layout and `visualViewport.scale`
follow the zoom (125% in landscape lays out 944px wide at scale 1.25),
which is what both fixes assume.
- **Landscape shell (#3340):** in the full-screen home-screen app the
visual viewport is 788 under a 820 `100lvh`, and this branch publishes
`--app-height: 788px`. iPadOS 27 already draws `100dvh` at 788 there, so
at rest nothing differs from `main` and the slide on focus did not show
on `main`. A difference did show with a hardware key pressed and the
keyboard reduced to its floating bar (viewport 719.5): this branch fits
the shell to 720px and the composer stays clear of the bar; on `main`
the shell stays 788 and the bar covers the composer's bottom row.
- **Shrink wait (#3341):** keys sent as HID events caused no one-frame
shrink on either build, so the flash was neither reproduced nor refuted.
- **The phone's keyboard (second round):** on the iPhone, this head sets
and clears `data-keyboard` and `--app-height` in the same task as the
viewport event, as `main` does: 0 to 7 ms on both builds over four opens
and four closes each, and no 40 ms gap in 16 more keyboard changes. A
rotation with the keyboard up is the same on both.
- **The iPad's keyboard (second round):** only the iPad waits, and only
on a shrink: the keyboard counts 41 to 43 ms after the viewport event
(Safari tab and the windowed home-screen app), where `main` counts it in
the event; it is cleared in the event on both. One case beyond a plain
open waits too: rotating back to landscape with the keyboard up, where
the window's resize first un-counts the keyboard and the viewport's
shrink 0.8 s later is then held 41 ms.
- **A pressed select (second round, iPhone):** at `pointerdown` and in
the next frame a Settings select keeps its size, has no `data-armed` and
the same box (115×44 at 14px, 106×44 at 12px); with the focus it is 16px
and 125×44; the picker opened on 8 of 8 taps. Text fields: no zoom, as
in the first round.
### Could not be checked
- A real iPad, and a Magic Keyboard: the two home-screen bugs as
reported (#3340's slide, #3341's flash) were not reproduced on `main`
here.
- iPadOS 16 to 18 and iPadOS 26: only the 27.0 runtime is installed, so
the probe's false side (Split View, Slide Over on iPadOS 18) ran in the
regression only, with the probe faked.
- A windowed app 769px or wider on a device (the `.header-side` rule):
the Simulator's window would not resize further. The regression covers
the rule.
- Page zoom inside the home-screen app, a pinch, and an iPhone
home-screen app.
- Whether WebKit reports whole-number widths under page zoom (finding
7).
- On a device: a field losing the focus during the iPad's wait (finding
14), a keyboard that changes height while up on the iPad (the emoji
views did not change the viewport), and the tap that finding 17 says
could miss (the press no longer changes the select, so it was not
provoked).
## A decision left to the maintainer
Arming on an iPad follows #3483 and #3561, and the new regression pins
16px there. The Simulator says Safari on an iPad does not zoom into a
small field at all, so on an iPad the arming is only a visible 3px
growth while a field has the focus. Limiting the arming to the iPhone
would be a small change (and #3483 would close as not reproducing); it
is not made here because iPadOS 16 to 26 could not be checked.
## Not in this PR
- A field with a size of its own (Rename tab uses `--fs-sm`) grows to
the generic field size when armed at a large interface size (noted on
#3339).
- The native iPad app (Capacitor, `app/ios`): not covered,
`display-mode: standalone` was not checked there.
- A window as wide as the screen but shorter (finding 11).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Noobear <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: sisyphus-dev-ai <[email protected]>
* fix(terminal): a key-bar tap no longer hides the soft keyboard that is up (#3597)
<!-- See CONTRIBUTING.md for checks, translations, contract tests and
the changelog (a file in changelog.d/, never CHANGELOG.md). -->
## Change
**Problem.** On Android (seen on a Galaxy S26 Ultra), with the soft
keyboard up in a terminal pane,
tapping any key-bar key (Esc, Ctrl, Tab, an arrow, More keys) hides the
keyboard. The tap's focus is
already kept (`keepFocus` cancels pointerdown and mousedown), so focus
is not what moves.
The cause is `holdKeyboardForTap()` from #3297. For every touch press of
a key it sets
`inputmode="none"` on the focused field until the click is handled. That
is right for the case #3297
fixed (#3274: Back put the keyboard away but left the field focused, and
the next key tap raised it
again). But with the keyboard **up**, switching a focused field to
`inputmode="none"` makes Blink send
the new input type to the IME, and the IME hides the keyboard that is
showing. The comment there said
it "also leaves a keyboard that is up where it is"; on this device it
does not.
**Behavior after this PR.** `holdKeyboardForTap()` returns early when
`keyboardUp()` is true (the
`data-keyboard` attribute `lib/viewport.ts` sets). With the keyboard up,
a key tap leaves `inputmode`
alone and the keyboard stays up. With the keyboard down (Back put it
away), the hold works exactly as
in #3297, so #3274 stays fixed.
This follows T3 Code's mobile terminal, whose key row over the keyboard
(arrows, esc, sticky
ctrl/alt, tab) leaves the keyboard up on every key and puts it away only
through its own explicit
dismiss button
(`apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx`).
- `src/components/KeyBar.tsx`: the early return and the corrected
comment.
- `scripts/keybar-focus-regression.ts`: a keyboard-up case. It sets
`data-keyboard`, taps Escape and
More keys, and asserts the field keeps focus and a `MutationObserver`
sees no `inputmode` change
during the taps. The keyboard-down case is unchanged.
- `changelog.d/keybar-tap-keeps-keyboard-up.md`.
Risk: the fix relies on `data-keyboard` being current at the moment of
the tap. If it lagged behind a
keyboard that was just put away, the tap would skip the hold and #3274's
re-raise could come back for
that one tap.
Note on coverage: `scripts/keybar-focus-regression.ts` is not listed in
`scripts/ci-browser.sh` and
has no line in docs/development.md. Its check still runs in CI through
`ui-contexts-checks.ts` (`checkKeyBarKeepsKeyboardDown`, run by
`ui-contexts-regression`), and the new
keyboard-up case is inside that exported check, so CI covers it. Only
the standalone script is
unlisted. `scripts/android-ime-regression.ts`, the one test that asks a
real IME whether the keyboard
is shown, needs `ANDROID_IME_SERIAL` (an emulator) and did not run here.
## Validation
- `bun run check fast` on this branch: typecheck, build and unit tests
ok (14795 pass; the one
failure, `server/copilot.test.ts` "keeps a logged binding when only the
log's timestamps change",
fails the same way on main and passed on later runs).
- After the doc-comment commit (084ad83b, comments only), `bun run check
fast` again: typecheck and build
ok; unit tests failed on the same copilot test (fails on main too), two
`pi-questionnaire-route`
timeouts and `scripts/plugin.test.ts` "stop > returns only once the
server's process group is gone".
Rerun by file, the questionnaire tests pass, and the plugin test passes
2 of 2 on this branch and on main.
- In the self-hosted runner image built from
`scripts/self-hosted-runner/Dockerfile`, as its own
user, through `bun run check run`:
- pass: `keybar-focus-regression`, `ui-contexts-regression`,
`key-bar-hold-repeat-regression`,
`key-bar-customization-demo-regression`,
`terminal-keyboard-demo-regression`,
`sticky-modifiers-regression`, `keyboard-viewport-regression`,
`terminal-input-regression`.
- skipped: `android-ime-regression` (needs an emulator; refuses physical
devices).
- On a device, by hand: Galaxy S26 Ultra, Chrome. On the 0.5.2 release
(which has #3297), a key-bar
tap with the keyboard up hid the keyboard; on this branch the keyboard
stays up through key,
modifier and arrow taps. #3274's case still holds: after Back puts the
keyboard away, a key-bar tap
leaves it down.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* fix(agents): grok lookups by session, Agy locks read last, and 503 for a Letta scan cut short (#3598)
Follow-ups to the low-severity findings the merge pass left on #3572,
#3573 and #3575, as one PR, plus what the review of this branch found on
the way. Cut from `925872654`; it merges cleanly into `origin/main` at
`c94f52572`.
## The five findings
### 1. A grok pane herdr names no session for keeps what it holds
(#3572)
`server/agent-tasks.ts`. A grok pane reported with no `agent_session`
for one snapshot lost its background count, and the hold of a turn that
ended on a task, for about ten seconds. The missing id was read as
another session, so the pane was looked up as reported. A grok session
is found by its id, so that lookup could only fail, and a failed lookup
of "another session" lets the state go at once.
herdr naming no session is not another session. A grok pane reported
without one is now asked for by the session known for it:
- Nothing is looked up while that lookup is recent.
- Once it is old, the lookup is a real one of the known id. One that
fails is a first miss as any: the count stands, the poll asks again ten
seconds on by that id, and two in a row let the pane go.
- A pane nothing is known of is asked for as herdr reports it.
- The session known is used only when it is grok's own: another agent's
id is never what a grok pane is asked for by, nor the key its miss is
remembered under.
### 2. A failed lookup is remembered with the session it was of (#3572)
`server/agent-tasks.ts`. The memory of a failed lookup was kept per pane
and agent. For grok, a miss of one session id held off the snapshot
lookup of a newly named other session for the retry interval, and could
count as the first of its two misses.
The pane's misses are now kept by session, for the agent they were of
(grok only: an agy session is found by the pane's process, so its miss
still holds whichever id herdr names). Both gates read the same entry:
the retry spacing, and the "second miss in a row" that lets a pane go.
Each session's miss stays beside the others', so herdr naming a session,
then none or another, then the first again asks for each only every ten
seconds while none of them is found.
**Known limit, left as it is.** A lookup that finds a session drops
every miss of the pane. Where herdr names in turn a session that is
found and one that is not, every snapshot looks one up and the count is
told and let go in turn: ten lookups in ten seconds, where main makes
two (and leaves the count at 0). Nothing shows herdr naming two ids in
turn for one pane; the observed case (an id, then none) is covered by
item 1. The comment on `failed` states the limit and a test pins it.
Spacing it would mean keeping the other sessions' misses through a
lookup that finds one and reading them for a pane whose session is
known, which would also hold a snapshot's lookup of a session the pane
really went back to.
### 3. Agy: herdr is asked the second time before the locks are read
(#3573)
`server/agy-store.ts`, `resolveAgyStore` and `agyFreshSession`. The
order was identity, locks, second ask, identity. It is now identity,
second ask, locks, identity, so the lock read is the last evidence
gathered and still lies inside the start-identity bracket. A second
answer that names another process ends the lookup before any lock is
read.
**What the new order costs.** The second ask is made before it is known
what the locks show:
| Case | Asks before | Asks now |
|---|---|---|
| A lookup that answers | 2 | 2 |
| A lookup that finds no single conversation lock | 1 | 2 |
| A greeting refused because a lock is held | 1 | 2 |
| A pane herdr names no single Agy for | 1 | 1 |
| An Agy whose start identity cannot be read | 1 | 1 |
| A greeting refused by its start arguments | 1 | 1 |
`docs/agy-chat.md` describes the new order and these costs, and the
unreleased fragment of #3573 (`changelog.d/agy-pane-process-recheck.md`)
is reworded to it.
### 4. Letta: no output when the pane moved during the last resolution
(#3575)
`server/conversation.ts`, the Letta branch of `toolOutput`. After the
awaited scan the pane is resolved once more, and that resolution was
only compared by its own answer. One begun before a `/new` in the pane
still names the conversation the output was read from, so when another
read saw the pane on the new conversation meanwhile, the old
conversation's output was answered. The final check now also refuses
when the binding moved since the lookup resolved it (`|| rebound(paneId,
transcript)`).
### 5. Letta: a scan cut by its time limit answers "try again" (#3575)
`server/letta.ts`, `server/file-tasks.ts`. A transcript scan stopped by
its own 10 s limit answered as "no such call" (404 `output_not_found`),
though the call may lie past where it stopped.
- `lettaToolOutput` throws `LettaScanCut` when it runs out of time with
some of what the transcript held as the scan began still unread. It
answers null as before at the end of the file, when all of that was
read, and at its 256 MiB cap.
- The file thread answers a cut scan as `{ cut: true }` (an error
crosses a thread as its message alone), and `lettaToolOutputOffThread`
rejects with `FileBusyError` for it.
- The route gains no new answer: it is the 503 `file_busy` with
`Retry-After` it already gives when no file thread is free. Only which
cases get it changes.
- The `letta-output` file task takes an optional `budgetMs`, as the
documents task does, so a test can run a scan with no time on a real
file thread.
## Beyond the five findings
**OmO has the window item 4 closes for Letta.** The OmO branch of
`toolOutput` resolved the pane a last time and compared only that answer
(older code, #3359). The review of this branch reproduced it: the held
last resolution answered the old session's output after another read had
seen the pane on a new session. The same `|| rebound(paneId,
transcript)` is added there, with a test and a changelog fragment of its
own. Please treat it as an addition to the five; it is one commit
(`7fcbbe6a2`) and can be dropped on its own.
## Tests
- `server/agent-tasks.test.ts`: a session-less grok pane keeps its count
and is asked for by the session known; a pane known as another agent's,
or let go meanwhile, is asked for as reported; a miss holds no lookup of
another session off; each session's miss is kept beside the others'; the
known limit above.
- `server/agy-store.test.ts`: the ask counts of the table above; a
stand-in Agy that moves its lock while herdr answers the second time; on
Linux the order of the reads (ask, identity, ask, locks, identity), and
that the start identity read after the locks is what refuses a pid taken
between the second answer and the lock read; a greeting with an
unreadable start identity asks once. The order test is Linux only:
elsewhere the identity is read through `ps` or a Windows handle.
- `server/letta.test.ts`: the pane moved during the last resolution; a
scan with no time answers `{ cut: true }` on the file thread and
`FileBusyError` on the pane's route, for a call the transcript holds and
for one it does not; read to the end, the answers are the output and
"not found".
- `server/conversation.test.ts`: the OmO pane moved during the last
resolution ("old session" before the fix, no output now).
## Changelog
`changelog.d/grok-unnamed-session-keeps-count.md`,
`letta-tool-output-try-again.md` and `omo-tool-output-pane-moved.md` are
new; `agy-pane-process-recheck.md` (#3573, unreleased) is reworded to
the new order.
## Validation
Run at head `aa59268f9`, with `HERDR_TEST_MODE=unit` and a `TMPDIR` of
its own:
- `bun test server/agent-tasks.test.ts`: 23 pass
- `bun test server/agy-store.test.ts`: 24 pass
- `bun test server/conversation.test.ts`: 253 pass
- `bun test server/letta.test.ts`: 81 pass
- `bun test server/file-pool.test.ts`: 21 pass
- `bun test server/core/status.test.ts`: 82 pass
- `bun test server/conventions.test.ts`: 14 pass
- `bun test scripts/changelog-fold.test.ts`: 12 pass
- `bun run typecheck`: clean
`bun run check fast` at `aa59268f9`: green (unit 14797 pass, 0 fail;
typecheck, build, generated files).
Reviewed before opening by an independent agent reviewer in three rounds
(one medium and several low findings, all fixed or listed above; the
last round: ship).
Not run: `bun run check full` and the browser regressions (no `src/`
change). Nothing was run on macOS or Windows; the Agy path on macOS is
untested natively, as `docs/agy-chat.md` already says.
`server/agy-store.ts` is imported by `server/windows-native.test.ts`, so
this waits for GitHub's Native Windows job.
## Notes for the merge pass
- Item 5 changes which cases of `GET /api/pane/conversation/tool-output`
answer 503 instead of 404, so this PR touches an HTTP answer and waits
for a real review.
- The message of `8c44a2908` gives a wrong reason for the `known?.agent
=== agent` clause (a saved herdr call). `resolveGrokStore` refuses a
session that is not grok's before it asks herdr anything; the clause
only keeps another agent's id out of what a grok pane is asked for by
and remembered under. `aa59268f9`'s message corrects it; a squash
message should not carry the old line.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.2 <[email protected]>
* fix(connect): no socket row for a named session beside an older Ovis; a refusal notice reads the global relay's own refusal (#3599)
## Change
Follow-ups to the low findings the merge pass listed on #3576 and #3579,
one commit each. No HTTP/WS contract change and no new strings.
**1. Adding a PC over SSH: herdr's own socket is offered beside an older
Ovis only when no session is named (#3576)** — `server/machines.ts`
Adding a PC over SSH that runs an older Ovis, with no runtime of this
app there, offers herdr's own socket as a session row built from the
socket file. With a session typed in the dialog, that row was the named
session's socket. Chosen, the PC was saved with the socket (only the
default session's socket is saved as herdr to start), so after that PC
restarted its bridge said the session was no longer running instead of
starting it by its name.
The row is now built only when the dialog names no session (`!session &&
answered && !listedHere`). A named session connects as it did before the
card existed: the approval of what the setup installs, then a bridge
started for the session by its name.
`server/machine-core-choice.test.ts` ("older peer, no bundle") adds the
named session: it reaches the approval with no card, and the bridge is
started with the session and no chosen socket. The unreleased changelog
entry of #3576 (`changelog.d/ssh-add-pc-default-session-restart.md`) now
says the offer is for a dialog that names no session.
**2. Before the announced date, a refusal notice needs the global link's
own pass refusal (#3579)** — `src/lib/relayNotice.ts`
Before the date, the notice over the pane read a refusal from the
refused flag beside the global link in error. A regional relay's refusal
sets that flag too, and a global link that dropped for the network is in
error as well (`relay_unreachable`), so a regional refusal plus a
network error showed "add this PC", "PC limit" or "needs an account" for
as long as the global link was down.
Before the date a refusal is now the global link's own: the flag, the
link in error, and an error code that names the pass (`pass_*`). A
server from before the codes names none and is read as before. Past the
date, and with no date, nothing changes: the flag beside any error still
reads as a refusal there.
**3. A dismissed not-listed or PC-limit notice stays dismissed while the
PC asks the relay again (#3579)** — `src/lib/relayNotice.ts`
Before the date, a PC the relay closed for its pass looks again every 30
minutes and whenever a pass comes, and each attempt reads `connecting`.
The not-listed and PC-limit notices read "no notice needed" for that
window, which `useRelayNotice` takes as the state being over: it removed
the stored dismissal, and the notice the user had dismissed showed again
after the next refusal.
While the refused flag stands and the global link has neither let the PC
in nor refused it for its pass (it is connecting, or in error for
another reason such as `relay_unreachable` between attempts), the
reading is now "not known" (`undefined`) where nothing else shows: no
notice, and stored dismissals are kept, as before a first answer. No
refusal is read from it, so a regional relay's refusal during a global
reconnect still shows none. The link online, with the flag set or
cleared, still ends the dismissal, and the sign-in reminder that names
the date still shows meanwhile.
`src/components/RelayNotice.test.tsx` covers 2 and 3: the flag beside
`relay_unreachable`, `server_key_refused` and `start_failed` before the
date; every `pass_*` code; the flag beside a network error past the
date; and `useRelayNotice` driven through a refusal, its retry and the
next refusal for both notices, including a page load that lands in the
retry.
No changelog fragment for 2 and 3: they correct the before-the-date
reading that #3579 added, which is not released, and its fragment
(`changelog.d/relay-notice-open-visitor-refusal.md`) still reads true.
Nothing visible is designed anew (the notice, its wording and its
dismissal are as #3579 left them), so no reference app is named.
### Not in this PR
Two low findings from the review of this branch. Both are confirmed,
both are older than this branch and #3579, and both are outside the
three items above, so they are left for a follow-up.
- **A dismissed refusal notice can still come back in two other ways.**
(a) "Needs an account" (a PC with no account): after the link's
30-minute look-again reads `connecting`, the reading is the sign-in
reminder or nothing, the stored dismissal is removed, and the next
refusal shows the notice again. (b) Not-listed and PC-limit: when the
account service request made on a refusal fails, `pass.state` reads
`unavailable`, the reading is "no notice needed", and the dismissal is
removed. Both happen on v0.5.2 with no date. Reproduced with real
`RelayService` statuses against an enforcing relay, through
`useRelayNotice`. The fix belongs in the hook: keep a refusal's
dismissal while the status still carries the refused flag and the link
is not online. That changes what a dismissal means in released
behaviour, so it gets its own PR and changelog entry.
- **The relay status line in Settings (`statusText`,
`src/components/RelayPanel.tsx`) still reads the refused flag beside any
error as a refusal.** With a regional relay's refusal and the global
link down for the network before the date, it says "Add this PC to your
Ovis account…" while the notice over the pane now says nothing. Before
this PR both said it. `RelayPanel.tsx` is unchanged since v0.5.2. The
follow-up has to share the notice's date rule with `statusText`: the
code rule alone would make the two disagree past the date instead.
## Validation
At `c8c0d0656`, with `TMPDIR=$HOME/.cache/ovis-tmp/fu-b
HERDR_TEST_MODE=unit`:
- `bun test src/components/RelayNotice.test.tsx`: 26 pass
- `bun test src/components/RelayPanel.test.ts`: 1 pass
- `bun test server/machine-core-choice.test.ts`: 44 pass
- `bun test scripts/changelog-fold.test.ts`: 12 pass
- `bun test src/conventions.test.ts`: 10 pass
- `bun test server/conventions.test.ts`: 14 pass
- `bun run typecheck`: exit 0
`bun run check fast` at `c8c0d0656`: green (unit 14796 pass, 0 fail;
typecheck, build, generated files).
Browser, on the host (not in the CI runner image; this PR's CI runs it
there): `scripts/relay-direct-demo-regression.ts` passed (6 checks, the
grace and data-limit notices included).
Reviewed before opening by an independent agent reviewer: ship, with the
two low findings listed under "Not in this PR".
Not run: `bun run check full`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.2 <[email protected]>
* fix(chat): a visualization card draws for any mode, names its file on its button and copies as two lines (#3589)
## Change
Follow-ups from the review of #3450 (the Codex visualization reference
card), four small items:
- **Any mode draws the card.** A reference whose `mode` was not `"wide"`
stayed raw reference text, and `wide` was never used. `mode` is no
longer read, so every mode draws the same card, also one this app has
never seen. `wide` is gone from `VisualizationReference`.
- **Each button names its file.** Several cards carry the same words,
"Open preview". Each button is now described by its own card's file name
(`aria-describedby`).
- **A copied selection of a card is two lines.** Measured in Chrome on
`main`: the plain text of a selection took the button's words ("…\nOpen
preview"), and the chat's rich copy ran the name and the title together,
since `lib/markdownClipboard.ts` keeps no line for a span. The button is
now `user-select: none`, and a `<br hidden>` between the two keeps them
apart in the rich copy. The page draws nothing new.
- **Wording.** DESIGN.md and the component comment said a press always
lands in a dialog that holds the focus. With **Show beside the pane**
the viewer is a panel beside the pane, where the rest of the app stays
in reach. Both say so now.
No server change.
## Validation
- `bun run check fast` passed at 13141467f: 14797 pass, 0 fail.
- `bun scripts/chat-visualization-browser-qa.ts` passed three times on
fresh builds. New in it: the button's description is the file's name,
the button is not selectable, the chat's copy of a card is `name\ntitle`
as plain text and `name<br>title` as rich text, and a reference with
`mode: "split"` draws its card.
- `shared/visualization.test.ts`: every mode, a known one, an unknown
one and a non-string, gives the same reference and block. It fails on
`main`, where an unknown mode is no reference.
- `src/components/Visualization.test.tsx`: the button's
`aria-describedby` points at the name alone, and the hidden break sits
between the name and the title. It fails on `main`.
- Not run: the integration suite and the other browser regressions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.2 <[email protected]>
* fix(runner): the build cache keeps each build under the run that built it (needs owner OK) (#3585)
## Why
Follow-up to #3567, from the merge pass's review of it (its third note).
On the self-hosted runner the jobs of one CI run share the client build:
the first job to build hands `dist/` to the launcher under a key, and
the launcher takes it into the cache when GitHub confirms that the slot
runs a job of a trusted run (a push to `main`, or a pull request the
writer login opened, at its head). It never checked that the **key** was
that run's. The key is a hash the job computes itself; it is only the
job's word for what it built.
So a trusted pull request's run (agents open PRs as the maintainer
account, and CI runs before review) could hand in a build under the key
of a new commit of `main` before main's own run builds it. Main's
Integration and Browser jobs would then restore and test that `dist/`.
Since #3567 a release can be validated by main's run, so that build
could stand behind a release too.
## What
**An entry belongs to the run that wrote it.**
- The launcher's promoter
(`scripts/self-hosted-runner/build-cache-promote.sh`) files an admitted
build as `entries/<run id>/<key>`, under the run GitHub confirmed for
the slot. The run's directory is made by the promoter, must be a real
directory of its own user, and is never followed through a link.
- A job (`scripts/build-cache.ts`) reads, waits and checks "stored" only
under `<cache>/<GITHUB_RUN_ID>/`. With no usable run id it builds
without the cache.
- The lock carries the run too (`.lock-<key>-<run id>`): another run of
the same commit reads other entries, so waiting for its build gains
nothing. A waiting job waits for one job's build, not for a chain of
them.
- Eviction walks the runs' directories, keeps the most recently used
entries of all runs within the limit, and removes a run's directory once
it is empty.
- What a launcher from before filed by the key alone (`entries/<key>`)
is removed in the new launcher's first pass: a job of a commit from
before would still read it there, whichever run had filed it.
- A cache of one's own (no outbox) is unchanged.
Sharing between runs was never the purpose: the jobs of one run are. A
rerun keeps its run id.
## The launcher is an installed copy
`build-cache.ts` comes with the commit a run checks out; the promoter is
the copy installed on each runner host, updated by hand. While the two
differ, both directions end in "no hit, every job builds", measured with
the real scripts of each side (4 jobs of one run, a 2 s build, 0.3 s per
GitHub answer):
| Jobs | Launcher | Seconds per job | Builds | |
|---|---|---|---|---|
| new | new | 3.3 / 3.3 / 3.3 / 3.2 | 1 | the cache hits |
| new | old | 3.3 / 6.5 / 6.5 / 6.5 | 4 | from this merge until the
installed copy is updated |
| old | new | 3.4 / 6.6 / 9.8 / 12.7 | 4 | reruns of runs from before,
runs in flight at the update |
No wait runs out, nothing fails, and nothing wrong is restored. Main's
runs are safe from the merge on, whichever launcher is installed: a job
of the new code never reads where the old launcher files.
**After the merge the owner updates the installed launcher** on every
host whose launcher runs with `--build-cache`: copy
`scripts/self-hosted-runner/` over `~/.local/share/ovis-ci-runner` by
rename (`rsync -a` does; the promoter is started from that directory
every second) and restart the unit, as the README says. Merge first,
then update: the other order makes the jobs of every run in flight build
one after another. Until then every job builds (about one build later
than with no cache) and the job log says `was not filed under this run
but by its key alone`; this PR's own CI run will show that line. I did
not touch the installed copy or the running runners.
## Proof
- **The attack is a test** (`scripts/build-cache.test.ts`, "never
restores, in main's run, a build that a pull request's run handed in
under the key of main's commit"): run 200, a trusted pull request's,
hands in a build under the key main's run 100 then looks for; main's job
does not restore it and builds its own. Against `main`'s two scripts
that test fails: main's job restores the pull request's build without
building (13 of the 48 tests fail there).
- An independent review agent tried to break it: 16 spellings of main's
run id in a claim from a pull request's slot (`0100`, `+100`, `0x64`,
`1e2`, `100/../100`, twenty digits, ...) against a stand-in GitHub that
reads run ids leniently filed nothing under main's run; FIFOs, links and
directories as claim, tar and marker wrote nothing outside `entries/`.
Its verdict was ready, with three notes, all in this head: the removal
of the old flat entries, the log line that blamed an old launcher (true
only with one now), and "every runner host" in the docs.
- 19 mutations, each caught: the reader looking by the key alone again;
the promoter filing by the key alone; a run directory trusted through a
link; eviction following a linked run directory or leaving empty ones;
any string accepted as a run; the lock without the run; "already there"
or "stored" tested by the key alone; the old flat entries left in place;
and others.
## Validation
- `bun run check fast`: pass on this head (14784 unit tests pass, 0
fail).
- `bun test scripts/build-cache.test.ts
scripts/self-hosted-runner.test.ts`: 48 and 53 pass. `bash -n` on both
shell scripts; shellcheck is not installed here.
- Both transition directions run end to end with `main`'s scripts
against these.
- **Not run:** real GitHub answers, Docker mounts, the installed
launcher and live runners (not to be touched). The first CI run after
the launcher is updated is that proof: its jobs log `hit <key>` after
the first one's `stored`.
- Skipped: integration and browser suites.
## Not in this PR
- The slot is tied to the run by the runner's name, as before. In 1,114
self-hosted jobs sampled, no two runs' jobs overlapped on one runner
name; each registration also has its own `runner_id` should a tighter
check be wanted.
- The other two notes of that review are #3580.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.2 <[email protected]>
* fix(pending): recover disconnected untyped queued follow-ups as held (#3173)
## Change
When an interactive socket disconnects or reloads while a queued
follow-up message is still waiting (`state: "queued"` and
`!item.inFlight`, or an in-flight attempt fails before typing),
`PendingInputs.hold` transitions the server's record to `"held"`
(`reason: "owner_disconnected"`). However:
1. On connection close (`end(client, "closed")`), `state.closing = true`
is already set before `pending.close(client)` runs, so the owner socket
never receives that `"held"` transition frame.
2. On the client (`PendingMessageStore`), `suspend()` and `restored()`
conservatively convert any `"queued"` or `"sending"` row to
`"uncertain"` (`serverOwned: false`) because the browser alone cannot
know whether the server began typing before the socket dropped.
As a result, when a mobile or desktop browser loses its WebSocket
connection while a follow-up is sitting in the queue (`Will send when
ready`), reconnecting leaves the saved copy stuck in `"uncertain"`
(`"Not confirmed. Check the terminal before sending again."`) with no
**Send now** button, even though the server knows nothing was ever
typed.
This change extends the existing resumable follow-up receipt mechanism
(`#2421`, bounded to 10 minutes / 1024 entries / matching `deviceId` +
`receipt_resume_id`) with `outcome: "held"`:
- When a follow-up with a `resumeKey` transitions to `"held"`,
`keepReceipts` records `{ outcome: "held", resumed: true }` in
`completed` (and pushes it to any already-attached successor with the
same `resumeKey`).
- If the held copy later leaves `"held"` (`"sending"`, `"uncertain"`) or
is settled (`"sent"`, `"discarded"`, `"dismissed"`), including via
`resend_id` after the 60s closed-owner retention window expires, the
`"held"` receipt is superseded or removed so a later reconnect cannot
overwrite a newer state.
- On the client (`PendingMessageStore`), receiving `{ id, outcome:
"held", resumed: true }` (either after snapshot lifetime proof or before
it via `earlyResumedReceipts`) transitions a non-authoritative saved
copy (`!serverOwned`, unproved, `!piReceipt`, `!resendInFlight`,
`!unconfirmed`) from `"uncertain"` to `"held"` and persists `state:
"held"` to storage, restoring **Held message — review and send** and
**`↑ Send now`**.
## Validation
- `bun scripts/typecheck.ts` — passed
- `bun run build` — passed
- `bun test src/lib/pendingMessages.test.ts` — passed (43/43, including
new unit test for recovering a disconnected queued message as `"held"`
without rearming an in-flight resend or unconfirmed copy)
- `bun test src/lib/machineSession.test.ts` — passed (30/30, including
early resumed `"held"` receipt settlement after snapshot lifetime proof)
- `bun test server/core/pending.test.ts` — passed (59/59, including
11-case parameterized suite covering `held on close`, `overlapping
reload`, `held after reattach`, `wrong browser`, `wrong device`,
`read-only`, `revoked`, `owner revoked`, `expired`, `resent after
closed-owner expiry`, and `ambiguous resend after closed-owner expiry`)
- `bun test server/pending-input.contract.test.ts` — passed (115/115,
including contract test verifying end-to-end WebSocket replay of a
`"held"` receipt on reconnect without typing again)
---
## Maintainer update (behaviour change, accepted by the maintainer)
This PR now follows a stricter rule for held messages than v0.5.1:
- A held copy offers **Send now** only on live proof: its own live
connection, or the bridge's held receipt for this browser within the
receipt's ten-minute window. It is never sent automatically.
- A **saved** held copy (after a reload, in another tab, after the
connection that held it ended, or one an older release saved) shows as
uncertain ("Not confirmed. Check the terminal before sending again.",
Copy and Discard only) until such a receipt proves it again.
- Consequence, deliberate: a held copy on a remote PC (its relay strips
the resume ID), after an Ovis server restart or update, past the ten
minutes, or one held for another reason (for example
`pending_turn_unconfirmed`) once its connection is gone, no longer
offers Send now. DESIGN.md says so.
- Wire: held receipt frames carry `held` (IDs), `held_ms` (time the
bridge still keeps each, 0 < ms <= 600000) and `held_until` (its end on
the PC's clock); the `features` frame carries `server_time`. All are
optional, and clients that predate them ignore them. The page holds a
copy until the sooner of arrival + `held_ms` and `held_until` on its own
clock.
- A resend checks and claims its receipt inside the pane's serialized
turn by the original ID, for its own pane and browser, so concurrent
resends type once.
## Validation (maintainer, head 3c361ab0)
- `bun run check fast`, plus `server/core/pending.test.ts`,
`server/pending-input.test.ts`, `src/lib/pendingMessages.test.ts`,
`src/lib/machineSession.test.ts` and
`server/pending-input.contract.test.ts`.
- In the CI runner image (`herdr-ci-runner:local`), on a freshly
installed and built clone:
- pass: pending-pane-switch-regression (proven lost connection and
reload; unproven other browser, expired receipt, ambiguous send, proven
on another page, page left open past the window),
chat-local-send-follow-demo-regression, chat-size-regression,
composer-fit-demo-regression, restored-draft-demo-regression,
terminal-autoswitch-demo-regression,
terminal-paste-insert-demo-regression, new-session-skills-browser-qa;
- ui-regression: passes its pending step, then stops locally at the New
workspace folder browser, which fails the same way on v0.5.1 in that
image;
- machines-browser-qa: not run, it needs an SSH fixture and is not part
of CI.
---
## Maintainer update 2 (owner's call, head b2799bf05)
A hold the person made on purpose is exempt from the rule above:
- **Exempt:** a message held at its sender's request (`delivery:
"hold"`: Alt+Enter, #3463, or a follow-up with automatic sending off).
It stays held, with Send now, through a lost connection, a reload,
another tab and a restart or update of the server, as on `main`, and
takes no receipt's ten-minute end. Only a Send now that may have typed
it makes it uncertain.
- **Still under the rule:** an untyped queued follow-up held as its
connection closed, and a copy the bridge held for a reason of its own.
Saved, these are uncertain until the bridge's held receipt proves them
again.
- **How the page tells them apart:** the bridge holds a requested hold
with no reason and names a reason for every hold of its own. The page
keeps that as a mark on the saved copy. There is no wire change.
Validation at b2799bf05: `bun run check fast` (14736 pass, 0 fail) and
`composer-fit-demo-regression`; at 274ceb81c, before `main` was merged
in again: `server/pending-input.contract.test.ts` (123 pass),
`pending-pane-switch-regression` and `restored-draft-demo-regression`.
Not run locally: `chat-size-regression`, `ui-regression` and the rest of
the browser lane.
## Maintainer update 3 (head 3922dcb45)
- A receipt's proof ends with the connection that brought it, and only
that one: on a page that shows several PCs, one PC's disconnect no
longer takes Send now from another PC's held copy.
- A tab still on an older bundle, which saves the list without the
request mark, no longer turns a requested hold uncertain in an updated
tab.
- A connection that may not resume when it closes (read-only, revoked)
still leaves the `sent` receipt of a send that ends after the close.
- The changelog has a `### Changed` entry for the deliberate change
described in the first maintainer update.
Validation at 3922dcb45: `bun run check fast` (14758 pass, 0 fail),
`server/pending-input.contract.test.ts` (123 pass),
`pending-pane-switch-regression` and `composer-fit-demo-regression`. Not
run locally: `chat-size-regression`, `restored-draft-demo-regression`,
`ui-regression` and the rest of the browser lane.
## Maintainer update 4 (head bcdfdfab9)
- A `sent` receipt is never dropped before its ten minutes, however many
other receipts follow: a copy another tab still holds on a held receipt
is not typed again.
- Corrections to the text above: the ten minutes run from when the
bridge held the copy as its connection closed; a remote PC on this
version does replay the held receipt for a controlling browser (the
relay scopes the resume ID, it does not strip it); a reload or another
tab of the same browser inside the window shows the copy held. What
loses Send now is the end of the ten minutes, a restart or update of
this server or the PC's, a remote PC on an older version, and a
watch-only attach.
Validation at bcdfdfab9: `bun run check fast` (14838 pass, 0 fail) and
`server/pending-input.contract.test.ts` (123 pass). The browser
regressions were not run locally this round.
---------
Co-authored-by: Jimbb <[email protected]>
Co-authored-by: devswha <[email protected]>
Co-authored-by: devswha <[email protected]>
Co-authored-by: Claude Fable 5.2 <[email protected]>
* fix(cli): ovis add takes a line as an answer only when it was typed after its request was shown (#3581)
## What
Follow-up of #3539 (`ovis add` / `login` / `link`,
`scripts/plugin-link.ts`). It closes what the reviews of #3539 left
open, and what the reviews of this branch then found:
- **An approval carries the request's digits.** The terminal no longer
asks y/N. The question shows the device's six digits and asks for them:
`{label} wants to join your account. Approve it only if its screen shows
123 456. Type 456 to approve, or press Enter to decline: `. All six
digits (with or without the space) or the last three approve; anything
else declines, a bare Enter and `y` among them (`y` gets "Declined: only
a request's digits approve it, not y."). `pair --approve` asks the same
way.
- A line answers a request only when it was typed after that request's
question, with its six digits, was on the screen. A line typed ahead,
while nothing is asked, or twice is dropped with a line saying so.
- The first line the terminal hands over after a request left the screen
unanswered answers nothing (what was typed at that request and not sent
would otherwise arrive under the next one).
- Input that is not a terminal (`yes | ovis add`, a pipe that writes
later, a file, a closed stdin, `ssh` without `-t`) approves nothing,
whenever its lines come, and the message names the way out.
- `pending.listing` (a listing a renewal took away) is put back while
the PC is enrolling too.
- The run's last approval window and last listing no longer depend on
the next look being as fast as the last one.
- The multi-run timing tests have their own timeouts.
## How
Three guards on an approval, each with tests that fail without it:
- **Digits** (`approves(line, digits)`, exported with `approvalPrompt`
and `declinedNote`, used by `link` and by `pair --approve` in
`scripts/plugin.ts`): whitespace is removed, then the line must equal
the six digits or their last three. Digits that are not exactly six
ASCII digits are approved by nothing, and the question then asks for
none.
- **One-shot drop** (`held`): when a request whose prompt was shown
leaves the list unanswered (it ran out, was answered elsewhere, the
server restarted), lines already handed over are dropped ("no request is
waiting"), and then the next line handed over is dropped too, whenever
it comes and whatever it says: "That line answered nothing: a request
went away while it may have been typed. Answer again for the request
shown now." The prompt is printed again and the line typed under that
counts. The cost: the answer to a request that follows one that went
away is typed twice.
- **Dwell** (`DWELL_MS`, 1.5 s): a line that comes sooner after a prompt
first showed is dropped ("too soon to have compared its digits"). It
covers a key pressed twice and a second line typed right after an
answer.
Unchanged from the earlier commits:
- **One read for the whole wait** (`typing()`): lines are taken as they
come and stamped with the request whose prompt was on the screen
(`under`) and the time (`at`). Nothing is ever kept for a later request.
- **`terminal` option** (`LinkOptions.terminal`, `scripts/plugin.ts`
passes `process.stdin.isTTY === true`): anything else is never read; the
command says "This is not run in a terminal, … (over ssh, run ssh -t)."
once and declines every request as it shows. Unset counts as not a
terminal.
- **End of input and read errors**: a terminal whose input ends (Ctrl+D)
is said to have, when it does, and declines fro…
A split workspace could show done while another agent pane was still working. Workspace and tab badges now aggregate all agent panes: working takes precedence, and done requires all agents to finish. Ordinary shell panes do not prevent completion.
Completion acknowledgement is applied after the raw status aggregation, so reading one finished pane keeps a sibling's unread completion visible until all finishes have been read. Covers desktop sidebar, phone drawer, tabs, inactive tabs and collapsed workspace groups; the command palette retains its per-pane statuses.
The second independent review passed on 98e2e42 with no remaining findings, including additional reload and new-turn browser checks.
Decisions by the human
The human explicitly requested “merge it” after the corrected commit 98e2e42 passed the second review.
The human approved merging PR fix(status): aggregate split workspace agent activity #32 without the required GitHub CI jobs after GitHub refused to run Actions on this fork. Merge uses the 151 passing scoped tests, scoped typecheck, desktop/phone browser checks, and the passing independent review on 98e2e42.
Checks run
All post-commit checks below ran on 98e2e42.
$TMPDIRwas/var/folders/g8/xkvsdx7d0p59h5m91c1rnw800000gn/T/hp-501/1cd2a2/OVS-33.HERDR_TEST_MODE=unit bun test src/lib/status.test.ts src/lib/sidebarAgents.test.ts src/lib/paletteSearch.test.ts src/lib/sidebarOrder.test.ts src/lib/sidebarActivity.hook.test.ts scripts/demo-pane-layout.test.ts scripts/changelog-fold.test.ts src/conventions.test.ts scripts/conventions.test.ts— 151 passed, 0 failed, 455 assertions on 98e2e42. Includes source/script conventions and changelog checks. Before the commit,HERDR_TEST_MODE=unit bun test src/lib/status.test.ts src/lib/sidebarAgents.test.ts src/lib/sidebarOrder.test.tspassed 40 tests on the same final helper/test implementation.bun node_modules/typescript/bin/tsc --noEmit -p "$TMPDIR/tsconfig.split-status.json"— clean on 98e2e42. The scoped config extends the repository tsconfig, includes Sidebar, TabStrip, status/sidebarAgents tests and the browser regression with their imported dependencies, and excludes unrelated repository projects.git diff --check— clean on 98e2e42; worktree clean after commit.CHROME_PATH='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' HERDR_DEMO_BUILD="$TMPDIR/review-demo-build" UI_EVIDENCE_DIR="$TMPDIR/review-evidence" SIDEBAR_FINISH_CASE=split-unread-finish bun scripts/sidebar-activity-demo-regression.ts— passed on 98e2e42, desktop and phone. Claude 201 acknowledged + Codex 202 unread => workspace done; both acknowledged => workspace idle; tab remains done. No browser page errors. Screenshots inspected.CHROME_PATH='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' HERDR_DEMO_BUILD="$TMPDIR/review-demo-build" UI_EVIDENCE_DIR="$TMPDIR/review-evidence" SIDEBAR_FINISH_CASE=split-status bun scripts/sidebar-activity-demo-regression.ts— passed on 98e2e42: working/done in either order, desktop and phone, inactive tabs, collapsed workspace groups, all-done completion, and command-palette pane states. No browser page errors.bun scripts/demo-build.ts "$TMPDIR/review-demo-build"— passed before commit 98e2e42; the compiled product sources exactly match that commit. Subsequent changes only synchronized screenshots in the browser test, which runs directly from source. The production demo build was used for both final browser checks.bash /Users/hallel/.agents/skills/no-smell/scripts/check.sh 6cc35a60— exit 1 on 98e2e42: two categories of pre-existing findings in whole touched files (JSON parsing and positional parameters). No new findings. Before committing the final diff,git diff --name-only -- '*.ts' '*.tsx' | while IFS= read -r file; do jq -n --arg file "$PWD/$file" '{tool_input: {file_path: $file}}' | bash /Users/hallel/.agents/skills/no-smell/scripts/hook.sh; done— no introduced-line findings. These existing lines were left outside the fix.The focused new test first reproduced the review failure (expected done, received idle) on the uncorrected helper. Early browser attempts exposed test setup issues (terminal selection on phone and drawer screenshot timing); both were corrected and the final committed browser cases above pass.
Not run: repository-wide fast/integration/native checks, because scoped commands cover the changed frontend helper and regression script; GitHub refused to run Actions on this fork; the human explicitly approved merging without those CI jobs. No server, wire contract, native app or dependency changed. No standalone linter is configured; the scoped convention tests and style checks above were used. The browser fixture's hidden-composer case passed on the original implementation commit 6cc35a6; it was not repeated because this correction does not alter that fixture.