Skip to content

test(e2e): give wheel probes a running TUI fixture - #23691

Merged
nwparker merged 1 commit into
mainfrom
nwparker/ci-tui-wheel-fixture
Sep 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/ci-tui-wheel-fixture

Conversation

@nwparker

@nwparker nwparker commented Sep 28, 2026 •

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

ELI5

Wheel-report tests now scroll a running TUI instead of enabling mouse mode while the shell may still be starting.

What Changed

Reuse the existing fullscreen TUI fixture for the two wheel-report probes and wait until its numbered rows render. The fixture owns mouse reporting, replacing direct xterm mode injection. The exact report counts, per-tick timing, and sensitivity checks remain unchanged. The existing visible-wheel test uses the same setup helper.

Why

CI sometimes loses mouse reporting immediately or after the first tick: the original setup only waited for a pane manager, so subsequent shell startup output could reset injected modes. A running fixture establishes the intended terminal state without sleeps or retries around the assertions.

Linked Issue

https://github.com/stablyai/orca/actions/runs/36473057092/job/109102368779

Visual Proof

N/A — test fixture change only; no application behavior changes.

Testing

  • Both headless wheel tests pass locally on macOS with hidden Electron and ORCA_BACKGROUND_LAUNCH=1.
  • Existing report-count and timing assertions retained.
  • Changed-code quality gate; Linux E2E and typecheck covered by CI.
  • Visible/native-focus test remains reserved for an isolated display or CI.

Review

Reuses the fixture and launch path already exercised by this spec. No production, protocol, remote-host, or platform-specific changes.

Agent skill upstream boundary

  • Not applicable.

Checklist

  • Small and focused; self-reviewed.
  • Before/after, mechanism, and rationale explained.
  • Cross-platform and SSH impact considered.

@greptile-apps

greptile-apps Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Test fixture for terminal UI wheel event probes.

The PR appears safe to merge based on the reviewed test changes.

Summary

The PR moves two wheel-report probes from injected mouse modes to a running fullscreen TUI fixture and shares that fixture setup with the existing visible-wheel test. No actionable issue was identified.

Reviews (1) · Last reviewed commit: "test(e2e): give wheel probes a running T..."

@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: 7a05c32a-cff2-4e51-ac8d-c242818aacf0

📥 Commits

Reviewing files that changed from the base of the PR and between 55aea85 and b77d6e4.

📒 Files selected for processing (1)
  • tests/e2e/terminal-tui-wheel-reports.spec.ts

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


📝 Walkthrough

Walkthrough

The wheel-report tests now use startTuiFixture to start the TUI fixture in the active pane PTY and wait for numbered rows at offset 0. Three tests call this helper before probing wheel reports. Two report-probing helpers no longer inject mouse-reporting escape sequences or wait for a render frame.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to b77d6

The wheel-report tests now exercise activation through the real TUI fixture rather than preconditioning reporting in the probes. No actionable merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: wheel-report end-to-end probes now use a running TUI fixture.
Description check ✅ Passed The description is mostly complete and explains the user-visible test change, cause, rationale, testing, visual-proof exception, and scope. The Linked Issue value points to a GitHub Actions run rather…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • 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

  • Shared startTuiFixture helper — Extracts the launch-and-wait logic into one helper that runs visible-tui-scroll-fixture.cjs and polls readVisibleTuiOffset to 0 before returning.
  • Dropped direct mouse-mode injection — Removes pane.terminal.write('\x1b[?1003h\x1b[?1006h') plus the requestAnimationFrame settle from both header probe helpers, letting the running fixture own mouse mode.
  • Wired all three tests through the helper — The two headless tests (notched-wheel, sensitivity-scale) now start the fixture, and the @headful fullscreen test reuses the helper in place of its inline copy.

The fixture emits \x1b[?1003h\x1b[?1006h before its first render(), so waiting for offset 0 also implies the enable-mouse-events class the probes re-check is set — the row wait is strictly the later condition, not a weaker proxy. Report-count and timing assertions are untouched, so the change tightens setup without loosening what the tests pin. oxlint is clean on the file.

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

@nwparker
nwparker merged commit 0ceb3fa into main Sep 28, 2026
76 of 78 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