Repository navigation
test(layout-owner): downgrade with every tab kind, #30861 detectors, restored first size - #51816
Merged
Merged
Conversation
…restored first size - downgrade alternation covers chat, browser, editor and a pinned split terminal; the release launch gets the isolated keychain args so it no longer blocks on a keychain prompt - switch-on unit checks: floating-tab poll reads no repo list (fixes the eager repo lookup in buildResolvedWorktreeFromId), a dragged-out unbound pane starts in its folder, a chat closed during create leaves no reader - e2e: a restored terminal keeps its size while main starts alone, and a cold restore without history starts at main's saved grid
…er-safety-checks # Conflicts: # config/scripts/ci/layout-owner/switch-on-unit-tests.txt
… saw before a window
…launches drop the layout setting - the restore phases run main as a windowless serve on the same profile: warm samples only after main lists both adopted terminals, cold reads each listed terminal so main starts it, then compares first sizes - the downgrade spec's release launch no longer inherits ORCA_LAYOUT_OWNER / ORCA_SERVER_LAYOUT_OWNER
…'s grid Main saved a pane's grid only when its terminal was resized, so a split pane that started at its size had none, and a cold restore without history started it at its group's size. The first layout of each terminal now saves the grid too.
…; drop the first-layout grid save The first-layout save did not cover a pane that started at its size (window resizes reach main through pty:resize, not applyLayout). Main saving a terminal's starting size is left as a follow-up; the test now gives both panes a real resize first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Before turning the new layout path on for everyone, we need proof of four things nobody had tested: an older Orca can still open a profile the new path wrote (with every kind of tab), three bugs found during the first attempt stay fixed, and a restored terminal starts at the size it had before. This PR adds those checks. One of them found a small bug, fixed here.
Before / after
Mechanism
buildResolvedWorktreeFromIdbuilt its repo lookup as a default argument, so it ran before the id was parsed. Floating and folder ids have no repo and returned null right after the parse. The lookup is now built only after the parse.pinTabchanges only the window's copy, and main's next frame overwrites it.startPanestarted nothing in unit tests.How it was tested
runtime-layout-apply, and the switch point inpublishStructuredAgentSessionCreateHydration. The 2 existing users of the fixture still pass.restored-terminal-first-sizepasses. WithpaneSizereverted it fails: panes start at 120x40 instead of the saved 59x66.restored-terminal-first-size(restore shard). The downgrade spec still needs a downloaded release, so it stays a local run, as before.Visible changes
None.
Known gap (not fixed here)
Main saves a pane's grid only when a window resizes its terminal. A pane whose terminal started at its size and was never resized has no saved grid, so a cold restore with no history starts it at its group's size. The Linux lane hit this with a fresh split. The first-size test resizes the window once so both panes have a grid. Fix: save each terminal's starting size on its pane (S-M; the spawn paths are spread out).
Performance
Slightly better: polling the floating workspace (and any id with no repo) no longer builds a lookup over every repo. A perf contract (
floating-tab-poll.performance.test.ts) pins it at zero repo-list and process-list reads, and one liveness check per terminal read. Nothing else changes outside tests.