Skip to content

Make error toasts readable and keep notification details open - #3372

Merged
ymichael merged 2 commits into
mainfrom
bb/improve-submission-error-toasts-thr_m2dynvcmyr
Sep 10, 2026
Merged

Make error toasts readable and keep notification details open#3372
ymichael merged 2 commits into
mainfrom
bb/improve-submission-error-toasts-thr_m2dynvcmyr

Conversation

@ymichael

@ymichael ymichael commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Error toasts forced their text onto one truncated line, and many mutation handlers put the entire failure explanation in the title. Clicking “Show more” dismissed the toast and opened the notification center, but Sonner then restored focus to the composer and the popover immediately closed on the outside focus change.

What changed

  • Wrap toast titles and descriptions across up to four lines, detect overflow on both axes and on resize, and put actions below the explanation.
  • Preserve structured lifecycle error titles and descriptions; use the operation fallback as the title for other errors. Migrate all 16 remaining core handlers that passed getMutationErrorMessage() directly into the toast title.
  • Keep the notification center open through outside clicks, taps, and focus changes on desktop and compact layouts. Explicit dismissal and Escape still work. Other popovers and drawers retain their default dismissal behavior.

How you verified

  • Added a regression test using the real Sonner toaster that reproduced notification-center closure after focus restoration before the fix. Covered outside focus/clicks, compact backdrop taps, explicit close, and Escape.
  • Added vertical-overflow and structured-error assertions; updated the queued-message recovery test to verify separate title and description while retaining its draft-recovery checks.
  • 85 targeted app tests passed across mutation errors, notifications, machine settings, thread actions, the composer, embedded chat, and merge-base handling. The 20 responsive-overlay tests also passed.
  • pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/shared-ui passed, with app typecheck repeated after the handler migration.
  • Captured desktop and compact Chromium screenshots of wrapping and “Show more”, and six before/after pairs using identical sample errors through the real app renderer. Verified full details remain open and manual close/Escape still work. iOS Simulator Safari was not exercised.
  • Changed-file formatting check and git diff --check passed.

AGENT GENERATED

@ymichael
ymichael merged commit 04f4e6a into main Sep 10, 2026
16 checks passed
@ymichael
ymichael deleted the bb/improve-submission-error-toasts-thr_m2dynvcmyr branch September 10, 2026 02:47
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