Tests-only takeover report for [#16941](https://github.com/pingdotgg/t3code/pull/16941)

Scope and state
- Worktree: /home/ubuntu/wt/terminal-preview-21
- Head repository: [hogeheer499-commits/t3code](https://github.com/hogeheer499-commits/t3code)
- Branch: fix/preview-timeout-isolation-16921
- Base branch: main; pinned origin/main: 5569a42bff98f06b297115542b25c942f8607c16
- Original contributor head: 102deab30a01e955345c4f8f9bcdb2e97d2d5d31
- Starting merged head: 30354ec5d69f9e1263957971e44574ee3ce19415
- Current head / tests commit: 8edce26a56e193a38d446d0ebeb74321bc18aa2b
- Commit title: test(server): focus preview deadline regression coverage
- Historical metadata says maintainerCanModify=true. No push was attempted.
- Contributor history remains an ancestor; no checkout, rebase, or history rewrite.
- Only the two existing test files changed. Working tree is clean.

Counts (expanded test cases, including parameterized rows)
- Original PR additions: 9 total = SessionControl 3 + ServerBrowser 6.
- Retained/rebuilt additions: 4 total = SessionControl 1 + ServerBrowser 3.
- Current main existing cases preserved: 60 total = SessionControl 10 + ServerBrowser 50.
- Before this test commit, merged branch totals: 69 = SessionControl 13 + ServerBrowser 56.
- After this test commit, totals: 64 = SessionControl 11 + ServerBrowser 53.
- Net test change: 32 inserted lines, 198 deleted lines; 166 lines removed.

Coverage retained
1. SessionControl: a running action finishes after its deadline, expired queued work is skipped at the exact dispatch boundary, and fresh queued work runs once in order.
2. Public broker: a click queued behind a gated snapshot never reaches the page after its receipt-time monotonic deadline. The caller receives the existing timeout error.
3. Public broker recording cleanup: a snapshot caller times out while its page work is still running; the queued stop does not overtake it, but still executes after its dispatch deadline once that work settles. A second stop confirms no recording remains active.
4. Initial navigation: an expired open retains its initial navigation reservation, so human input waits for navigation commit.

Removed duplicate positive-boundary, elapsed-time click, and standalone running-capture cases. Their meaningful behavior is covered by the compact queue case and recording cleanup case. Existing main tests, including viewer handoff and responsive navigation coverage for trackUntilHandoff, remain unchanged.

Synchronization uses promise gates, public broker replies as request-delivery milestones, and Effect TestClock.adjust(150) solely to trigger the real broker timeout path deterministically. No new sleep, timer polling, private-plumbing assertions, source assertions, or exhaustive operation tables were added. Existing main test synchronization was left untouched.

Red proof against main production
Temporarily replaced only SessionControl.ts and ServerBrowser.ts with their exact bytes from pinned main, keeping the rewritten tests. Ran:
./node_modules/.bin/vp test run apps/server/src/preview/SessionControl.test.ts apps/server/src/preview/ServerBrowser.test.ts -t 'finishes running work, skips expired|an expired queued click'
Result: exit 1; exactly 2 failed, 62 skipped.
- Queue regression: expired callback ran and resolved to 3 instead of rejecting.
- Public broker regression: the expired click mock was called exactly once.
Log: /tmp/terminal-preview-21/16941-tests-red-main.log

Additional focused red proof for retained invariants
Temporarily removed initialNavigation tracking and passed the deadline to recordingStop; ran:
./node_modules/.bin/vp test run apps/server/src/preview/ServerBrowser.test.ts -t 'an expired open still drains|a queued recording stop still runs'
Result: exit 1; exactly 2 failed, 51 skipped.
- Initial-navigation test observed human input before navigation commit.
- Recording cleanup rejected with PreviewAutomationTimeoutError instead of stopping.
Log: /tmp/terminal-preview-21/16941-tests-red-invariants.log

Both temporary checks used finally blocks to restore exact original production bytes. Hash checks passed; production files also match the starting merged commit exactly. SessionControl.trackUntilHandoff is preserved.
red-main: exit 1; command: ['./node_modules/.bin/vp', 'test', 'run', 'apps/server/src/preview/SessionControl.test.ts', 'apps/server/src/preview/ServerBrowser.test.ts', '-t', 'finishes running work, skips expired|an expired queued click']
Restored apps/server/src/preview/SessionControl.ts SHA256 1861e761d25f8b91119557493bcaf096a2dc5393a64aa01c38996bb8d8fe7a7c
Restored apps/server/src/preview/ServerBrowser.ts SHA256 1a259dba4a07f96ea337e776cec5d4897f6d3db4c4a60c3f4b7710b930ccfb8d
Invariant mutations restored apps/server/src/preview/ServerBrowser.ts: SHA256 1a259dba4a07f96ea337e776cec5d4897f6d3db4c4a60c3f4b7710b930ccfb8d

Green verification after restoration
- ./node_modules/.bin/vp test run apps/server/src/preview/SessionControl.test.ts apps/server/src/preview/ServerBrowser.test.ts
  Exit 0; 2 files, 64 tests passed. Final duration 3.41s.
  Log: /tmp/terminal-preview-21/16941-tests-green-final.log
- ./node_modules/.bin/vp lint apps/server/src/preview/SessionControl.test.ts apps/server/src/preview/ServerBrowser.test.ts
  Exit 0. Log: /tmp/terminal-preview-21/16941-tests-lint-final.log
- ./node_modules/.bin/vp fmt --check apps/server/src/preview/SessionControl.test.ts apps/server/src/preview/ServerBrowser.test.ts
  Exit 0. Log: /tmp/terminal-preview-21/16941-tests-format.log
- ./node_modules/.bin/tsc-rs --noEmit -p apps/server/tsconfig.json
  Exit 0; suggestions only. Log: /tmp/terminal-preview-21/16941-tests-typecheck.log
- git diff --check: passed before commit.
- git merge-base --is-ancestor original-contributor-head HEAD: passed.
- Commit hook formatted only the two staged tests; final working tree clean.

All shell commands began with export PATH="$HOME/.local/bin:$PATH". Initial bare vp invocation failed because no global vp exists; subsequent commands used the worktree binary. Initial green run also passed all 64 cases before focused red checks.

No production changes remain. No pushes, GitHub comments, other PR work, dev servers, browsers, or delegated agents. No live-client verification was performed, as requested. The PR was registered with this thread and linkage was verified.
