fix(braindump): soft, retryable error UX when sort fails - #78
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.console.errorso debugging stays easy.What's NOT in this PR
The actual cause of the observed failure — a stale
todo-triageedge function on production Supabase that's missing themode: 'eisenhower'branch from PR #74. That's a deploy step, not a code change:After that deploy, the sort flow itself works again. This PR hardens the failure mode for next time something blinks.
Test plan
tsc --noEmitclean🤖 Generated with Claude Code