Skip to content

test(e2e): update five stale or racy terminal and agent specs - #39982

Merged
OrcaWin merged 1 commit into
mainfrom
fix/e2e-terminal-agent-specs
Nov 8, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
fix/e2e-terminal-agent-specs

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Several end-to-end tests have been failing on the daily full run. The app was behaving as intended, but the tests were out of date or racing the app. This updates five of them so they check the current behavior and stop racing.

Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​28 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​17
Prod 0 0 0 0

What Changed

  • profile-state-terminal-restart-persistence (legacy JSON removed): since fix(automations): Run now returns the saved pending row; launcher parity #38217, automation.runNow intentionally returns the saved pending row instead of waiting for dispatch. The spec now expects pending.
  • codex-account-switch-dismiss: since fix(sidebar): extend the workspace list scrollbar hit area past the seam #38288, the sidebar seam's resize and scrollbar strips extend about 14px into the main pane. The spec clicked the pane-scoped dialog's backdrop at (8, 8), which now lands on the resize handle. It now drags to and clicks the backdrop's top center.
  • claude-sidebar-agent-view: fix(sidebar): remove Claude subagent-view eye indicator #34558 intentionally removed the "Viewing subagent …" indicator, including on collapsed rows. The spec dropped its assertion for that label. The collapse, inert-row and navigation checks stay.
  • terminal-ime-preedit-continuity: the spec changed the font size from 14 to 13 directly on xterm and never refit. The post-spawn PTY size reconcile (up to 180 frames of safeFit) then refit the pane mid-loop, from 75 to 80 columns. The cell width changed from 587/75 to 626/80, so every later preedit sample shifted by about 1/64px per glyph against the baseline. The spec now refits right after changing the font, as useTerminalFontZoom does.
  • agent-send-picker-reveal (local variants): the fixture bound its fake Claude pane to a made-up local PTY id. The mounted pane's reattach finds no such PTY and calls clearTabPtyId, so the target became "Terminal is no longer available" and was not revealed. This depended on timing (3 of 5 runs locally, the first test of a shard in CI). Local variants now spawn a real PTY for that pane. The SSH variants keep the fake id because the unreachable host never reattaches.

Why

The full E2E suite on main has been red for days, and PR CI only runs changed specs. No assertion was weakened. Each change follows an intended behavior change or removes a race.

Linked Issue

N/A (maintainer: full-suite E2E triage)

Visual Proof

N/A. These are test-only changes.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below
  • Every added test fails without this change and avoids the test anti-patterns

Linux, rootless Xvfb 1280x1024, CI-equivalent fontconfig, taskset -c 0,1, --repeat-each=5. Before the fix, the IME spec and the picker spec failed locally the same way they fail in CI. The other three fail on every CI run, on assertions tied to the intended changes above.

spec after
profile-state-terminal-restart-persistence (legacy JSON is removed) 5/5
codex-account-switch-dismiss 5/5
claude-sidebar-agent-view 5/5
terminal-ime-preedit-continuity 5/5
agent-send-picker-reveal (all 4 variants) 20/20

Risk

Level: Low. These are test-only changes. Revert with a plain revert.

@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e3094e16-ea77-4919-8e0c-b42fee2b8c21
Commits

Reviewing files that changed from the base of the PR and between da1f949 and 9a928d8.

Files selected for processing: 5

  • tests/e2e/agent-send-picker-reveal.spec.ts
  • tests/e2e/claude-sidebar-agent-view.spec.ts
  • tests/e2e/codex-account-switch-dismiss.spec.ts
  • tests/e2e/profile-state-terminal-restart-persistence.spec.ts
  • tests/e2e/terminal-ime-preedit-continuity.spec.ts

No actionable comments were generated in the recent review.

Walkthrough

Five end-to-end tests change their setup or checks. The agent picker test creates a local PTY for local targets. The terminal IME test refits the active pane after changing its font options. Other changes adjust an account-switch click location, remove a sidebar label assertion and screenshot, and expect a pending automation run.

Merge Risk: Minimal · previous review da1f9

The changes update five end-to-end tests; no merge-blocking risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title "test(e2e): update five stale or racy terminal and agent specs" matches the main change. The PR updates five end-to-end specs that were stale or racing the app, and the title names both the …
Description check Passed The description follows the repository template closely. It has the ELI5, What Changed (with a per-spec before/after and mechanism), Why, Linked Issue (marked N/A with a maintainer reason), Visual Pro…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test(e2e): update five stale or racy terminal and agent specs" matches the main change. The PR updates five end-to-end specs that were stale or racing the app, and the title names both the test scope and the reason. It is concise, follows conventional commit style, and a teammate scanning history would understand the primary change.

Full details: Description check

Explanation

The description follows the repository template closely. It has the ELI5, What Changed (with a per-spec before/after and mechanism), Why, Linked Issue (marked N/A with a maintainer reason), Visual Proof (N/A with reason), Testing with checklist and a results table, and Risk with level and revert method. Minor gaps: the Review, Agent skill upstream boundary, and Notes sections are absent, the Checklist is not ticked, and the Risk section does not name the riskiest part or what a revert would not undo. The AI Disclosure section is also missing. These are non-critical, so the description is mostly complete.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 5 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9d2ebb31-4dcd-47b7-b204-06e722fe0dcd
Commits

Reviewing files that changed from the base of the PR and between c463eff and da1f949.

Files selected for processing: 5

  • tests/e2e/agent-send-picker-reveal.spec.ts
  • tests/e2e/claude-sidebar-agent-view.spec.ts
  • tests/e2e/codex-account-switch-dismiss.spec.ts
  • tests/e2e/profile-state-terminal-restart-persistence.spec.ts
  • tests/e2e/terminal-ime-preedit-continuity.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

- profile-state restart: runNow now returns the saved pending row (#38217)
- codex account switch: click the backdrop clear of the sidebar seam strip (#38288)
- claude sidebar agent view: drop the removed subagent indicator check (#34558)
- IME preedit continuity: refit after changing the font, like font zoom
- agent send picker: bind local fixture panes to a live PTY so reattach keeps them
@OrcaWin
OrcaWin force-pushed the fix/e2e-terminal-agent-specs branch from da1f949 to 9a928d8 Compare November 8, 2026 22:00
@OrcaWin
OrcaWin merged commit 8a7dcae into main Nov 8, 2026
48 checks passed
@OrcaWin
OrcaWin deleted the fix/e2e-terminal-agent-specs branch November 8, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant