Skip to content

Keep the connector page working when Safari blocks sessionStorage - #1995

Merged
helpcodeai merged 1 commit into
mainfrom
fix/connector-page-storage
Dec 5, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/connector-page-storage

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Safari throws SecurityError: The operation is insecure on any access to window.sessionStorage when the browser blocks site storage. The connector detail page read its one-time "secrets moved to variables" notice straight from window.sessionStorage on mount, so for these users the error boundary replaced the whole page (Sentry CLOUD-FRONTEND-12, iPad Safari, release 3cf8738). The new-connector form wrote the same notice right after creating the connector; there the throw would show an error although the connector was created.

Both now use sessionStore from lib/storage.ts, which never throws and keeps the value in memory when storage is blocked (the notice still shows after the client-side navigation).

Behaviour is the same on Cloud and self-hosted: frontend only, no API change.

Changes

  • connectors/[id]/page.tsx: read and remove the notice through sessionStore.
  • connectors/new/page.tsx: write the notice through sessionStore.
  • New Playwright spec connector-page-storage-blocked.spec.ts: window.sessionStorage throws a SecurityError, the page must still render.

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Performance improvement
  • Other (describe below)

Testing

  • Added/updated unit tests
  • Tested manually (describe steps below)
  • No tests needed (explain why)

In packages/frontend:

  • npx tsc --noEmit -p tsconfig.json: passed.
  • npx eslint on the three files: 0 errors (2 existing set-state-in-effect warnings in the new-connector page, not from this change).
  • Playwright: not run locally (the worktree cannot start next dev); relying on the CI Playwright job.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable)
  • All existing tests pass (npm test)
  • This PR has a descriptive title

Related Issues

Sentry CLOUD-FRONTEND-12.

@helpcodeai
helpcodeai merged commit cd82a70 into main Dec 5, 2026
17 checks passed
@helpcodeai
helpcodeai deleted the fix/connector-page-storage branch December 5, 2026 20:51
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant