fix(startup): Firefox no longer hangs on "Heating up" after login (#303) #366

Merged
jared merged 1 commits from fix/firefox-persist-hang into lotus 2026-10-16 22:36:53 -04:00
Owner

Fixes #303.

initClient awaited navigator.storage.persist() before creating the client. Chromium and WebKit answer it at once, but Firefox shows a permission prompt and leaves the promise pending until it's answered. So the app sat on "Heating up" (no sync, no crypto, no IndexedDB) for every Firefox user who didn't notice the prompt.

Change: the request is still made, which is all the key-store protection (KE-1) needs, but startup waits at most 1.5 s for the answer. The comment claiming persist() never prompts is corrected.

Verified in Playwright Firefox with the prompt left unanswered (persist() still pending):

  • Before: still "Heating up" after 20 s.
  • After: reaches the room list in 12 s.

Not added: a Firefox project in the CI e2e suite, which the issue suggested. CI only installs Chromium and WebKit, and adding Firefox would lengthen every PR run. That can be a separate change if wanted.

tsc clean · unit tests pass · ESLint clean (one existing warning elsewhere in the file).

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #303. `initClient` awaited `navigator.storage.persist()` before creating the client. Chromium and WebKit answer it at once, but **Firefox shows a permission prompt and leaves the promise pending until it's answered**. So the app sat on "Heating up" (no sync, no crypto, no IndexedDB) for every Firefox user who didn't notice the prompt. **Change:** the request is still made, which is all the key-store protection (KE-1) needs, but startup waits **at most 1.5 s** for the answer. The comment claiming `persist()` never prompts is corrected. **Verified** in Playwright Firefox with the prompt left unanswered (`persist()` still pending): - **Before:** still "Heating up" after 20 s. - **After:** reaches the room list in 12 s. **Not added:** a Firefox project in the CI e2e suite, which the issue suggested. CI only installs Chromium and WebKit, and adding Firefox would lengthen every PR run. That can be a separate change if wanted. `tsc` clean · unit tests pass · ESLint clean (one existing warning elsewhere in the file). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-16 21:31:58 -04:00
fix(startup): Firefox no longer hangs on "Heating up" after login (#303)
CI / Build & Quality Checks (pull_request) Successful in 1m50s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 14s
CI / Playwright smoke (e2e) (pull_request) Successful in 12m48s
02950499ea
initClient awaited navigator.storage.persist() before creating the client.
Chromium and WebKit answer at once, but Firefox shows a permission prompt
and leaves the promise pending until it's answered, so the app sat on
"Heating up" (no sync, no crypto, no IndexedDB) for every Firefox user who
didn't notice the prompt.

The request is still made (KE-1 only needs that), but startup waits at
most 1.5 s for the answer. The comment claiming persist() never prompts
is corrected.

Verified in Playwright Firefox with the prompt left unanswered
(persist() still pending): before, still "Heating up" after 20 s; now the
room list after 12 s.

Fixes #303

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit 39f74d51e6 into lotus 2026-10-16 22:36:53 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#366