In-app destructive-confirm modal + Content-Security-Policy#139
Conversation
Closes #60, #67, #79. Confirm modal (#60, #67): - New store primitive requestConfirm(options) -> Promise<boolean> with a globally rendered modal (App.svelte, above the editor overlay). A newer request supersedes a pending one (resolved as cancelled). - All ten window.confirm sites converted: song delete, delete-all, member/instrument/tuning/technique removal, and the editor's discard-changes guard. The song editor's redundant inline two-step delete is gone — one confirm pattern everywhere. - deleteAllData uses typed-band-name verification instead of the old chained double confirm with near-identical wording. - Forgetting a recent account now confirms before wiping (the x was a bare 44x44 target that deletes the whole local mirror). CSP (#79): - Strict policy injected at build time (dev server unrestricted): default/script/style/img/font/connect/worker/manifest/object/base-uri/ form-action. script-src 'self' with NO inline allowance — the theme FOITC script moved from inline <script> to /public/theme-init.js (blocking external, precached). - connect-src allows https:/http: because rs.js talks to whatever host the user's WebFinger points at, including plain-HTTP LAN servers. - Verified in a real browser against the built bundle: boot, mirror hydrate, theme, favicon, toasts — zero CSP violations. 336 unit tests, 158/158 chromium e2e, 158/158 mobile (WebKit) e2e.
|
Warning Review limit reached
Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai code review |
|
✅ Action performedReview finished.
|
Closes #60
Closes #67
Closes #79
In-app destructive confirm (#60, #67)
requestConfirm(options) → Promise<boolean>with a single globally-rendered modal (sits above the song-editor overlay; Escape/backdrop cancel; a newer request supersedes a pending one as cancelled).window.confirmsites converted: song delete, delete-all-data, member/instrument/tuning/technique removal, and the song editor's discard-changes guard. The editor's redundant inline two-step delete is removed — one confirm pattern everywhere, styled like the app instead of the system dialog.deleteAllDatanow requires typing the band name ("Delete everything" stays disabled until it matches) — replacing the old chained double confirm whose near-identical wording was easy to click through.Content-Security-Policy (#79)
default-src 'self',script-src 'self'(no inline allowance),style-src 'self' 'unsafe-inline'(Svelte style attributes),img-src 'self' data: blob:,connect-src 'self' https: http:(rs.js talks to whatever host the user's WebFinger points at, including plain-HTTP LAN servers),worker-src 'self' blob:,object-src 'none',base-uri 'self',form-action 'self'.script-src 'self'hash-free, the inline FOITC theme script moved to/public/theme-init.js(blocking external script, precached by the SW).Testing
Note for staging verification
Worth one pass on setlist-staging.5apps.com after deploy: the OAuth redirect +
auth-relay.htmlflow under CSP, and an installed-PWA session (Workbox + dynamic icons run underworker-src/img-src blob:).