Skip to content

fix(web): show distinct error state with retry for failed suggestion … - #609

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/prompts-suggestions-load-error-state
Aug 3, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/prompts-suggestions-load-error-state

Conversation

@d180

@d180 d180 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

When the prompt suggestions card failed to load, the error was swallowed into console.error and the card silently rendered the same "No suggestions right now" empty state as a genuinely empty result — telling the user to click Refresh when the real problem was a failed request.

  • Added an error state to SuggestionsCard, cleared on load start, brand change, and successful refresh
  • load()'s catch block now sets the error and fires toast.error, matching the pattern already used by handleRefresh
  • A new distinct "Couldn't load suggestions" state renders instead of the empty state when the load failed, with a Retry button that re-invokes load()

Related issue

Closes #592

Type of change

  • fix — Bug fix

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean error state — cleared in all the right places and the retry wires straight back into load(). Thanks!

@gkhngyk
gkhngyk merged commit 9b7caeb into ansvisor:main Aug 3, 2026
4 checks passed
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.

Prompts: failed suggestion loads are indistinguishable from "no suggestions"

2 participants