Skip to content

improvement(desktop): Electron E2E for desktop tool lifetimes against a live local Sim - #8697

Merged
waleedlatif1 merged 17 commits into
stagingfrom
test/desktop-ungated-e2e
Oct 7, 2026
Merged

waleedlatif1 merged 17 commits into
stagingfrom
test/desktop-ungated-e2e

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Type of Change

  • Tests

Testing

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner October 6, 2026 22:15
@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 7, 2026 9:51am UTC

Request Review

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/test-build.yml
Comment thread apps/desktop/e2e/fixtures/live-sim.ts Outdated
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Adds CI workflow and test infrastructure for desktop E2E testing.

The PR appears safe to merge; no new actionable issue was established.

What we checked:

  • Chat IDs cannot inject patterns: The checks use chat IDs generated by the fixture, not the supplied chat titles.
  • Original delayed claim is checked: The proxy delivers the held claim even after Electron abandons it. The test requires that original request to return 410 before replaying it.

Summary

Adds eight Electron E2E tests against a live local Sim, with a recording proxy and scripted agent.

  • Covers chat switches, Stop, sign-out, approval checks, and background-executor dormancy.
  • Adds a dedicated CI job with Postgres, Redis, realtime, Xvfb, and failure artifacts.
  • Previous helper, Redis acknowledgment, delayed-claim, and CI-filter findings are addressed. The earlier Electron-install finding was correctly disputed by waleedlatif1 and conceded by Greptile.
  • No new actionable issues found. This review inspected code; it did not run the suite.
Diagram
sequenceDiagram
  participant Electron
  participant Proxy as Recording proxy
  participant Sim as Local Sim
  participant Agent as Scripted agent
  participant DB as Postgres and Redis
  Electron->>Proxy: Send chat and native-tool requests
  Proxy->>Sim: Forward or hold requests
  Sim->>Agent: Start or resume turn
  Agent-->>Sim: Issue tools or finish turn
  Sim->>DB: Save calls and outcomes
  Sim-->>Proxy: Return authorization and results
  Proxy-->>Electron: Deliver responses
Loading

Reviews (8) · Last reviewed commit: "improvement(ci): run the live desktop su..." · Reviewed by Greptile

Comment thread .github/workflows/test-build.yml Outdated
Comment thread apps/desktop/e2e/fixtures/live-sim.ts Outdated
Comment thread apps/desktop/e2e/fixtures/live-sim.ts Outdated
Comment thread apps/desktop/e2e/fixtures/live-sim.ts
@blacksmith-sh

This comment has been minimized.

@blacksmith-sh

This comment has been minimized.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptileai review

Comment thread apps/desktop/e2e/desktop-tools-live-sim.spec.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptileai review

Comment thread apps/desktop/e2e/desktop-tools-live-sim.spec.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptileai review

Comment thread .github/workflows/test-build.yml Outdated
Comment thread .github/workflows/test-build.yml Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptileai review

… a live local Sim

Runs the real Electron app against a local Sim (Postgres, Redis, realtime) with a
recording proxy and a scripted stand-in worker, covering chat switches, Stop,
sign-out, approval-gated and stopped claims, and the flag-off foreground round trip.
The spec skips unless a live Sim is configured; the http-e2e job provides one.
…tcomes instead of time

- Compile every route, page and client chunk the tests use in a named warm-up step before any timed hold
- Send retries only while no turn reached Sim; every held request and poll is bounded
- Stop and sign-out tests wait for the import's own report and assert one exact terminal state
- Clicks fail fast with the dev overlay's error instead of a blocked click
…kground executor

- The dormancy check accepts the app's own registrations, refused while signed out and answered
  as not enabled once signed in, and still forbids inbox, doorbell, claim, lease and completion
- The app and realtime server run in their own sessions and stop through stop-session.sh
…ts go, and report the call's error on a wrong terminal state
… dev console notices, and keep failure diagnostics
…if Electron gave up on it, and require its 410
…ds honest, and check dormancy layer by layer

- Warm-up runs the tests' own flows (read, import, a chat switch during a live turn, Stop, login)
  and waits until every request the app made has been answered
- send() resends only when the UI did not take the message; a taken message whose turn never
  reaches Sim fails as a lost send
- Stop and sign-out tests assert exact outcomes without holding the tool's report (the stopped tool
  reports nothing since #8732)
- Dormancy checks registration, device records, binding, routes and the doorbell as separate soft
  assertions
- CI: per-run E2E_APP tags, retries 0, and a path filter for pull requests
…early unrelated, and fail open

- The change check skips only docs, the other apps and published content; any change elsewhere,
  and any failure to fetch or diff the base, runs the suite
- settled() discounts only requests a hold is keeping from Sim right now
- The warm-up's Stop turn waits for its stream to close instead of on a promise that never settles
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@waleedlatif1
waleedlatif1 merged commit af5501b into staging Oct 7, 2026
39 checks passed
@waleedlatif1
waleedlatif1 deleted the test/desktop-ungated-e2e branch October 7, 2026 16:32

This branch was successfully deployed

1 active deployment
Preview — 5370c796 Deployed Oct 7, 2026 by vercel[bot]
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