Menu

#507 Fix/gui keyboard hint

closed
nobody
None
2026-08-30
2026-08-30
Anonymous
No

Originally created by: thesageak

Pull Request

Slice

  • Repo: doberman-core
  • Feature / Slice: [#434] — auth dialog keyboard shortcut hint
  • Plan reference: issue [#434]

What this PR does

Adds a muted keyboard shortcut hint below the auth dialog button row:

Tab/Arrows: switch - Enter: confirm - Esc: deny

The dialog height now accounts for the rendered hint so wrapped text is not clipped. Existing keyboard bindings and deny-first behavior are unchanged.

Tests added (run in CI)

  • Added faked canvas coverage verifying that the button row creates a text item containing Enter.
  • Updated the fake canvas to support text tracking and bbox().
  • pytest tests/unit/test_gui_prompter.py — 35 passed
  • Full PR checks passed locally.

Public-release safety (doberman-core only)

  • [x] Contains nothing from the "not allowed" list: no enterprise/hosted code, no proprietary detection, no customer data, no secrets, no commercial-license code
  • [x] Core still builds/tests/runs with NO enterprise package installed

Security checklist

  • [x] Fails closed on error / uncertainty
  • [x] No secret, full file, or unredacted prompt logged or committed
  • [x] Any guardrail/learning change is raise-only (no silent loosening)
  • [x] Every BLOCK/AUTH carries reason codes + a human explanation
  • [x] doberman-core does not import doberman_enterprise

Edge cases covered / Deviations from plan / Risks introduced

  • Keyboard hint can wrap within the dialog content width without being clipped.
  • No changes to authorization decisions or keyboard bindings.
  • No known risks introduced.

Closes [#434]

Related

Tickets: #434
Tickets: #510

Discussion

  • Anonymous

    Anonymous - 2026-08-30

    Ticket changed by: fu351

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2026-08-30

    Originally posted by: fu351

    Thanks @thesageak, this is in! Measuring the drawn hint with canvas.bbox and growing the window from that, instead of adding a guessed constant, is the right way to do it, a font or DPI change can't clip it. One thing I added on top: the ASCII test I pointed you at only covered the challenge message, not this label, so I landed your commits as they are through [#510] with one extra assert that pins the hint to ASCII, nothing of yours changed. If you want another one in the same file, [#432] (level-3) gives the dialog a proper Doberman taskbar icon. Feel free to star the repo if it's been useful.

     

    Related

    Tickets: #432
    Tickets: #510


Log in to post a comment.