fix(frontend): open customer portal in popup synchronously to bypass Safari blocker - #9242
Conversation
…Safari blocker Safari blocks window.open() called after an await because it loses the user-gesture context. Open a blank tab synchronously on click, then assign location.href once the portal URL resolves. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying windmill with
|
| Latest commit: |
fc77e63
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://80ddc2ce.windmill.pages.dev |
| Branch Preview URL: | https://fix-customer-portal-safari.windmill.pages.dev |
|
Claude finished @hugocasa's task in 2m 15s —— View job Good to merge Review — PR #9242Checked the diff against the PR base, the Frontend —
|
Codex ReviewGood to merge No issues found. Checked for bugs, security issues, and AGENTS.md compliance. Test coverage Frontend: no automated component tests expected for this Svelte interaction change. The PR’s manual test plan is appropriate. Backend: only Cargo feature forwarding changed; no Rust logic or API surface changed, so no automated backend tests are expected. Manual verification still needed: in instance settings, click “Open customer portal” on Safari and confirm the portal opens in a new tab. Repeat on Chrome/Firefox, and verify an API failure closes the blank tab and surfaces the error. |
Pi ReviewGood to merge Review — PR #9242I verified the diff, the surrounding context in Frontend —
|
Summary
window.open()called after anawaitbecause the call is no longer tied to the user gesture, so clicking "Open customer portal" in instance settings silently did nothing on Safari.location.hrefonce the portal URL resolves. If the synchronous open is blocked too, fall back to navigating the current tab.Test plan
🤖 Generated with Claude Code
Summary by cubic
Fixes Safari blocking the customer portal by creating the tab synchronously, then redirecting it once the URL is ready. Keeps the new-tab behavior on other browsers.
Bug Fixes
Refactors
dev_overridefeature flag in the backend viawindmill-common/dev_override.Written for commit fc77e63. Summary will update on new commits. Review in cubic