fix: stack impersonation banner with customer alerts#3006
Conversation
The header-alert system previously rendered only the highest-importance banner. Since the impersonation banner has importance 100, it always suppressed payment-failed and other billing alerts (importance 1), making them invisible to operators during impersonation sessions. Now the impersonation banner renders in a separate fixed-position stack alongside the highest-priority customer alert, so operators can see exactly what the customer sees while impersonating.
Greptile SummaryThis PR fixes the impersonation-banner-suppressing-billing-alerts problem by introducing an One cleanup gap remains: Confidence Score: 5/5Safe to merge; the fix is correct and well-scoped, with only a minor cleanup gap remaining. All findings are P2. The core logic — AlertStack layout management, isInStack context delegation, getExcluding exclusion — is sound. The only issue is leftover dead code in routes/+layout.svelte that is outside the diff and doesn't affect correctness. src/routes/+layout.svelte (not in diff) — contains now-redundant headerAlert.add/updateShow calls for the impersonation entry. Important Files Changed
Reviews (2): Last reviewed commit: "fix: address code review findings" | Re-trigger Greptile |
- Use svelte/store get() for read-only access in headerAlert.get() and getExcluding() to avoid spurious subscriber notifications on every call - Fix bannerSpacing.set(undefined) → set(null) to match the store's declared string | null type (alertStack and headerAlert) - Remove redundant isImpersonating guard around ImpersonationBanner; the component self-manages visibility, eliminating the transient empty-stack layout edge case
The header-alert system previously rendered only the highest-importance banner. Since the impersonation banner has importance 100, it always suppressed payment-failed and other billing alerts (importance 1), making them invisible to operators during impersonation sessions.
Now the impersonation banner renders in a separate fixed-position stack alongside the highest-priority customer alert, so operators can see exactly what the customer sees while impersonating.
What does this PR do?
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)