Files
orca/docs
Jinwoo-H 9a891b8307 fix(browser): keep headless tab order, active flag and env knobs honest
Compat-lens findings from the fourth review round (1 P1, 4 P2):

P1 — the merged listing ordered resident tabs before parked ones, so a
background park renumbered indices that pre-reclaim moved only on
create/close: an index the agent read minutes ago could close a different
tab, and a paired client's tab bar reordered whenever a tab parked or
woke. Listings now sort by the page book's creation order, which parking
cannot change.

P2 — closing the page that carried the scope's only active claim (the
parked-active holder, or the last live tab) left a worktree whose every
open page reported inactive, breaking the one-selected-tab assumption
paired clients render on. closeTab now promotes the most recently used
parked page when nothing live claims active.

P2 — claimParkedActive treated an undefined worktree as 'every worktree',
so a worktree-less page (a remote 'tab create' without --worktree) parking
while active wiped every other worktree's parked-active flag host-wide.
The claim now scopes strictly, undefined matching only undefined.

P2 — readPositiveIntEnv used parseInt, which reads '1e9' as 1: an operator
following the docs' 'set the idle window very high' advice silently got a
1ms window. Number() consumes the whole string, and trailing garbage now
falls back instead of truncating.

P2 — the docs' closed enumeration of park vetoes omitted the download and
in-flight-wake vetoes; the download one is the guarantee an operator most
needs stated, since parking cancels a download.

Renderer construction moved to offscreen-browser-renderer-attachment.ts —
the backend crossed the max-lines budget, and building + wiring a renderer
to its record was a coherent seam to split.
2026-08-20 02:45:02 -04:00
..