Skip to content

fix(desktop): harden browser and runtime hygiene - #7152

Merged
waleedlatif1 merged 6 commits into
stagingfrom
codex/investigate-macos-services-menu
Aug 27, 2026
Merged

fix(desktop): harden browser and runtime hygiene#7152
waleedlatif1 merged 6 commits into
stagingfrom
codex/investigate-macos-services-menu

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • harden desktop browser, terminal, navigation, updater, and account-data lifecycle boundaries
  • add readable recovery states, canonical permission toasts, bounded persistence, and packaged release validation

Type of Change

  • Bug fix

Testing

Validated with the full monorepo test and type-check suites, lint, 36 audits, source Electron E2E, and fresh packaged Electron fuse and launch smoke tests.

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 August 27, 2026 04:44
@gitguardian

gitguardian Bot commented Aug 27, 2026

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 27, 2026 6:25pm

Request Review

@waleedlatif1
waleedlatif1 force-pushed the codex/investigate-macos-services-menu branch from cc99802 to 05649b1 Compare August 27, 2026 04:46
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR hardens desktop browser, terminal, navigation, persistence, updater, and account-data lifecycle boundaries.

  • Coordinates server-origin commits with deployment-scoped teardown and durable startup recovery.
  • Makes committed server relaunches survive active account teardown and renderer unload vetoes.
  • Adds packaged release validation, Electron fuse checks, and broader desktop lifecycle coverage.

Confidence Score: 5/5

The PR appears safe to merge within the scope of the previous lifecycle findings.

No blocking failure remains in the previously reported server-switch recovery and mandatory-relaunch paths.

Important Files Changed

Filename Overview
apps/desktop/src/main/server-window.ts Server changes now clear deployment-scoped state before committing the origin and retain recovery metadata when post-commit finalization fails.
apps/desktop/src/main/index.ts Mandatory relaunches now wait for active account teardown without allowing teardown failure to strand a committed server switch.
apps/desktop/src/main/window.ts Main and attached child windows bypass ordinary beforeunload prompts during a committed mandatory relaunch.
apps/desktop/src/main/account-data-generation.ts Deployment teardown commits and marker finalization are coordinated without allowing deployment cleanup to clear an active account-wipe marker.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Request[Request server change] --> Marker{Persist recovery marker}
  Marker -->|Failure| Abort[Keep current server and report error]
  Marker -->|Success| Clear[Clear deployment-scoped state]
  Clear -->|State survives| Abort
  Clear --> Commit{Commit new origin}
  Commit -->|Failure| Abort
  Commit -->|Success| Finalize[Finalize recovery marker]
  Finalize -->|Success| Relaunch[Mandatory relaunch]
  Finalize -->|Failure| Armed[Keep startup recovery armed]
  Armed --> Relaunch
  Relaunch --> Teardown{Account teardown active}
  Teardown -->|Yes| Wait[Wait for teardown]
  Wait --> Continue[Continue committed relaunch]
  Teardown -->|No| Continue
  Continue --> Restart[Start on new origin partition]
Loading

Reviews (8): Last reviewed commit: "fix(desktop): make committed relaunch no..." | Re-trigger Greptile

Comment thread apps/desktop/src/main/server-window.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

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 83 files

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

Re-trigger cubic

Comment thread apps/desktop/src/main/index.ts Outdated
Comment thread apps/desktop/src/main/updater.ts
Comment thread .github/workflows/desktop-release.yml
Comment thread apps/desktop/src/main/navigation.ts
Comment thread apps/desktop/src/main/input-activity.test.ts Outdated
Comment thread apps/desktop/src/main/browser-sites/directory.test.ts
Comment thread apps/desktop/src/main/observability.ts
Comment thread apps/desktop/src/main/browser-agent/session.ts
Comment thread apps/desktop/src/main/input-activity.ts Outdated
Comment thread apps/desktop/src/main/browser-agent/session.test.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

Comment thread apps/desktop/src/main/server-window.ts Outdated
@waleedlatif1
waleedlatif1 force-pushed the codex/investigate-macos-services-menu branch from b2aed9c to 9d1d7dd Compare August 27, 2026 17:42
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

Comment thread apps/desktop/src/main/index.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

1 similar comment
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 force-pushed the codex/investigate-macos-services-menu branch from f97984c to f57822b Compare August 27, 2026 18:18
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 merged commit b478c8a into staging Aug 27, 2026
32 of 33 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/investigate-macos-services-menu branch August 27, 2026 18:23
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