Skip to content

fix(desktop): ask before an update restart from the menu, count uploads and downloads as running work, and harden sign-in prompts - #9533

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/desktop-release-audit-followups
Oct 31, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/desktop-release-audit-followups

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Release-audit follow-ups to #9505, #9515 and #9521:

  • Check for Updates… with an update already staged restarted Sim immediately (no in-flight work → quitAndInstall). It now shows "Sim X is ready to install" with Restart to Update / Later; Restart still runs the in-flight check
  • Uploads and downloads count as running work. Agent-browser downloads still progressing are named in the restart prompt. Knowledge base, file and table uploads hold a Chrome-standard beforeunload guard while in flight through one shared useBeforeUnloadWhile(active) hook (also replacing the knowledge document's hand-rolled guard), so both a normal close and the update probe see them
  • Sign-in prompts: a malformed answer cancels instead of hanging the request; the renderer refuses an unknown prompt kind immediately instead of letting it wait 120 s; only an explicit "Don't send" is remembered for a certificate (an accidental close just cancels — additive remember flag, both version-skew directions safe); the noted main-frame URL clears on did-stop-loading so an aborted navigation can't let an iframe challenge pass as top-level
  • Continue in Chrome is hidden on Sim's own pages (the shell already refused them with an error toast); the pending-sign-in cache refreshes across the provisional→saved chat id remount
  • Conventions: one shared withinWindow, USER_ONLY_SHORTCUTS as a Set, lru-cache (same pin as apps/sim) instead of a hand-rolled LRU, the app-launch notice bar reuses BrowserNotice

Type of Change

  • Bug fix

Testing

  • updater, page-prompts, session tests (desktop, 134 pass); browser-page-prompt, browser-import query, sign-in-hosts tests (apps/sim) — every new test red on the pre-fix code
  • e2e/browser-sign-in-prompts.spec.ts (10/10 checks) and e2e/updater.spec.ts pass locally
  • desktop tsc --noEmit, targeted apps/sim type-check, biome; full gate in CI

Checklist

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

@vercel

vercel Bot commented Oct 31, 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 31, 2026 6:24pm UTC

Request Review

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner October 31, 2026 18:14
…ds and downloads as running work, and harden sign-in prompts
@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

The PR asks before restarting for a staged update, counts transfers as running work, and tightens browser sign-in prompts.

  • Sim asks before restarting for an update and names active downloads.
  • Workspace uploads ask before a close or update restart.
  • Browser sign-in requests cancel safely when an answer cannot be used.
  • The browser panel refuses prompts it cannot display and separates cancel from dismissal.
  • Continue in Chrome skips Sim pages and keeps saved-chat handoffs visible.
  • Shared browser helpers keep existing behavior consistent.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Upload starts or queues] --> B[Increase shared upload count]
  B --> C[Workspace guard watches count]
  C --> D[beforeunload asks before leaving]
  D --> E[Update probe sees running work]
  B --> F[Upload succeeds or fails]
  F --> G[Release count once]
Loading

Reviews (3) · Last reviewed commit: "fix(uploads): guard in-flight uploads fr..." · Reviewed by Greptile

…he page that started them

Uploads keep sending after in-app navigation unmounts their page, so the
beforeunload guard now reads a shared in-flight upload count from one guard
mounted in the workspace layout. The credential detail guard reuses
useBeforeUnloadWhile, and Continue in Browser reads the page origin only in
the desktop shell.

@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.

1 issue found across 27 files

Confidence score: 3/5

  • In import-csv-dialog.tsx, closing the dialog unmounts it before the pending-upload guard is installed, so an update restart can interrupt a CSV upload. Keep the guard mounted while the upload is pending.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/app/workspace/[workspaceId]/tables/components/import-csv-dialog/import-csv-dialog.tsx">

<violation number="1" location="apps/sim/app/workspace/[workspaceId]/tables/components/import-csv-dialog/import-csv-dialog.tsx:150">
P2: The workspace tables list unmounts `ImportCsvDialog` when submit closes it, before `isPending` can install this guard, so CSV uploads from that page are not protected from an update restart. Keep the guard mounted through mutation settlement or lift the pending state and guard into a stable parent.</violation>
</file>

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

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1
waleedlatif1 force-pushed the fix/desktop-release-audit-followups branch from 409ff22 to 9c94992 Compare October 31, 2026 18:19
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@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 32 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
waleedlatif1 merged commit 914f92f into staging Oct 31, 2026
77 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/desktop-release-audit-followups branch October 31, 2026 21:38

This branch was successfully deployed

1 active deployment
Preview — 9c94992e Deployed Oct 31, 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