Undo confirmation dialog: too narrow and language polish #13
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Two related improvements to the undo confirmation dialog.
1. Width
The dialog wraps its first line of text even on wide terminals while occupying roughly a quarter of the terminal width (centered). The min-width / preferred-width should grow to accommodate at least the snapshot summary line on a single row; reasonable bounds for outlier terminals are fine, but the current bounds are too tight for even a short insert statement.
2. Language polish
Snapshotat the start of the summary line.Yes/No.Esc cancelplaced aboveYes/No:[Y]es [N]o [Esc] cancel), or omit it entirely —Escto cancel is conventional enough that explicit hinting may not be needed.Fixed in
5ea69db.Both improvements addressed:
1. Width. The dialog capped at 60 columns and wrapped even a short insert on wide terminals. It now grows to fit its longest content line on a single row, bounded 34–100 columns and never exceeding the available area (
undo_dialog_width, unit-tested incl. tiny-terminal edge cases).2. Language polish.
Snapshotcapitalised at the start of the summary line.24 May 2026, 11:00) instead of the raw ISO-8601…T…Zform — via a newchronodependency (stable,clockfeature only; English month names, no unstable-locales).Yes/No(also applies to the rebuild-confirm dialog for consistency).Esc cancel: on investigation this was already inline with the buttons ([Y] Yes [N] No Esc cancel), not on a separate row — that sub-item had been resolved in an earlier session, so no change was needed.Covered by helper unit tests (
format_local_datetime,format_snapshot_timestampincl. garbage fallback,undo_dialog_width) and render-level tests asserting the command no longer wraps and the labels/timestamp are correct. requirements.md U2 updated.