fix: surface a failed import as a dialog and parse its message strictly #149

Merged
mysticalsoap merged 1 commit from fix/import-failure-dialog into trunk 2026-08-24 15:23:13 -04:00
Owner

Problem

A failed import's only feedback is a notify-send toast. KDE suppresses notifications over fullscreen apps, so the first live SRP login failure (#146's CAPTCHA demand) played out with no visible feedback at all — the user only found it in the log. Separately, downloaded()'s parsing trusts the payload shape completely (#141): a two-field message passes the >= 2 check and dies on split[2] inside a Qt slot, and any &-less string is opened as ~/.aqomui/<msg>.json.

Fix

  • The failure branch shows a modal messageBox (Critical) instead of a toast — a failed import answers a user action and must not vanish with the desktop's notification policy. Success keeps its toast.
  • Exactly three fields = failure; anything else containing & is logged and dropped; a success result whose payload file is missing is logged instead of raising FileNotFoundError from the slot. Closes #141.

Verification

Three new stub-based tests: failure → dialog with the right fields and no toast; two-field message → logged, no crash; &-less message without a payload file → logged, no crash. Full suite 331 passed, lint gate clean.

🤖 Generated with Claude Code

## Problem A failed import's only feedback is a `notify-send` toast. KDE suppresses notifications over fullscreen apps, so the first live SRP login failure (#146's CAPTCHA demand) played out with no visible feedback at all — the user only found it in the log. Separately, `downloaded()`'s parsing trusts the payload shape completely (#141): a two-field message passes the `>= 2` check and dies on `split[2]` inside a Qt slot, and any `&`-less string is opened as `~/.aqomui/<msg>.json`. ## Fix - The failure branch shows a modal `messageBox` (Critical) instead of a toast — a failed import answers a user action and must not vanish with the desktop's notification policy. Success keeps its toast. - Exactly three fields = failure; anything else containing `&` is logged and dropped; a success result whose payload file is missing is logged instead of raising `FileNotFoundError` from the slot. Closes #141. ## Verification Three new stub-based tests: failure → dialog with the right fields and no toast; two-field message → logged, no crash; `&`-less message without a payload file → logged, no crash. Full suite 331 passed, lint gate clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: surface a failed import as a dialog and parse its message strictly
All checks were successful
ci / test (pull_request) Successful in 28s
3d60f53e88
A failed import's only feedback was a notify-send toast, which the
desktop can suppress outright (KDE does over fullscreen apps) - the
first live SRP login failure played out invisibly. A failure answers a
user action, so it gets a modal messageBox.

Tightens downloaded()'s parsing while there (#141): exactly three
fields is a failure (two used to satisfy the check and die on split[2]
inside a Qt slot), anything else with a '&' is logged and dropped, and
a success payload whose json file is missing no longer raises from the
slot either.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mysticalsoap force-pushed fix/import-failure-dialog from 3d60f53e88
All checks were successful
ci / test (pull_request) Successful in 28s
to c9592d897a
Some checks failed
ci / test (pull_request) Successful in 33s
ci / test (push) Has been cancelled
2026-08-24 15:18:25 -04:00
Compare
mysticalsoap deleted branch fix/import-failure-dialog 2026-08-24 15:23:14 -04:00
Sign in to join this conversation.
No description provided.