Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep browser automation available without a tab #30062

Mergedvoltcrash(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/30062/headmerged by juliusmarminge View on GitHub

Problem

An agent can abandon browser verification in an empty thread because preview_status returns available: false, even though preview_open works. Closing the last tab produces the same misleading result. Fixes #30061.

Change

Keep browser automation available when no tab is open; tabId: null still identifies the empty state. Correct the browser-testing skill and status tool guidance, including recovery from older servers' false result. Add a focused service regression and an agent eval case. The revised tool description is 8 bytes smaller; update the measured context budget accordingly.

Scope and approval

This is a small, focused fix for an obvious reporting bug under CONTRIBUTING's prior-issue exception: an empty tab list was incorrectly reported as unavailable automation. The test, skill, tool description and budget all support that same correction. This issue was filed immediately before the PR; it has not been maintainer-triaged.

The shared server response applies across web, desktop, mobile and connection modes. The wire shape is unchanged, and there are no client layout or provider-adapter changes.

Verification

  • The new regression failed on the original code (available: false versus expected true) before applying the fix.

  • vp test run apps/server/src/preview/ServerBrowser.test.ts: 54 passed. Covers an empty thread, closing the last tab without starting another context, and successfully reopening.

  • vp run check:changed: passed format, lint, both knip checks, GraphQL generation, affected-package typechecks, and all 57 tests in 3 selected files.

  • Real Chromium through the production browser service and automation broker, with isolated temporary state (no mocked browser):

    status in empty thread: available=true, visible=false, tabId=null
    open blank tab:         available=true, tabId=<new tab>
    close last tab:         success
    status after close:    available=true, visible=false, tabId=null
  • Eval case dry-run validated. Paid eval execution could not start because this machine lacks the required vibeproxy configuration; no model-behavior pass rate or baseline improvement is claimed. No frontend UI was changed, so no screenshot evidence is needed.

Reviewed with review-loop: 1 round with GPT-6.1 Sol on xhigh. Reviewer verdict: approved.

Created with GPT-6.1 Sol in Codex.

    1. Pushede3a5234

    2. Evidence

      Real web/server comparison, Chromium 1280×800, fresh synthetic state and an active Replay thread. The driver called the thread's real MCP tools; the labeled overlay displays their returned fields.

      Steps on both commits: preview_status({}) → preview_open({}) → close the sole tab with t3_preview_close → preview_status({}) → preview_open({}).

      Proven: base reports available:false in both empty states; head reports available:true, visible:false, tabId:null. Opening and reopening succeed on both. scenarios:prove exited 0.

      BeforeAfter
      6b8883d32fe3a5234a31
      Before: unavailable in both empty statesAfter: available in both empty states
      Before recordingAfter recording
      Full before responsesFull after responses

      Scenario driver

      Not shown:

      • The revised tool description's effect on a live model's decisions was not measured; the scenario deterministically invokes the actual tools through an active Replay thread's MCP session.
    3. juliusmarminge added labelstakeover:ready

    4. juliusmarminge removed labelstakeover:in-progress

    5. juliusmarminge merged thisfa5f736

    6. juliusmarminge closed this

    7. juliusmarminge removed labelstakeover:ready

Sign in to join this conversation.