Skip to content

Desktop clear cache hang#388

Merged
gtryus merged 2 commits into
developfrom
DesktopHangAfterClearCache
Jul 2, 2026
Merged

Desktop clear cache hang#388
gtryus merged 2 commits into
developfrom
DesktopHangAfterClearCache

Conversation

@sarahentzel

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI 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.

Pull request overview

This PR addresses a desktop startup/“clear cache” hang by ensuring the initial renderer paint does not block on IndexedDB migration/restore or fingerprint generation. It restructures startup so non-critical initialization happens after the React tree mounts.

Changes:

  • Render the app immediately in main.tsx without awaiting fingerprint or IndexedDB restore.
  • Add mount-time bootstrap components to restore IndexedDB backup and fetch the fingerprint after first paint.
  • Add restore de-duplication and an IndexedDB “DB open” readiness check in the backup restore flow.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/renderer/src/main.tsx Stops awaiting fingerprint/backup restore before first render; renders immediately.
src/renderer/src/crud/RestoreBackupOnMount.tsx New component to restore IndexedDB backup post-mount and update projectsLoaded.
src/renderer/src/crud/restoreBackup.ts Memoizes restore calls and adds a readiness check for IndexedDB being open.
src/renderer/src/crud/BootstrapFingerprint.tsx New component to load fingerprint post-mount and update global state.
src/renderer/src/auth/Root.tsx Mounts the new bootstrap components early in the app tree.

Comment thread src/renderer/src/crud/restoreBackup.ts
Comment thread src/renderer/src/crud/BootstrapFingerprint.tsx
@sarahentzel sarahentzel requested a review from gtryus July 2, 2026 20:10
@gtryus gtryus merged commit bc8e774 into develop Jul 2, 2026
2 checks passed
@gtryus gtryus deleted the DesktopHangAfterClearCache branch July 2, 2026 20:42
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.

3 participants