Skip to content

fix(desktop): leave a stopped native file tool's outcome to Stop - #8732

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/desktop-native-files-stop-cancelled
Oct 7, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/desktop-native-files-stop-cancelled

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • A local read or import cancelled by Stop (or sign-out) reported its own error completion. That raced Stop's settlement, so a stopped import ended failed or cancelled depending on which committed first.
  • Native file tools now report nothing once cancelled, the same as browser actions and granted-folder (VFS) reads. Stop's own record stands: cancelled, with the stopped-before-start or stopped-while-running message.
  • Regression tests: an import stopped mid-upload, and a read stopped while the desktop was reading, report nothing.
  • Why the existing tests didn't catch it: they covered success, partial failure and replay, but never a cancelled signal. The live-Sim Electron E2E in improvement(desktop): Electron E2E for desktop tool lifetimes against a live local Sim #8697 surfaced it.

Type of Change

  • Bug fix

Testing

  • New unit tests failed before the fix and pass after
  • Lint, typecheck and the client tool tests pass

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)

A local read or import cancelled by the user's Stop (or by signing out) reported its own
failure, which raced Stop's settlement: whichever committed first decided whether the call
ended failed or cancelled. Native file tools now report nothing once cancelled, like browser
actions and granted-folder reads, so Stop's record stands.
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 7, 2026 7:20am 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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

waleedlatif1 added a commit that referenced this pull request Oct 7, 2026
…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
@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Changes how a stopped file operation reports its outcome.

The PR appears safe to merge.

What we checked:

  • Stop still saves the outcome: abortRun calls requestRunStop, which saves cancelled results for open desktop calls. Both native file tools belong to that group.
  • Cancellation still removes the listener: Both returns still run finally, which removes the pagehide listener.

Summary

Native file reads and imports now skip completion reports after cancellation, leaving Stop's saved outcome unchanged.

  • Adds regression tests for Stop during an upload and during a native read.
  • Keeps page-exit cleanup and upload cleanup unchanged.
  • No actionable issues found. Tests were inspected but not run.
Diagram
sequenceDiagram
  participant User
  participant Client
  participant Server
  participant Files as Native file tool
  User->>Client: Stop
  Client->>Files: Abort the turn's signal
  Client->>Server: Request Stop
  Server->>Server: Save cancelled desktop calls
  Files->>Files: Read or upload returns or throws
  Files->>Files: Skip completion report if aborted
  Files->>Files: Remove page-exit listener
Loading

Reviews (1) · Last reviewed commit: "fix(desktop): leave a stopped native fil..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 61ac093 into staging Oct 7, 2026
33 checks passed
waleedlatif1 added a commit that referenced this pull request Oct 7, 2026
…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
waleedlatif1 added a commit that referenced this pull request Oct 7, 2026
… a live local Sim (#8697)

* improvement(desktop): Electron E2E for desktop tool lifetimes against 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.

* improvement(desktop): use shared helpers, confirm Redis MONITOR, stage desktop build on the workspace disk

* improvement(desktop): bundle the desktop app without macOS prebuilds in the Linux E2E step

* improvement(desktop): report desktop E2E failures inline and trace runner memory

* improvement(desktop): run the live desktop E2E in its own job on a larger runner

* improvement(desktop): warm the live desktop E2E routes and wait on outcomes 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

* improvement(desktop): retype and resend a message the hydrating composer dropped

* improvement(desktop): run the live desktop E2E against the merged background 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

* improvement(desktop): release the held read at the moment its view lets go, and report the call's error on a wrong terminal state

* improvement(desktop): read the chat body's desktop capabilities with toRecord

* improvement(desktop): hold the read's own report across Stop, dismiss dev console notices, and keep failure diagnostics

* improvement(desktop): stop the live E2E apps by their E2E_APP tags

* improvement(desktop): deliver the claim held across Stop to Sim even if Electron gave up on it, and require its 410

* improvement(desktop): warm every route the live E2E reaches, keep sends 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

* improvement(desktop): wait with the shared sleep helper while the dev app settles

* improvement(ci): detect live desktop suite changes with git, covering chat pages and auth routes

* improvement(ci): run the live desktop suite unless every change is clearly 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
waleedlatif1 deleted the fix/desktop-native-files-stop-cancelled branch October 7, 2026 16:32

This branch was previously deployed

1 inactive deployment
Preview — a61178dd 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