Workspace creation focus QA

Contribution: Christoph Leiter's PR #2986. Baseline: current main 433e67b18b7964a92d593bdc78c518143accfc8b. Original recorded implementation: 9457bb6f4053b6ab36e7eabcae0a2902176635c8. Latest verified implementation: 1b96fa4fdcf147f7d412f210ff45170a9112da8d.

These are recorded Chromium interactions with the real Expo app and isolated Linux daemons. Workspace registry updates, git worktree creation, uploaded files, and shell terminals are real. Playwright holds workspace.create.response until after the user changes workspace (or deliberately stays). Recording runs add 1.5 seconds of viewing time. The agent uses Paseo's built-in simulated provider, model ten-second-stream, mode load-test, thinking low. This does not verify a live external AI provider. The simulated provider echoes text only; file preservation is checked at the real create request and by comparing the uploaded file's bytes, not by expecting its simulated transcript to echo attachment metadata.

Before and after

Journey Current main Fix
Worktree + chat Recording Recording
Worktree + terminal Recording Recording
Empty worktree Recording Recording
Local workspace + chat Recording Recording
Local workspace + terminal Recording Recording

The worktree terminal recording shows the chosen main workspace remaining active, then opening the new workspace reveals captured: Hello from the navigation guard. Preserving a newer draft and empty local workspace are also recorded.

Chosen workspace remains active New terminal has received the submitted prompt

Context ownership repair verification

The latest head also preserves a newer fork draft's setup and chat-history context, including context-only edits that do not change the text version. Cleanup captures ownership before workspace creation begins. A regression using the previous head's background helper fails; all seven cleanup tests pass on the repair.

All ten browser journeys were rerun together and recorded on this repair: complete results, newer-draft recording. These recordings repeat the real-daemon method and platform/provider limitations above. The fork context race is verified through the real draft stores in the focused unit test; the browser newer-draft journey covers text preservation.

Context regression before, after, typecheck, lint, format.

Results

  • Current-main baseline: both original local journeys fail on the wrong final route.
  • Current-main baseline: all three explicit worktree journeys fail on the wrong final route.
  • Fix: seven local journeys pass: chat/terminal/empty with leave/stay, plus reopening a newer draft.
  • Fix: three explicit worktree journeys pass: chat/terminal/empty with navigation away.
  • Revisited workspaces retain exactly one requested agent or terminal; empty workspaces contain neither.
  • Chat request retains prompt, provider, model, mode, thinking level, working directory, and uploaded file contents.
  • Submitted drafts clear; a newer draft remains intact.
  • Focused tests: presence 4, background handoff 5, existing workspace draft-tab tests 5 passed.
  • New draft-ownership regression failed before its repair and passed afterward.
  • Full typecheck, lint, and format passed.

Reproduce

From the verified checkout:

npm install
npm run build:server
npm run build:app-deps
CI=1 E2E_WORKERS=1 E2E_RECORD_VIDEO=1 npm run test:e2e --workspace=@getpaseo/app -- e2e/browser/new-workspace-navigation-guard.spec.ts --retries=0
npm run test --workspace=@getpaseo/app -- src/screens/new-workspace/background-handoff.test.ts src/screens/new-workspace/screen-presence.test.ts src/composer/draft/workspace-tab.test.ts --bail=1
npm run typecheck
npm run lint
npm run format

The recorded local run and worktree run were separate focused invocations; the worktree invocation used --grep 'worktree '. Baseline runs used the same tests with the two modified production entry files restored from the pinned main commit. Extra helper files are unreachable from that baseline.

Raw command output is in the adjacent .txt files. ANSI formatting and local home/checkout paths have been removed; test results are unchanged.

Tested: Linux Chromium web. Not independently tested: iOS, Android, Electron on Linux/macOS/Windows, or live external agent providers. No protocol fields changed. The main developer daemon was not restarted or used for QA.

Languages
TypeScript 97.7%
JavaScript 1.6%
Shell 0.2%
Kotlin 0.2%