Skip to content

Remove storage disconnected warning continue study button#1287

Open
jaykim1213 wants to merge 12 commits into
devfrom
jay/storageDisconnectedModal
Open

Remove storage disconnected warning continue study button#1287
jaykim1213 wants to merge 12 commits into
devfrom
jay/storageDisconnectedModal

Conversation

@jaykim1213

@jaykim1213 jaykim1213 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Does this PR close any open issues?

Towards #1182

Give a longer description of what this PR addresses and why it's needed

This PR updates the storage disconnected modal to prevent participants from continuing a study when cloud storage is unavailable.

  • Makes the storage disconnected warning non-dismissible
  • Changes the modal button from "Continue Study" to "Reconnect"
  • In production, prevents silent fallback to localStorage when Firebase or Supabase is configured
  • Adds a modal when falling back to localStorage in non-production mode

Storage disconnected warning

  • Cloud storage is configured (firebase or supabase)
  • The app is running in production mode
  • The app cannot connect to the configured cloud storage
Screenshot 2026-07-09 at 6 43 01 AM

localStorage fallback warning

  • Cloud storage is configured (firebase or supabase)
  • The app fails to connect to cloud storage
  • The app is running in non-production mode and falls back to localStorage
Screenshot 2026-07-01 at 4 03 28 PM

TODOs

  • Refactor
  • Add auto-reconnect
  • Test (adblockers + disconnects)

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

A preview of 764eba5 is uploaded and can be seen here:

https://revisit.dev/study/PR1287

Changes may take a few minutes to propagate.

@jaykim1213 jaykim1213 linked an issue Jul 9, 2026 that may be closed by this pull request
@jaykim1213
jaykim1213 marked this pull request as ready for review July 9, 2026 14:23

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

The new blocking modal does not observe failures from the actual debounced participant-data upload, so this needs to be corrected before merge.

Comment thread src/store/hooks/useNextStep.ts
@JackWilb

Copy link
Copy Markdown
Contributor

What messages are not storage engine alerts?
We probably don't want to await in goToNextStep

@jaykim1213

Copy link
Copy Markdown
Contributor Author

@JackWilb

What messages are not storage engine alerts?

The alerts that can still be closed are things like "Problem loading the study", "Using localStorage fallback", "Failed to Advance", and "Prohibited".
The only alerts we block are the storage ones where continuing could lose data: "Failed to connect to the storage engine" and "Failed to Save Response"

We probably don't want to await in goToNextStep

Updated this so goToNextStep does not wait for the upload anymore. If the delayed queued upload fails later, we now catch that through the storage engine listener and show the modal from there.

@jaykim1213
jaykim1213 requested a review from JackWilb July 17, 2026 18:57
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.

Investigate Incomplete / Missing Data

2 participants