Skip to content

test(desktop): end-to-end checks of a built desktop app - #2809

Merged
devswha merged 3 commits into
mainfrom
test/desktop-e2e
Nov 5, 2026
Merged

devswha merged 3 commits into
mainfrom
test/desktop-e2e

Conversation

@devswha

@devswha devswha commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

End-to-end checks of a built desktop app (app/electron), runnable headless on Linux and from a logged-in session on macOS: app/electron/scripts/e2e.ts. No workflow is changed; CI can call it later.

Each run uses a temporary HOME with its own PATH (no herdr, no hc), hc session and user data folder, so the PC's own herdr, hc core and Ovis state are never touched. The app's main process is driven through its Node inspector (--inspect-brk): before the app's code runs, the tray's menu and shell.openExternal are wrapped so the checks can press tray items and see what would open in the browser. On Linux without DISPLAY it starts its own Xvfb; without libfuse.so.2 the AppImage runs unpacked.

Scenarios:

  • first launch: the connection screen loads first, then Ovis
  • a terminal (typed text shows) and an agent pane (a stand-in claude) in the app's own core
  • quit: the server stops, the terminals keep running; relaunch finds them on the same address
  • tray: Open in Browser, close window + Open Ovis, Restart Ovis Server, Quit Ovis
  • kill -9 of the app: the server is left behind, and the next start ends it
  • --update (Linux): packages 0.0.1 and 0.0.2 from stage/ and out/, serves the newer one over local https, and checks download, Restart to Update, the replaced AppImage and the relaunched app

A check that fails for a filed bug prints KNOWN (#N) and does not fail the run (today: #2802).

Bugs found and filed: #2802 (push notice on a fresh desktop install), #2803 (OVIS_UPDATE_URL on a build without a feed), #2804 (AppImage needs libfuse2).

Validation

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 2750f52 and 59990d3.

Files selected for processing: 3

  • app/electron/README.md
  • app/electron/scripts/e2e.ts
  • changelog.d/desktop-app-e2e-checks.md
  • 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

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Review round 1: how each finding was handled

Reviewers: omo (CLEAR at 73d1560), Codex adversarial (gpt-6.1-terra, xhigh), one gate reviewer.

Codex:

  1. HIGH, cleanup killed every process whose command line held the temp root: fixed. Every process the run starts carries a random OVIS_E2E_RUN id in its environment (inherited by the server, the hc core and terminals); cleanup ends only processes whose environment holds that id (/proc/<pid>/environ on Linux, ps -E on macOS), and sweeps until none is left, since a server still up could start the core again mid-cleanup.
  2. MEDIUM, inspector port race: fixed. Before the hook runs, the paused process must report this run's id, or the launch fails without touching it.
  3. MEDIUM, cleanup skipped on failure paths: fixed. Xvfb starts inside the try, its spawn error is handled, results are written in a nested try/finally before cleanup, and SIGINT/SIGTERM run the cleanup.
  4. MEDIUM, UI not checked: partly. The window is now checked to list both workspaces after creation and after relaunch. Typing through the rendered terminal is left out (the README says terminals are driven through the server's API).
  5. MEDIUM, tray: scoped. Items are pressed through their menu only when enabled; the README says the drawn tray icon is not checked.
  6. MEDIUM, update checks: fixed. The installed AppImage must hash to the feed's new build (and be the only one left); the update run uses the app's default user data folder, so the relaunch must come back from the new file with the same saved port and a new server.
  7. MEDIUM, waits that could hang: fixed. Each probe is bounded by the wait's deadline, and the first debugger pause has its own deadline.
  8. MEDIUM, reusing an authenticated DISPLAY: fixed. Linux always uses an Xvfb of its own.
  9. MEDIUM, default output deleted with the root: fixed. The default output folder is a separate temporary folder that is kept.
  10. LOW, --update packages with electron-builder's usual caches: documented in the README.

Re-run after the fixes: Linux lifecycle 28/29 + 1 known (#2802), Linux --update 10/10, macOS lifecycle 28/29 + 1 known; no process of the run left afterwards on either machine.

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Review round 2 (Codex re-review at 24419c1): no HIGH

The fix round held: cleanup matches the run id, not command lines. Remaining findings are left as they are under this lane's one-fix-round rule; none is user-facing (they concern the test harness):

  • MEDIUM: the inspector port is released before Electron binds it; a foreign --inspect-brk listener taking it in that gap would get Debugger.enable and runIfWaitingForDebugger before the run-id check rejects it. Follow-up idea: let Electron pick the port (--inspect-brk=0) and read the endpoint from its stderr.
  • MEDIUM: PID reuse between the environment scan and kill in cleanup. A pidfd (Linux) would close it; the README's "nothing else" is accurate except for that race.
  • MEDIUM: an interrupted --update does not stop electron-builder (it is not run-marked or tracked).
  • MEDIUM: the update check reads the saved port after pressing Restart to Update; reading it before would make the port check strict.
  • MEDIUM: the inspector WebSocket open, screenshots, quit and direct hc calls have no own deadline.
  • LOW: a missing app path surfaces as a timeout waiting for the inspector, not as the spawn error.

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Gate review (omo-native-gate-reviewer) at 24419c1: APPROVE

It checked each check name against what it observes and ran a negative control for the killed-app case (with no next start, the leftover server was still alive 60 s later, so the next start is what ends it). Low notes, not blocking, left for a follow-up:

  • The terminalInfo doc comment sits on runsClaude.
  • The marker check tests the same thing twice.
  • "relaunch keeps the address (and the page's storage)" checks the address only.
  • "the core runs from a copy" checks the file, not the running serve process.
  • A Linux run's log carries the AppImage unpacking file list (about 3 MB).
  • macOS isolation is proven for the app's own state; whether the system writes to the real user's preferences was not checked.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Deploying ovis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 59990d3
Status: ✅  Deploy successful!
Preview URL: https://a65eb309.ovis.pages.dev
Branch Preview URL: https://test-desktop-e2e.ovis.pages.dev

View logs

@devswha

devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Merge note: desktop app end-to-end checks (app/electron); waited for the GitHub required checks as the local gate exempts desktop-only changes. omo CLEAR at this head, threads resolved, required checks green.

@devswha
devswha merged commit 55a8e07 into main Nov 5, 2026
23 checks passed
@devswha
devswha deleted the test/desktop-e2e branch November 5, 2026 08:12
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