Skip to content

fix: replace alert/confirm with inline toast and modal for profile ops#307

Open
Kirtan-pc wants to merge 1 commit into
SamXop123:mainfrom
Kirtan-pc:fix/replace-alert-confirm-with-inline-toast
Open

fix: replace alert/confirm with inline toast and modal for profile ops#307
Kirtan-pc wants to merge 1 commit into
SamXop123:mainfrom
Kirtan-pc:fix/replace-alert-confirm-with-inline-toast

Conversation

@Kirtan-pc

Copy link
Copy Markdown
Contributor

Profile and backup operations in settings.js previously used native window.alert() and window.confirm() which surface as OS-level blocking modals. These are inconsistent with the dark-themed settings UI and block the Electron renderer thread.

Changes:

  • Add showProfileStatus(elementId, message, isError, persistent) helper that renders a styled, auto-dismissing inline banner beneath each operation group (theme profiles, settings backup, aurora engine profiles), mirroring the existing showHotkeyStatus() pattern.
  • Add showInlineConfirm(message) Promise-based helper that shows a dark-themed, non-blocking modal overlay instead of window.confirm(). Clicking outside or Cancel resolves false; clicking Confirm resolves true. Falls back to window.confirm() if DOM elements are absent.
  • Add three .profile-status-msg elements in settings.html: #profile-status-msg (Theme Profiles section)
    #backup-status-msg (Settings Backup section)
    #aurora-status-msg (Aurora Engine Profiles section)
  • Add #inline-confirm-modal overlay in settings.html.
  • Add .profile-status-msg and .inline-confirm-overlay CSS in
    settings.css with slide-in animation and error/success colour coding.
  • Replace every alert() / confirm() call in profile save, delete,
    duplicate, import, export, backup export/import, restore defaults,
    aurora engine profile save/load/delete, and gradient-stop limit
    with the new helpers.

Fixes Issue #279

Profile and backup operations in settings.js previously used native
window.alert() and window.confirm() which surface as OS-level blocking
modals. These are inconsistent with the dark-themed settings UI and
block the Electron renderer thread.

Changes:
- Add showProfileStatus(elementId, message, isError, persistent) helper
  that renders a styled, auto-dismissing inline banner beneath each
  operation group (theme profiles, settings backup, aurora engine
  profiles), mirroring the existing showHotkeyStatus() pattern.
- Add showInlineConfirm(message) Promise-based helper that shows a
  dark-themed, non-blocking modal overlay instead of window.confirm().
  Clicking outside or Cancel resolves false; clicking Confirm resolves
  true. Falls back to window.confirm() if DOM elements are absent.
- Add three .profile-status-msg elements in settings.html:
    #profile-status-msg  (Theme Profiles section)
    #backup-status-msg   (Settings Backup section)
    #aurora-status-msg   (Aurora Engine Profiles section)
- Add #inline-confirm-modal overlay in settings.html.
- Add .profile-status-msg and .inline-confirm-overlay CSS in
  settings.css with slide-in animation and error/success colour coding.
- Replace every alert() / confirm() call in profile save, delete,
  duplicate, import, export, backup export/import, restore defaults,
  aurora engine profile save/load/delete, and gradient-stop limit
  with the new helpers.

Fixes: alert/confirm blocking OS modals in Electron renderer
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

@Kirtan-pc is attempting to deploy a commit to the Dot_NotSam's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f3ba7def-dde2-43a5-8339-e009dbfeb88a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant