fix(ui): replace window.confirm with an in-app confirm sheet #76
No reviewers
Labels
No labels
breadbug
bug
displays
enhancement
keybinds
network
phase-1
power
privacy
recovery
search
snapshots
sound
ui
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Breadway/bos-settings!76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/bset-69-in-app-confirm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes BSET-69
What
WebKitGTK in the Tauri webview shows no JS script dialogs, so
confirm()returned without asking and every destructive action ran unprompted.$lib/confirm.svelte.tswithconfirmAction({title, message, confirmLabel, danger}). It returns a Promise that resolves true only on the confirm button. Cancel, Escape and a backdrop click resolve false. A newer request cancels an older one.ConfirmHost.svelteis mounted once in+page.svelteand uses the existing v2Sheet. Cancel is the first button, so it takes focus. The confirm button isbtn dangerunlessdanger: false, which Restore files uses.Tests
confirm.test.mjs(added to npm test) covers the resolution rules, plus a source scan that fails on any bareconfirm(,alert(orprompt(. The scan fails on the old Users.svelte.Capability changes
None removed. The prompts now actually appear. Some wording is split into a title and a message, and the confirm buttons say what they do (Remove, Delete, Forget, Enable...) instead of OK.
Re-review after base merge. Reviewed exact head
bfa068d9d8(basea7b3e8b, merge of main incl. #67 #75 #77 #78). Verdict: PASS.bfa068d: success (8m0s).Note (non-blocking): snapshotRestore.ts confirmAndRestoreSnapshot with a sync confirm callback is only used by its unit test; the app restores via a Sheet.
Merged with a merge commit at
d432319ac5(headbfa068d, basea7b3e8b). Awaiting coordinator verification of integrated behavior on main.