Commit b7026dc
committed
fix(ux): wrap showNewRuleModal in try/catch on empty-install banner CTA
QA-review of 7ed8f8a flagged MEDIUM: original CTA handler called
_actions.showNewRuleModal() then removed the banner; if the modal
init throws, banner is gone AND no modal renders — admin loses both
onboarding paths until reload (silent failure).
Fix: try/catch the modal call. On exception, keep the banner visible
and surface UI.showMsg("Could not open the new-rule dialog. Reload
the page to retry.", "error"). On success, remove banner non-stickily
(unchanged behavior).
Verified in browser (Playwright, build 662):
- Patched Modals.showNewRuleModal to throw; CTA click:
* exception contained inside try/catch (cta_throw_propagated: false)
* banner stayed visible (banner_visible_after_click: true)
* modal did NOT open (modal_open: false)
* error toast appeared with the exact message text
- Restored Modals.showNewRuleModal; re-clicked CTA:
* modal opened (modal_open_happy: true)
* banner removed (banner_after_happy_click: false)
QA findings dispositions:
- MEDIUM (deferred-exception in UI handler) → fixed in this commit
- LOW (analyst-tier verification missing): backend check confirmed
that ALL non-admin verification paths in this dev container
return can_create_rules=True because superadmin enabled
allow_analyst_create_rules — by design. The banner's gate
`if (!canCreateRules) return;` mirrors the dropdown's
`if (canCreateRules) { createBtn = ... }` (wl_nav.js:99-106),
so banner-visibility = create-button-availability. No bypass.
- OPEN (RELEASE_CHECKLIST.md re-run section): docs/RELEASE_CHECKLIST.md
§5 "AppInspect Dry-Run" is the existing mechanism — my note in
docs/APPINSPECT_FINDINGS.md correctly defers to that gate at
release time.
Bumps build 661 → 662 + urlArgs _b=662 in lockstep (cache-bust
pairing per CLAUDE.md decision-log 2026-04-22).1 parent 7ed8f8a commit b7026dc
3 files changed
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
143 | 146 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
148 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
149 | 161 | | |
150 | 162 | | |
151 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments