fix(ui): actionable toasts linger, and a dead hotkey shows in the sidebar

Every toast auto-dismissed after 2.8 s — fine for a success receipt, too
short to read AND act on an error. Errors and warnings now stay 10 s and can
be clicked away; success is unchanged.

The hotkey-conflict warning also needed a trace outside the toast: the ⚠ in
Settings only helps someone who opens the panel. A dot on the sidebar Settings
entry (plus a tooltip) is now the cue in the main UI that a combo is dead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-25 18:10:17 +01:00
parent feb956001e
commit 3513e7b6e5
4 changed files with 35 additions and 2 deletions
+10 -1
View File
@@ -1016,7 +1016,16 @@ function toast(msg, type) {
t.className = 'toast is-' + type;
t.textContent = msg;
container.appendChild(t);
setTimeout(() => t.remove(), 2800);
// A success toast is a receipt — 2.8 s is plenty. An error or warning is
// something the user has to READ and usually act on, and 2.8 s isn't
// enough for either, so those linger and can be clicked away early.
const actionable = (type === 'error' || type === 'warning');
if (actionable) {
t.classList.add('is-dismissable');
t.title = 'Click to dismiss';
t.addEventListener('click', () => t.remove());
}
setTimeout(() => t.remove(), actionable ? 10000 : 2800);
}
// ============================================================