Skip to content

Fix family cancel/Escape: shared ask_text and confirm_discard helpers, first call sites - #3895

Merged
accesswatch merged 2 commits into
mainfrom
review/fix-family-cancel
Nov 30, 2026
Merged

accesswatch merged 2 commits into
mainfrom
review/fix-family-cancel

Conversation

@accesswatch

Copy link
Copy Markdown
Contributor

Part of #3851.

The helper (built once)

quill/ui/cancel_prompts.py (new module, because dialog_contract.py is at its GATE-11 ceiling):

  • ask_text(...) returns None on Cancel, Escape or the close box, and a string (possibly empty) only on OK.
  • ask_yes_no_cancel(...) returns True, False or None (back out).
  • confirm_discard(...) asks "Discard ...?" with No as the default, and only when there is input to lose.
    All go through show_modal_dialog / show_message_box. The Workbench gets them through a small new mixin, github_workbench_prompts.py (_ask_text_or_none, _confirm_or_cancel); _ask_text keeps its shape for its other callers.

Members converted (each with a test that fails on the old code)

Existing tests adjusted only to answer the new questions (review Escape, Discard, revert stub); none loosened.

Members left for other families or later PRs

Checks

ruff check/format, GATE-11, dialog_button_contract, check_access_keys, check_over_announce, braille_parity_audit, surface_reachability, dialog_inventory (registry regenerated); tests/unit/ui, tests/unit/apps, tests/unit/tools pass in parallel (one machine-global Cast test errored in the fan-out and passes serially).

🤖 Generated with Claude Code

…, first call sites

Part of #3851. New quill/ui/cancel_prompts.py (ask_text returns None on cancel,
ask_yes_no_cancel, confirm_discard defaulting to No) and ten call sites where
Cancel, Escape or the close box was read as an answer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@accesswatch
accesswatch merged commit 3129a21 into main Nov 30, 2026
22 checks passed
accesswatch added a commit that referenced this pull request Nov 30, 2026
…y cannot double-speak (#3903)

The service's transcript sink calls sr_announce.announce, which calls whatever
handler an earlier test left installed; that handler spoke 'Saved' through its
own engine, so these tests failed depending on file order within a worker
(seen on #3895 and #3896). Reproduced by installing such a handler before the
tests; they now clear it.

Co-authored-by: Jeff Bishop <jeff@community-access.org>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant