Skip to content

fix(layout-owner): Send review notes waits for main's tab, trimmed rename, switch-on fixtures (A6-A8, D1) - #51738

Merged
Jinwoo-H merged 9 commits into
layout-owner-v2from
layout-owner-small-rows
Nov 28, 2026
Merged

Jinwoo-H merged 9 commits into
layout-owner-v2from
layout-owner-small-rows

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

With the new layout path switched on, main draws tabs a moment after a window asks for them. One shortcut gave up before main had drawn its tab, one CLI rename skipped the trimming the old path does, and a handful of tests still set things up the old way. This fixes the two real gaps and updates the tests so the switch-on lane checks them.

Census rows: A6, A7, A8, D1.

Files Added Deleted Net
Test 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​167 $\color{#cf222e}{\Huge{\mathbf{−}}}$​52 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​115
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​44 $\color{#cf222e}{\Huge{\mathbf{−}}}$​95 $\color{#cf222e}{\Huge{\mathbf{−}}}$​51

Before / after

Row Before (switch on) After
A7 The Send review notes shortcut opened Changes, saw no tab yet, and returned "not handled", so the Send menu never opened The shortcut waits for main's frame to draw the Changes tab, then opens its Send menu
D1 (found while fixing) terminal rename stored " name " untrimmed in main's layout, and a blank name was saved as spaces instead of clearing the name Main stores the name trimmed and a blank one clears it, as the switch-off path does
A6 Git graph tests failed Tests pass. The product already placed the graph through main's open-tab command; the tests had no stand-in for main
A8 Rename-onto-closed-dirty-file test failed Test passes. The test added a file with no tab, so main had no workspace to rename in. It now opens the file as a real tab
D1 9 unit tests threw pane_unbound_at_registration Fixtures bind the pane in main's layout before registering the terminal, as production does

Mechanism

  • A7 (ui-slice-agent-actions.ts): if the Changes tab is still waiting on main, the Send menu request is queued with afterPendingEntityTabs and the shortcut counts as handled. With the switch off nothing is ever pending, so it runs right away as before.
  • Rename (main-layout-renames.ts): title?.trim() || null is what goes into main's layout and the terminal record. The reply still returns the title as asked, matching the switch-off reply.
  • Renderer tests (A6, A7, A8): they install the existing layout.apply stand-in and drawTabsFromMain, and wait for main's frame after each open.
  • Main tests (D1): they use registerBoundPty (bind first, then register). In restart-agent-pane-in-place, the pane starts bound and the saved layout changes afterwards. With the switch on, main's layout is the saved layout, so a terminal it gives away holds no pane: the restart is refused as not_local, and nothing is stopped in either mode. The account-switch count case cannot happen with the switch on, so it is skipped there. runtime-terminal-names reads the name from the phone rows (listMobileSessionTabs) in both modes. Its fixture now announces session writes as the Store does, so main merges a rename into the rows phones and older desktops read.
  • Lane: the A6-A8 and D1 entries are removed from switch-on-known-unit-failures.json, so those tests must now pass.
  • No new window-side layout writes and no new merge bridges.

How it was tested

  • Switch on (ORCA_LAYOUT_OWNER=main): all 7 touched test files pass (23 passed, 2 skipped), and the lane's run-errors reporter records no unhandled or module errors. With the product change reverted, the A7 test fails. The rename trim has no test of its own: phone rows normalize the name either way, and the trim keeps main's saved layout, and what desktop windows draw from it, the same as the switch-off path.
  • Switch off: the same files pass, plus slept-agent-wake.
  • slept-agent-wake with the switch on still shows only its 12 listed B1 failures.
  • tc:web, tc:node, oxlint and oxfmt pass on the touched files.

Performance

None, because the only product changes are a one-time wait on an already pending tab and a string trim on rename.

Visible changes

  • Switch on only: the Send review notes shortcut now opens the Send menu on the first press.
  • Switch on only: orca terminal rename trims the name and clears it when the name is blank, as it already does with the switch off.
  • Nothing changes with the switch off.

T1 and T2: closed

T1 (live-background-terminal-mount-authority) and T2 (editor-tab-selection-restore) are closed, not restored. Main deleted both specs on purpose: #43047 retired the first in its suite cleanup and #43017 removed the second as low-value. Neither is in the switch-on lane, so no expected-fail mark needs removing.

Jinwoo-H and others added 9 commits November 28, 2026 03:47
Runs ORCA_LAYOUT_OWNER=main on PRs that touch layout, tabs, session,
persistence, PTY or terminal code: the units whose imports reach a
switch-reading file plus restored layout invariants, checked against a
list of known switch-on failures, and 34 restored layout e2e specs in
three shards. Known switch-on failures are marked expected-fail with
their census row.
Seed the worktree-cards notice as seen, skip orcad oracle cases when
out/orcad is not built, mark the layout-compat baseline drift (L311),
keep A3 marked on darwin only, retry once in CI, and rebalance shards.
… on hook and unhandled errors

- Drop the path filter: the lane lives on the dev branch and switch reads are spread too widely.
- Keep Vitest's exit status (stop on a crash) and record module-level and unhandled errors with a
  reporter; the check fails on them unless the known-failure list names the unhandled error.
- Move the seeded PRNG into the command test fixture and delete the restored fuzz-stream module.
- Close the no-window wake test's database in afterEach, since the expected failure throws first.
…in trims a terminal rename; fit switch-on fixtures (A6-A8, D1)
…o layout-owner-small-rows

# Conflicts:
#	config/scripts/ci/layout-owner/switch-on-known-unit-failures.json
…er-small-rows

# Conflicts:
#	config/scripts/ci/layout-owner/switch-on-known-unit-failures.json
@Jinwoo-H
Jinwoo-H merged commit 317069c into layout-owner-v2 Nov 28, 2026
65 of 66 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