Skip to content

Test-only trace run (do not merge) - #30799

Closed
Jinwoo-H wants to merge 10 commits into
mainfrom
e2-6/split-handle-trace-2
Closed

Jinwoo-H wants to merge 10 commits into
mainfrom
e2-6/split-handle-trace-2

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​282 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​276
Prod 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​133 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​132

Throwaway: runs terminal-tab-close-restart-persistence ten times in the switch-on CI job on top of #30786. Will be closed unmerged.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f093939e-5896-4cb0-9a26-48efea1a15b0
📥 Commits

Reviewing files that changed from the base of the PR and between f72826f and b299b0c.

📒 Files selected for processing: 3
  • src/main/runtime/session-lifecycle/close/close-by-split-handle-layout-owner.test.ts
  • src/main/runtime/terminal/view/layout-owner-close-relisting.ts
  • src/main/runtime/terminal/view/mobile-terminal-surface.ts

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

📝 Walkthrough

The runtime now attempts to relist a pane when the main process owns layout and no terminal surface is found for the PTY, subject to identity and layout checks. The changes add diagnostic warnings across graph, close, split, and PTY lifecycle paths. The persistence test uses fresh terminal inventories, and CI selects that test for the layout-owner job and repeats selected specs ten times.

Priority: ⬇️ Low

Merge Risk: 🟡 Moderate · up to b299b

Do not merge the trace configuration as-is: it removes layout-owner CI coverage, increases E2E run time, and adds logging on every graph sync.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description states the test-run intent but omits most required template sections, including the change details, rationale, linked issue, testing results, visual proof or N/A explanation, review no… Complete the required pull request template. Add ELI5, What Changed, Why, Linked Issue, Visual Proof or N/A with a reason, Testing steps and results, AI Disclosure if applicable, Review, Agent skill upstream boundary, Notes, and Checklist s…
Docstring Coverage Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 21 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title accurately identifies the repeated test run, but it does not describe the production diagnostics and runtime changes included in the pull request.
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: Description check

Explanation

The description states the test-run intent but omits most required template sections, including the change details, rationale, linked issue, testing results, visual proof or N/A explanation, review notes, and checklist status.

Resolution

Complete the required pull request template. Add ELI5, What Changed, Why, Linked Issue, Visual Proof or N/A with a reason, Testing steps and results, AI Disclosure if applicable, Review, Agent skill upstream boundary, Notes, and Checklist status. Report the actual test results, including the ten CI runs and any failures.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments: 2
tests/e2e/terminal-tab-close-restart-persistence.spec.ts: 1

42-48: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the trace logging before merge, or keep it only on the throwaway branch.

The stderr listener and the [e26] log line are diagnostic code. The PR is marked "do not merge," so this is acceptable only if the PR is closed unmerged, as stated. If any part is merged, remove this logging first.

Also applies to: 121-121

src/main/runtime/session-graph/e26-trace.ts: 1

4-25: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Unconditional console.warn runs on every graph sync.

traceE26GraphSync runs on every syncWindowGraph call. It logs once per sync and once per changed or removed leaf. JSON.stringify of all terminal tabs runs each time, even when nobody reads the log. This is a hot path. The PR is labeled "do not merge", so this is acceptable only if the PR stays unmerged. Gate the trace behind an env flag if any of it ships.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fe62ac95-2e42-4c7b-9f41-7dd5be220b65
📥 Commits

Reviewing files that changed from the base of the PR and between 1f555c0 and f72826f.

