xy: back closes the overlay, arrows walk the list #36

Merged
pecheny merged 1 commit from xy-overlay-back into main 2026-07-26 17:09:12 +00:00
Owner

Why

Android's PWA has no Escape key, so back is the only way out of a modal. xy pushed no history, so back closed the whole app instead of the open card.

Every overlay now registers with a stack that pushes a history entry on open. Back, Escape and the ✕/↩️ buttons funnel through one popstate, so nesting works: back closes выписки, then the card, then leaves the board. The 13 hand-rolled Escape handlers go with it.

← and → walk the open card's list, or its whole group, stopping at both ends and firing only when the caret is outside a field. Leaving a dirty card by any route now asks Сохранить / Не сохранять / Отмена instead of discarding in silence; saving continues to the next card.

Closes #27
Closes #24

# Why Android's PWA has no Escape key, so back is the only way out of a modal. xy pushed no history, so back closed the whole app instead of the open card. Every overlay now registers with a stack that pushes a history entry on open. Back, Escape and the ✕/↩️ buttons funnel through one popstate, so nesting works: back closes выписки, then the card, then leaves the board. The 13 hand-rolled Escape handlers go with it. ← and → walk the open card's list, or its whole group, stopping at both ends and firing only when the caret is outside a field. Leaving a dirty card by any route now asks Сохранить / Не сохранять / Отмена instead of discarding in silence; saving continues to the next card. Closes #27 Closes #24
Android's PWA has no Escape key, so back is the only way out of a modal —
and xy pushed no history, so it closed the whole app instead of the card.

Every overlay now registers with a stack that pushes a history entry on
open. Back, Escape and the ✕/↩️ buttons funnel through one popstate, so
the three gestures cannot drift apart, and nesting works: back closes
выписки, then the card, then leaves the board. The 13 hand-rolled Escape
handlers are gone with it, including the card's guard that hard-coded
four other overlays' hidden state. Transient popups stay off the stack
and claim Escape in the capture phase, so they close before the card.

← and → walk the open card's list — the whole group when it is in one —
stopping at both ends, and only when the caret is outside a field.

Leaving a dirty card by any route now asks Save / Не сохранять / Отмена
rather than discarding in silence, which is what every exit did before.
Saving from the prompt continues to the next card, which is the point:
you walk a package, fix what you find, and keep going.

Closes #27
Closes #24

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pecheny/dopesuite!36
No description provided.