Files
swiftcontrol/lib/pages/support_chat/widgets
Jonas Bark 12b51447a3 fix: sending a screenshot without text no longer crashes
SupportComposer._submit caught the send failure to restore the text and
the staged attachment, then rethrew. The send button drops the returned
Future, so that rethrow escaped into the zone as an unhandled error and
was reported as "App crashed".

- _submit is terminal now, and the button invokes it via unawaited() so
  no Future is silently dropped. The page-level rethrows stay: they are
  how the composer learns it must restore.
- The page-level send catches forward through recordError
  ('support.chat.send') — this path had no crash reporting at all.
- Interim client mitigation for image-only messages: substitute a
  localized placeholder body when the body is empty but an attachment is
  present, since the send-support-message edge function still rejects an
  empty body.
- A failed send no longer orphans the uploaded blob: the successful
  upload is retained against the staged attachment the composer restores,
  so a retry re-uses it instead of uploading a second copy (there is no
  client-side delete for the attachment bucket).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 13:14:18 +02:00
..
2026-04-27 15:32:23 +02:00