📒 Files selected for processing: 20
  • .github/workflows/pr.yml
  • config/scripts/pr-layout-owner-switch-on-route.mjs
  • src/main/runtime/session-graph/e26-trace.ts
  • src/main/runtime/session-graph/session-window-graph.ts
  • src/main/runtime/session-lifecycle/close/close-mobile-session-tab.ts
  • src/main/runtime/session-tabs/explicit-terminal-close-stops.ts
  • src/main/runtime/terminal/identity/pty-worktree-record.ts
  • src/main/runtime/terminal/identity/terminal-handle-bindings.ts
  • src/main/runtime/terminal/launch/terminal-split-surface.ts
  • src/main/runtime/terminal/launch/terminal-split.ts
  • src/main/runtime/terminal/lifecycle/pty-exit-lifecycle.ts
  • src/main/runtime/terminal/lifecycle/pty-handle-invalidation.ts
  • src/main/runtime/terminal/lifecycle/pty-registration.ts
  • src/main/runtime/terminal/query/pty-terminal-summary.ts
  • src/main/runtime/terminal/view/mobile-terminal-surface.ts
  • src/renderer/src/runtime/sync-runtime-graph/mobile-session-capture.ts
  • src/renderer/src/runtime/sync-runtime-graph/mobile-session-surfaces.ts
  • src/renderer/src/runtime/sync-runtime-graph/mobile-session-terminal-tabs-layout-owner.test.ts
  • tests/e2e/terminal-tab-close-restart-persistence.spec.ts
  • tests/playwright.config.ts

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

Comment thread .github/workflows/pr.yml
ref: ${{ github.sha }}
# LAYOUT_OWNER_SWITCH_ON_E2E_SPECS in config/scripts/pr-layout-owner-switch-on-route.mjs.
test_files: '["tests/e2e/workspace-layout-oracle-headless.spec.ts","tests/e2e/workspace-layout-oracle.spec.ts","tests/e2e/cli-file-open-position.spec.ts","tests/e2e/relaunch-first-terminal.spec.ts","tests/e2e/relaunch-sleeping-agents-resume-on-view.spec.ts","tests/e2e/terminal-cold-activation-deferral.spec.ts","tests/e2e/cli-first-worktree-single-terminal.spec.ts","tests/e2e/unopened-workspace-agent-single-resume.spec.ts","tests/e2e/terminal-pane-close-layout-consistency.spec.ts","tests/e2e/golden-file-open-edit-save.spec.ts","tests/e2e/golden-source-control-open-diff.spec.ts","tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts","tests/e2e/floating-workspace-pane-height.spec.ts","tests/e2e/editor-model-host-isolation.spec.ts","tests/e2e/editor-tab-selection-restore.spec.ts","tests/e2e/finished-agent-ghost-resume.spec.ts","tests/e2e/live-background-terminal-mount-authority.spec.ts","tests/e2e/workspace-back-forward-navigation.spec.ts","tests/e2e/worktree-lineage-toggle-shortcut.spec.ts","tests/e2e/local-cli-terminal-retention.spec.ts","tests/e2e/default-tabs-mark-crash-relaunch.spec.ts","tests/e2e/terminal-cli-split-closed-before-mount.spec.ts","tests/e2e/layout-stream-loss-reopen.spec.ts","tests/e2e/ssh-orcad-"]'
test_files: '["tests/e2e/terminal-tab-close-restart-persistence.spec.ts"]'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Restore the full spec list before merge.

The hardcoded test_files replaces the full list with one spec. The comment on Line 1558 says the value mirrors LAYOUT_OWNER_SWITCH_ON_E2E_SPECS. That list now has many more specs, so the two diverge. If merged, the layout-owner switch-on job loses its coverage. The PR states it is a throwaway trace run, so revert this line if any part is merged.

Comment on lines +39 to +40
// Throwaway trace run: ten passes of each selected spec.
repeatEach: process.env.CI ? 10 : undefined,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win

Do not merge repeatEach: 10 for all CI specs.

When CI is set, this setting repeats every selected spec ten times in every CI job. This multiplies the runtime of all E2E jobs. The PR states it will be closed unmerged. Revert this line if any part of the PR is merged.

E2E Test and others added 6 commits October 19, 2026 13:50
…keeps main's terminal (dark, layout-owner build only)

Co-Authored-By: Claude <[email protected]>
…n's own record of the pane (dark, layout-owner build only)

Replaces the window-side listing and the binding fill: the window's list lags main in three
ways (built before main wrote the pane, from it before the binding, or before the window mounts
it), and only main's own layout answers all three.

Co-Authored-By: Claude <[email protected]>
@Jinwoo-H

Copy link
Copy Markdown
Contributor Author

Ten switch-on runs collected; closing unmerged.

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