Skip to content

test(terminal): load the host runtime in setup so the alt-screen chain fits its test limit - #29661

Merged
nwparker merged 1 commit into
mainfrom
nwparker/alt-screen-host-chain-cold-load
Oct 16, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/alt-screen-host-chain-cold-load

Conversation

@nwparker

@nwparker nwparker commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​49 $\color{#cf222e}{\Huge{\mathbf{−}}}$​15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​34
Prod 0 0 0 0

ELI5

One terminal test fails on main, without any PR changing it, whenever the whole terminal-pane test folder runs at once. Its first case loads Orca's entire main-process runtime from scratch inside the test itself, which takes about 19 seconds on its own. When the folder runs in parallel, that crosses the 30-second test limit. The half-finished first test then breaks the other two. This loads the runtime once, before the tests start, so all three fit easily.

What Changed

src/renderer/src/components/terminal-pane/remote-snapshot-alt-screen-host-chain.test.ts: the three main-side modules the test needs now load once in a beforeAll, in parallel, instead of cold inside the first test's body. The test logic and assertions are unchanged, and no timeout was raised.

Why

Not a timeout bump: raising the timeout would just hide a 19-second cold load. Loading in setup makes the first case take about 222 ms in a full folder run.

Reproduced on main: on origin/main (ebb9e32), pnpm test src/renderer/src/components/terminal-pane fails all 3 cases of this file. With this change, 522 of 522 test files pass.

Linked Issue

N/A (maintainer; CI flake found while running the terminal-pane suite for #29526).

Visual Proof

N/A: test-only change.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below
Run On main With this change
Full terminal-pane folder 3 failures in this file 522 / 522 files pass
This file alone 3 / 3 pass in about 19 s 3 / 3 pass in about 9 s

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Test-only. The same commit is in #29526's branch; once this lands on main, that branch drops it as already applied when it rebases.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

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
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1df73a44-af70-49a2-a0be-ef6a9187a34c
📥 Commits

Reviewing files that changed from the base of the PR and between bf22760 and 2239a1c.

📒 Files selected for processing: 1
  • src/renderer/src/components/terminal-pane/remote-snapshot-alt-screen-host-chain.test.ts
  • 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

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 78f2e9b into main Oct 16, 2026
30 checks passed
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