Repository navigation
Show errors with shared components - #135
Merged
Merged
Conversation
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.
This was referenced Nov 18, 2026
Closed
This branch was previously deployed
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.
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:OpenCodeNoticeandOpenCodeNoticePresence: 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, indangerand read out by TalkBack.OpenCodeColors.warning: system orange, replacing the hand copies.What changes on screen:
danger, the documented failure colour;destructivestays for destructive actions.The launch connection card, voice failure cards and MCP banner keep their layouts and only take the shared colours.
Floating notices
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.shfor every module, and on the emulator in light and dark.