Skip to content

fix(braindump): soft, retryable error UX when sort fails - #78

Merged
TrainTravel merged 1 commit into
mainfrom
fix/braindump-sort-error
Jun 11, 2026
Merged

fix(braindump): soft, retryable error UX when sort fails#78
TrainTravel merged 1 commit into
mainfrom
fix/braindump-sort-error

Conversation

@TrainTravel

Copy link
Copy Markdown
Owner

Summary

Lovable's mobile test surfaced that when the Brain Dump → Sort flow fails, the user sees "Edge Function returned a non-2xx status code" as raw text under the CTA. For an ADHD-friendly app that's the worst possible failure mode.

  • Replace the raw error with a bilingual one-liner "Couldn't sort right now." (en/fr/es/ja/zh-Hans/zh-Hant).
  • Add a Try again button so the user doesn't have to back out of BrainDump.
  • Log the raw error / data via console.error so debugging stays easy.
  • Session state preserved across retry.

What's NOT in this PR

The actual cause of the observed failure — a stale todo-triage edge function on production Supabase that's missing the mode: 'eisenhower' branch from PR #74. That's a deploy step, not a code change:

npx supabase functions deploy todo-triage --project-ref bdeotnzldfnqwbdymscp

After that deploy, the sort flow itself works again. This PR hardens the failure mode for next time something blinks.

Test plan

  • tsc --noEmit clean
  • 344/344 vitest passing
  • Smoke test: brain dump 2 thoughts → temporarily disconnect network → tap Sort → see soft message + Try again → reconnect → tap Try again → flow recovers

🤖 Generated with Claude Code

Lovable's mobile test caught the previous error UX surfacing raw
engineer-speak ("Edge Function returned a non-2xx status code") under
the Sort CTA when the todo-triage call failed. For an ADHD-friendly
app that's the worst possible failure mode — it reads as "you broke
it" rather than "the network blinked."

What changes:

- The user-facing message is now a soft, bilingual line:
  "Couldn't sort right now." (6 languages).
- A Try again button replaces the silent dead-end, so the user
  doesn't have to back out of BrainDump to retry.
- The raw error/data still get logged via console.error so debugging
  stays trivial; only the human-facing copy is softened.
- The Sort CTA itself stays where it is — failure doesn't reset
  session state, so the count and items remain. Retrying picks up
  exactly where the attempt left off.

Not in this PR (separate work):
- Redeploying the todo-triage edge function so the eisenhower branch
  is actually live on production Supabase. That's what's causing the
  failure to be observed in the first place; user runs
  `npx supabase functions deploy todo-triage`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@TrainTravel
TrainTravel merged commit a1f3404 into main Jun 11, 2026
1 check failed
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