Repository navigation
fix(app): open the discard confirm above the edit alert modal - #3870
Conversation
The confirm dialog and the edit alert modal both used Mantine's default modal z-index, so the confirm opened behind the editor and the modal could not be closed. Give the confirm a z-index above every app modal. Fixes HDX-6235
🦋 Changeset detectedLatest commit: 9b053b2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
PR Review
1 finding(s): 🔴 0 P0/P1 · 🟡 0 P2 · 🔵 1 P3 No inline comments. 1 P3 folded at the bottom. 🔵 1 P3 — no action needed before merge
Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides. |
Deep ReviewA tightly scoped fix: the shared confirm dialog ( ✅ No critical issues found. 🟡 P2 — recommended
🔵 P3 nitpicks (1)
Reviewers (8): correctness, testing, maintainability, project-standards, agent-native, learnings-researcher, kieran-typescript, previous-comments. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
E2E Test Results✅ All tests passed • 478 passed • 1 skipped • 1192s
Tests ran across 4 shards in parallel. |
Summary
Closing the edit alert modal with unsaved changes opened the "discard changes?" confirm behind the editor. You couldn't see it or click it, the backdrop just went darker, and the modal couldn't be closed. The shared confirm dialog now stacks above every app modal, so it shows on top of whichever modal asked for it.
Screenshots or video
Same screen and data: Alerts page, Edit alert, Slack/webhook channel changed, outer X clicked.
How to reproduce
Starting point:
yarn dev(alerts need the API), with one webhook created in Team settings.On
main:...menu and click Edit alert.On this branch:
How to test on Vercel preview
N/A: the alerts page needs the API, which the preview's local mode doesn't run.
References
Note
Low Risk
Small presentation-layer stacking change in the shared confirm modal only; no auth, data, or API behavior changes.
Overview
Fixes a case where closing an editor modal with unsaved changes left the shared “discard?” confirm hidden behind the same modal (both used Mantine’s default modal z-index), so the UI could get stuck with a darker backdrop and no way to dismiss.
The confirm dialog in
useConfirmnow useszIndex={100_000}, chosen to sit above the highest in-app modals while staying below notifications and spotlight. Adata-testid="confirm-modal"hook and a new unit test assert the confirm’s z-index is greater than Mantine’s default modal z-index when opened from inside another modal.Reviewed by Cursor Bugbot for commit 9b053b2. Bugbot is set up for automated code reviews on this repo. Configure here.