Skip to content

Keep Orca visible when Windows startup stalls#6462

Merged
brennanb2025 merged 1 commit into
stablyai:mainfrom
brennanb2025:6233
Jun 28, 2026
Merged

Keep Orca visible when Windows startup stalls#6462
brennanb2025 merged 1 commit into
stablyai:mainfrom
brennanb2025:6233

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Windows-only 10s fallback that reveals Orca's main window if Electron never emits the initial ready-to-show event.
  • Reuses the existing one-shot startup reveal path so saved maximized state, headless E2E behavior, and duplicate ready-to-show handling stay consistent.
  • Clears the fallback on normal reveal and window teardown, and guards destroyed windows before showing/maximizing.

Fixes #6233.

Design / Review

  • Scratch design doc: design-docs/issue-6233-window-reveal-fallback.md (ignored; not committed).
  • Design-review subagent: clean after adding teardown/destroyed-window requirements and expanded validation coverage.
  • Completeness verification subagent: complete against the reviewed design.
  • Code-review loop: two independent reviewers returned clean in the same round.
  • brennan-test-changes pass: Land.

Validation

  • pnpm exec vitest run --config config/vitest.config.ts src/main/window/createMainWindow.test.ts - 59 tests passed.
  • pnpm exec oxlint src/main/window/createMainWindow.ts src/main/window/createMainWindow.test.ts - passed.
  • pnpm run typecheck:node - passed.
  • git diff --check - no whitespace errors; only Windows LF/CRLF warnings.

Product Surface Evidence

  • Launched Orca dev from this worktree with a raw CDP attach after playwright-cli was unavailable on PATH.
  • Verified target: http://127.0.0.1:5176/.
  • Verified app identity: devRepoRoot = C:\Users\neil\orca\workspaces\orca\6233.
  • Screenshot evidence captured locally at validation-screenshots/issue-6233-electron-visible-9341.png (not committed).

Accepted Gaps

  • The actual Windows GPU/driver ready-to-show stall is hardware/driver dependent and was not reproduced directly. The fallback behavior is covered by unit simulation, while the visible Orca product surface was validated via CDP.
  • PR checks and CodeRabbit have not been stabilized yet in this fast pass.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

createMainWindow now routes the initial ready-to-show reveal through revealInitialWindow, adds a Windows-only 10-second fallback timer, and clears that timer on close. The reveal path checks for destroyed windows and the headless E2E setting before showing or maximizing the window. The test file adds helper fixtures and coverage for the Windows fallback, the Linux no-op path, headless behavior, close cleanup, and destroyed-window handling.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary, design, validation, and testing, but omits required screenshots, AI review report, security audit, and notes sections. Add the missing template sections, including screenshots or 'No visual change', AI review report, security audit, and notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: a Windows startup fallback to keep Orca visible.
Linked Issues check ✅ Passed The fallback reveal and teardown cleanup address the Windows hidden-startup failure described in #6233.
Out of Scope Changes check ✅ Passed The changes stay focused on the window-reveal fallback and related tests, with no obvious unrelated code paths added.

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.

🧹 Nitpick comments (1)
src/main/window/createMainWindow.test.ts (1)

2549-2566: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Shared handler map across window.on and webContents.on is fragile.

Both webContents.on (Line 2552) and browserWindowInstance.on (Line 2563) write into the same windowHandlers map keyed by event name, so an event registered on both targets would silently overwrite (last writer wins). The current tests only trigger window-level events (ready-to-show, closed), so this is fine today, but separating the two maps would make the fixture more robust to future cases.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: eee941d8-5fa7-44a2-9d2a-eb0f7bdda014

📥 Commits

Reviewing files that changed from the base of the PR and between b899aef and c3f4280.

📒 Files selected for processing (2)
  • src/main/window/createMainWindow.test.ts
  • src/main/window/createMainWindow.ts

@brennanb2025 brennanb2025 merged commit 5cb02a9 into stablyai:main Jun 28, 2026
2 checks passed
@brennanb2025 brennanb2025 deleted the 6233 branch June 28, 2026 19:32
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.

Orca window fails to appear on Windows 11 - process runs in background without UI

2 participants