todo-app/lib/ui
Krzysztof Rudnicki e103261bc8 Confirm before deleting a note
Both delete paths -- the per-note actions sheet and the detail screen -- deleted
immediately, with no confirmation and no undo. With a pointer that is merely
risky: you have to travel to the control and press it. With a keyboard it is
one Tab away from a Return you were about to press anyway, and the note is gone
with nothing to recover it.

The confirmation is built so the SAFE option is what a reflexive keypress hits:
Cancel is autofocused, Escape dismisses as "no", and the destructive button is
error-coloured but deliberately not the default action. Escape is bound
explicitly rather than relying on the barrier, because the desktop surface here
is a Chrome --app window where that cannot be assumed -- and a confirmation the
keyboard cannot back out of is worse than no confirmation at all.

The actions sheet also gains isScrollControlled. Default bottom sheets cap at
9/16 of the viewport, i.e. ~432px on a 768px screen, and this sheet's height
grows with the note title and its chip rows -- so Delete could be clipped out of
reach on the very screen this app is used on.

The two existing delete tests correctly failed once confirmation landed; both
now go through the dialog, and each gains a cancel-keeps-the-note counterpart so
the negative path is covered too. 204 tests, 100% line coverage held.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 16:31:15 +02:00
..
capture_screen.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
confirm.dart Confirm before deleting a note 2026-07-30 16:31:15 +02:00
markdown_view.dart warm-tint the unified-design-system palette, fix design audit violations 2026-07-22 18:56:45 +02:00
note_detail_screen.dart Confirm before deleting a note 2026-07-30 16:31:15 +02:00
note_editor.dart Default a bare-link draft to the freeform template 2026-07-26 22:13:26 +02:00
notes_list_screen.dart Confirm before deleting a note 2026-07-30 16:31:15 +02:00
settings_screen.dart warm-tint the unified-design-system palette, fix design audit violations 2026-07-22 18:56:45 +02:00
theme.dart theme.dart: define secondary/tertiary ColorScheme roles 2026-07-22 19:42:57 +02:00