Add confirmation dialog for reset all action - #446
Conversation
…on left - Reset All (trash icon) now shows a confirmation dialog before clearing overrides, reducing accidental data loss - Save button moved to the left of undo/redo icons for quicker access
…ider responsiveness JSON.stringify(overrides) was called on every input change — twice in setOverrides and once per tick via the hasPendingChanges derived — serialising potentially hundreds of token values at 60fps. Replaced with a cheap shallow key-value comparison.
|
Warning Review limit reached
Next review available in: 53 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 (2)
✨ 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 |
PR Summary by QodoAdd reset-all confirmation modal and optimize override dirty-checks Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
6 rules 1.
|
Auto-focus Cancel button on open, trap Tab between Cancel/Reset-all, Escape dismisses, backdrop click dismisses — consistent with CommandPalette
Summary
Adds a confirmation dialog when resetting all overrides, and reorders the header buttons to place the Save button before the undo/redo controls for better UX.
Changes
StudioHeader.svelte
showResetConfirmstate to manage confirmation dialog visibilityhandleResetAllClick(),confirmReset(), andcancelReset()functions to handle the reset flow with confirmationApp.svelte
JSON.stringify()comparisons with a newshallowEq()helper function for more efficient equality checks on flat string recordslastSavedSnapshotto store an object copy instead of a JSON stringshallowEq()throughout the save state logic for better performance on every state changeImplementation Details
The confirmation dialog includes:
role="dialog"andaria-modalThe
shallowEq()helper provides a cheaper alternative toJSON.stringify()for comparing flat string records, improving performance on every reactive update without changing the save behavior.https://claude.ai/code/session_01YQF3CbAAzbd6jjj1nWhe3Z