Skip to content

test(terminal): wait for decoy panes before host parking - #23729

Merged
nwparker merged 1 commit into
mainfrom
nwparker/ci-host-park-decoy-readiness
Sep 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/ci-host-park-decoy-readiness

Conversation

@nwparker

@nwparker nwparker commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

The host-parking test must actually visit its decoy tabs before it can expect the original terminal to park.

What Changed

Reuse parkHiddenTabBehindDecoy, which waits for each decoy's pane manager and PTY identity before activating the next tab. Previously the test issued two tab changes without waiting for either pane to mount.

Why

Parking keeps the most recently hidden tab warm. If the first decoy has not mounted before the second activates, the target can retain that exemption and the test waits five minutes for a park that never happens. The shared helper already establishes the intended setup; no production behavior, timeouts, or assertions change.

Linked Issue

STA-2854 (existing reproduction).

Visual Proof

N/A — test setup synchronization only; no product UI change.

Testing

Review

Reuses the existing cross-platform helper. All paired-client and host-side evidence remains required.

Agent skill upstream boundary

  • Not applicable.

Checklist

  • Small and focused; mechanism and rationale explained.
  • Self-reviewed; assertions and timeouts preserved.
  • Cross-platform and SSH/remote impact considered.
  • Local test and quality check pass; CI covers remaining checks.

@greptile-apps

greptile-apps Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Test helper refactored for terminal pane parking.

The PR appears safe to merge.

Summary

The test now uses the shared parking helper to wait for each host decoy pane and PTY identity before checking that the original pane parks. Paired-client, host-input, and process-identity assertions remain unchanged.

Reviews (1) · Last reviewed commit: "test(terminal): wait for decoy panes bef..."

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: f31b94ff-ee54-4ea4-9b42-e8df53d1b61f

📥 Commits

Reviewing files that changed from the base of the PR and between 2aed2cf and c7f166a.

📒 Files selected for processing (1)
  • tests/e2e/host-parked-pane-remote-viewer.spec.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.


📝 Walkthrough

Walkthrough

The end-to-end test replaces inline host decoy-tab creation and a separate parking wait with parkHiddenTabBehindDecoy. It logs client state before calling the helper with the host page, worktree, target tab, and configured park delay. Subsequent client-state logging and remote-viewer checks remain.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to c7f16

The test’s parking setup now waits for decoy readiness, and no merge-blocking issue is identified.

Architecture Summary

Architecture risk: 🔵 Low · up to c7f16

The change affects 1 system.

Changed systems: tests

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — tests (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in tests/e2e/host-parked-pane-remote-viewer.spec.ts: The test replaces the waitForTabParked import with parkHiddenTabBehindDecoy.
  • observed — Modified behavior in tests/e2e/host-parked-pane-remote-viewer.spec.ts: The test removes its inline creation of two host decoy tabs before sampling client state; that tab-creation logic no longer runs.
  • observed — Modified behavior in tests/e2e/host-parked-pane-remote-viewer.spec.ts: The test logs the client state before parking, then calls parkHiddenTabBehindDecoy with the host page, worktree, target tab, and configured park delay. This replaces logging after decoy creation and separately waiting for the target tab to park.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Title check ✅ Passed The title clearly identifies the test change: waiting for decoy panes before host parking.
Description check ✅ Passed The description is mostly complete. It explains the change, reason, testing, visual proof, scope, and cross-platform considerations. The Linked Issue section names STA-2854 but does not provide a link…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

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.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • Decoy readiness before host parking — the inline loop that created two decoy tabs back-to-back is replaced by parkHiddenTabBehindDecoy, whose createActiveTerminalTab waits for each decoy's pane manager and a settled waitForPaneIdentitySnapshot(page, 1) PTY binding before activating the next tab. This closes the race where an unmounted first decoy left the target holding the most-recently-hidden exemption.

Verified the host target is active at call time (setActiveTab(hostTabId) at host-parked-pane-remote-viewer.spec.ts:208), so the helper takes its two-decoy branch — equivalent coverage to the removed loop, now with readiness waits. waitForTabParked remains owned by other specs, and no production behavior, timeouts, or assertions changed.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker merged commit 64dbe87 into main Sep 28, 2026
43 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