Skip to content

Show errors with shared components - #135

Merged
Tarquinen merged 4 commits into
devfrom
error-notice
Nov 18, 2026
Merged

Tarquinen merged 4 commits into
devfrom
error-notice

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

The app has no shared way to show an error. Each screen drew its own: three hand-built floating chips, nine copies of the centred "Couldn't load" state, about a dozen red text errors using the destructive-action red, and eight hand-typed copies of system orange.

Now errors use shared pieces in core/ui, and each stays where it belongs on its screen:

  • OpenCodeNotice and OpenCodeNoticePresence: the floating chip, with the connection pill's look and motion. Used by the pill, the request-load error and the drawer's failure notice.
  • OpenCodeContentUnavailable: the centred glyph, title, description and action for a pane with nothing to show. Used by the session, folder browser, model picker, Settings > Models, server details, file viewer, shell output, share sheet and call history.
  • OpenCodeErrorText: an error written next to what failed, in danger and read out by TalkBack.
  • OpenCodeColors.warning: system orange, replacing the hand copies.

What changes on screen:

  • The request-load error becomes a red circle chip that hugs its text, instead of a full-width orange triangle banner. The drawer notice hugs its text too.
  • The session and Settings > Models failures get the bold title the other screens had. The session, file viewer and server details failures get the filled Try Again button.
  • Failure text and glyphs use danger, the documented failure colour; destructive stays for destructive actions.
  • The voice failure cards and the request error line are now read out by TalkBack.

The launch connection card, voice failure cards and MCP banner keep their layouts and only take the shared colours.

Floating notices

Light Dark

The server drops and returns, then an archive fails in the drawer:

notices-motion.mp4

Full-screen states and the launch card

Session, Settings > Models, folder browser, model picker, launch connection error. Before on top, after below.

Server details, connection status and inline error text

Server details failure (filled Try Again, bold title), Settings connection status when offline, and an invalid header name in the server form (both now the failure red). Before on top, after below.

Verified with scripts/check.sh for every module, and on the emulator in light and dark.

The session's connection pill, its request-load banner and the drawer's
failure notice each built the same floating chip by hand, and had drifted:
different glyphs and reds, different radii and padding, and the banner's
own enter animation.

OpenCodeNotice in core/ui is now that chip (the connection pill's look),
and OpenCodeNoticePresence its arrival and departure (the pill's motion).
All three use them. ComposerBanner, ServerConnectionPillTransition and the
drawer's hand-built composable are gone.

Visible changes: the request-load error is a red circle chip that hugs its
text instead of a full-width orange triangle banner; failure glyphs use
`danger`, the documented failure colour, instead of `destructive`; the
drawer notice hugs its text; the pill's title may wrap to two lines.

Verified: scripts/check.sh for :core, :feature:session and :feature:drawer;
on the emulator in light and dark, the pill reconnecting, failing, sign-in
rejected and leaving, the request-load error, and a failed archive in the
drawer.
Errors outside the floating notice were still drawn by hand in each
screen: nine copies of the centred "nothing to show" state with
different type, spacing and buttons, about a dozen red text errors
using the destructive-action red, and eight hand-typed copies of
system orange.

Now there are three shared pieces in core/ui:
- OpenCodeContentUnavailable: the centred glyph, title, description and
  action. Replaces the copies in the session, the folder browser, the
  model picker, Settings > Models, server details and its trays, the
  file viewer, shell output, the share sheet and call history.
- OpenCodeErrorText: an error written next to what failed, in `danger`
  and read out by TalkBack.
- OpenCodeColors.warning: system orange, replacing the hand copies.

Failure text and glyphs use `danger`; `destructive` stays for
destructive actions. The voice failure cards and the request error
line are now read out by TalkBack.

Visible changes are small: the session and Settings > Models failures
get the bold title the others had, and the session, file viewer and
server details failures get the filled Try Again button.

Verified: scripts/check.sh (all modules) on the VM; before and after
screenshots in light and dark of the session, model picker, Settings >
Models, folder browser and launch connection failures on the emulator.
@Tarquinen Tarquinen changed the title Draw floating failure notices with one component Show errors with shared components Nov 18, 2026
@Tarquinen
Tarquinen merged commit 92c61d4 into dev Nov 18, 2026
3 checks passed

This branch was previously deployed

1 inactive deployment
release — 740e4811 Deployed Nov 18, 2026 by Tarquinen via check #467
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