Skip to content

Esc or ABBRECHEN discards a typed CO reading and typed Einsatzdaten without asking #652

Closed

Description

@DeepDiver1975

Split out of the UX review #262.

Problem

Two editors throw away typed input on Esc or ABBRECHEN without asking:

  • CO-Messprotokoll. The reading editor's ABBRECHEN drops the buffer (CoMessprotokollViewModel.cs:1406-1413, CloseEditor → Editor = null), and Esc is bound to the same command (CoMessprotokollView.axaml:259, b:Overlay.CancelCommand="{Binding CloseEditorCommand}"). Every removal in this view asks first; losing a typed ppm value does not. A reading that has not been recorded is a gap in the Messreihe.
  • Einsatzdaten dialog. Cancel() just raises Closed (IncidentDataDialogViewModel.cs:91), and Esc maps to it (IncidentDataDialogView.axaml:13). Typed Stichwort, Einsatznummer and address are discarded. Lower risk — four fields — but the same pattern.

Expected

  • If the buffer differs from what is stored, Esc and ABBRECHEN ask first ("Änderungen verwerfen?"), with focus on ABBRECHEN as the destructive-confirm rule from epic: keyboard-only operation (tracking) #545 requires. If nothing changed, they close straight away, so the keyboard flow stays fast.
  • CO: the editor already knows what changed (HasStatusChange, HasCoValueChange, HasDetailChange, HasLabelChange); reuse the in-view confirm the building removal uses.
  • Einsatzdaten: compare the fields to the session values and raise a ConfirmDialogViewModel.

Notes

  • Tests: type a value, cancel, assert the editor is still open and the confirm is showing; cancel with no change, assert it closes.
  • Check KeystrokeBudgetTests still pass — the unchanged path must not gain a keystroke.
  • This touches the UI, so the PR needs a before/after screenshot pair.

Activity

  1. added a commit that references this issue on Oct 19, 2026
    44aa7fa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestuxUser interface and usability

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions