Repository navigation
Draft: restyle the Android app like OpenCode Desktop (for review, do not merge) - #19
Merged
Merged
Conversation
Prototype only (branch ui-brand-prototype): evaluates replacing the Android-native Material 3 look with the OpenCode desktop/web design system (packages/ui, oc-2 v2 tokens). Deliberately breaks AGENTS.md's "Visuals are Android-native" rule on this branch only. - Bundle Inter (variable, desktop weights 440/530/600/670) and IBM Plex Mono (Regular/Medium/SemiBold) as res/font; OFL licences in docs/licenses/. OpenCodeFonts.system/monospace now resolve to them; direct FontFamily.Monospace call sites use OpenCodeFonts.monospace so code and tool output get Plex Mono. - OpenCodeTextStyles: desktop scale adapted to sp (body 15/23, subheadline 14, footnote 13, headline 16 medium, titles medium with tight tracking). Still sp, so font scaling is unchanged. - OpenCodeRadius/OpenCodeShapes: desktop radii (4/6/8/10/12, sheets 16). - AppTheme.OpenCode now uses BrandPalette (desktop v2 neutrals, monochrome contrast accent, blue links, desktop syntax/diff colours) and is the default theme instead of System (replaces Material You dynamic colour as the default; System is still selectable). - toColorScheme: surfaceTint transparent, so surfaces stay flat (no tonal tint). - Buttons: 48dp (touch target kept), 8dp radius; secondary is a hairline neutral instead of a tonal fill. Verified: vm.sh assemble; installed on FX_1 and checked home, drawer, transcript, + menu and Settings in light mode.
Restyles the session transcript to the OpenCode desktop's session UI (session-ui message-part.css, markdown.css, basic-tool.css). Behaviour, disclosure motion and TalkBack semantics are unchanged. - Code blocks, tables and opened tool groups: the desktop's inset block (faint fill, hairline border, 8dp corners, 12dp padding) at the prose width instead of iOS's full-bleed band between hairlines (MarkdownBand, TranscriptBand). The band's grow/close reveal still draws to the row's moving edge. Markdown dividers no longer bleed to the screen edges. - Tool rows: a 16dp tool glyph (read/write/edit/terminal/search/web/todo), medium-weight name and muted detail; Used N gets a disclosure chevron. The glyphs are decorative (no contentDescription), row semantics unchanged. - User bubble: desktop radius 10, padding 12x8, max width 82%. - Transcript type: body 15sp, headings 19/17/15 semibold-to-bold, Used N 14sp, code 13sp Plex Mono (tunable defaults; the Tuning Panel can still move them). - TranscriptMetrics radii: card 8, control 6. Verified: vm.sh assemble; on FX_1 opened a live session with markdown, a Kotlin code block and Read/Write/Edit tool calls, expanded Used 3 tools and the Edit row, light and dark.
Restyles the composer and its + menu to the OpenCode desktop's prompt dock (dock-surface.css, actions/submit.css, context-menu.css). Layout, gestures, expansion motion, touch targets and semantics are unchanged. - Composer surface (shared ComposerSurface/callSurface): a flat fill (white / one step above the dark canvas), 1dp hairline ring and a small raised shadow instead of a tonal capsule; corner radius 28 -> 12 (ComposerMetrics and ComposerTunables). Call cards keep callSurface without a ring. - Send/trailing control: rounded 8dp square on the monochrome accent, like the desktop submit button, instead of a circle (48dp target unchanged). - + menu: 12dp panel with hairline border and soft shadow, 4dp row inset, bare 20dp glyphs in secondary text instead of tinted discs, 15sp medium labels. Verified: vm.sh assemble; on FX_1 checked the composer with a draft and the + menu open, light and dark.
Restyles the session drawer and the home project list to the OpenCode desktop sidebar (app tab-nav.css, project-session-row). Rows keep their 44dp height, gestures, pin drag and semantics. - Drawer canvas: the desktop sidebar's bg-deep (canvasWeak), a step off the session canvas (new OpenCodeColors.drawerCanvas; System theme keeps canvas). - Selected row: a faint pressed overlay in a 6dp radius instead of Material's secondary-container capsule indicator; row radius 10 -> 6, row titles 14sp. - New Session and the Settings/call group: neutral 8dp buttons with a hairline ring instead of tonal capsules; New Session label 14sp medium. - Home project list and its search field: 8dp highlights instead of capsules. Verified: vm.sh assemble; on FX_1 checked the drawer, home project list and footer in light mode.
Restyles the first-run connection screen (AppView ConnectionView) to the OpenCode desktop look; copy, actions, order and semantics are unchanged. - Pairing actions: 8dp-radius buttons at 48dp; Enter a Server Manually is a neutral hairline button, Scan Pairing Code the monochrome primary; labels 15sp medium instead of 17sp semibold. - Copy-command boxes: the desktop code block (faint fill, hairline border) in IBM Plex Mono instead of Berkeley Mono on a tonal fill (Berkeley Mono stays for the wordmark only). Verified: vm.sh assemble; on FX_1 cleared app data and checked the welcome screen in light mode, then connected through the manual server form.
Restyles the Settings chrome shared by every Settings page (SettingsRows) to the OpenCode desktop's cards and lists; rows, targets and semantics unchanged. - Section cards: flat fill inside a 1dp hairline border, 10dp radius. - Dividers: an inset 1dp hairline (desktop list.css), replacing Material 3 Expressive's 2dp segmented gap and its corner-rounding path (removed). - Settings type: the app's Inter scale (row titles 15sp medium, summaries 13sp, headers 14sp medium; large title 24sp) instead of Material's default Roboto Typography(). Verified: vm.sh assemble; on FX_1 opened Settings from the drawer, light mode.
Phase 0 of the full-app desktop restyle. - BrandPalette (light): darken just enough for WCAG AA 4.5:1 on white, #FAFAFA and the #EEEEEE inline-code fill. Diverges from the desktop: tertiary #808080 -> #6E6E6E, link #3B5CF6 -> #3A5BF6, syntax keyword #C83D8B -> #C83B8A, syntax string #198B43 -> #188540, diff-added text -> #17813E. Light swatch ring #C7C7C7 so the theme swatch keeps its step. - New OpenCodeColors.strongBorders: hairlines (colors.border, M3 outlineVariant) use borderStrong under Increase Contrast or Android's High contrast text setting (rememberHighContrastText, Settings.Secure high_text_contrast_enabled, live). Desktop hairlines are under 3:1. - Hand-tinted outline@alpha hairlines on buttons, the dock, the + menu and the drawer footer now use colors.border, so they follow strongBorders. - Deeper Markdown headings (H4+) stay at H3's 15sp instead of 17. - Tests updated to the design values, iOS names kept, each with a comment that the visuals diverge from iOS on purpose: ThemePaletteTests (oklchDerived…), MarkdownBlockTests (refinedStandardTypography…, inlineCodeInHeadings…, accessibilityDynamicTypeScales…), DrawerSpacingTests (defaultsAreWhatShipped). Verified: vm.sh check :core :feature:transcript :feature:drawer green.
Phase 1 of the full-app desktop restyle. Visual only: no behaviour, copy, semantics or touch-target changes. - core/ui OpenCodeSurfaces: the desktop floating surface (white in light, one step above the canvas in dark), hairline ring, dialog/popover shapes and shadows; OpenCodeColors.floating; Modifier.openCodeHairline. - OpenCodeAlertDialog wraps Material's AlertDialog (floating fill, hairline, 12dp corners, no tonal elevation, 16sp medium title, 14sp body). Every AlertDialog call site (19, all modules) now uses it; buttons, dismissal and semantics are Material's. - toColorScheme (curated themes; System/Material You unchanged): surfaceContainerLow and surfaceContainer are the floating surface, so every bottom sheet, dropdown menu and tooltip is a flat desktop panel. - Shapes: extraSmall 4 -> 6 (desktop input and context-menu radius). - OpenCodeShape.control (8dp) replaces glass capsules on controls: drawer search and button, Catch Up undo, composer pills, photo pill, run-error actions, share and browser toolbars, image viewer toolbar, retry label, + menu album picker. True capsules (grabbers, dots) stay. - OpenCodeIconButton's Circle style is the desktop neutral icon button: a 10dp rounded square on the base surface with a hairline (filled when tinted). Name kept so call sites match iOS. - Server form: Connect is an 8dp, 48dp desktop contrast button. - Model picker (One Picker): floating fill, hairline, popover shadow; radii 12 (composer) / 16 instead of 28/32/46; autocomplete highlight concentric with the 12dp composer. - Session sheet cards: 10dp radius with hairline ring. - Request dock: 12dp corners shared with the composer; header row and × keep their place; × is a rounded square; the Always Allow scope popover is a desktop popover. Permission actions: 8dp; Allow Once is the neutral hairline button. Queued messages: Send Now is a rounded square. Verified: vm.sh assemble; on FX_1 checked the model picker, session ⋮ menu, session sheet, delete confirmation dialog, drawer and its search field. vm.sh check :feature:composer :core green.
Phase 2 of the full-app desktop restyle. Visual only. - Session header: the scrolled bar is the pane's canvas over a hairline (the desktop title bar) instead of a surfaceContainer fill. The ⋮ context gauge is unchanged. - Composer pills, the server connection pill (reconnecting / failed / sign-in failed) and jump-to-latest: floating fill, hairline ring, small raised shadow, 8dp control radius instead of tonal capsules and circles. - Composer banner: the dock's 12dp radius, floating fill and hairline. - Background-work capsule and panel: floating fill, hairline, popover/raised shadows; panelRadius 28 -> 12. BackgroundWorkTests' glassRadiusFitsCapsuleAndPanelThroughoutMorph now expects 12 (comment notes the deliberate divergence from iOS). - Catch Up: cards 16dp (iOS 40) with an 8dp flying shadow (was 16); Undo is the neutral hairline button. - Drawer: server-switch note is a desktop card (10dp, hairline); search's Cancel is a rounded-square icon button. - Permission diff preview gets a hairline ring. - Transcript images, attachments and errors already follow TranscriptMetrics (8/6dp) and OpenCodeShape.control from the earlier phases. Verified: vm.sh assemble; on FX_1 checked the session header, jump-to-latest and Catch Up. vm.sh check :feature:session :feature:drawer green.
Phase 3 of the full-app desktop restyle. Visual only. - Voice: call cards and the provider failure card draw callSurface with the hairline ring; their corners are the dock's 12 (was 28) and 10 (was 22); the expansion clip follows ComposerMetrics.cornerRadius. The live-call rows are a floating card with a hairline. The floating call orb's round controls are unchanged (they're the call's own gestures). - In-app browser: its toolbar, back and ask bar are floating surfaces with a hairline and a raised shadow instead of tonal elevation 3; the back button is a 10dp rounded square, the ask bar 12dp instead of a capsule. - Image bento tiles: TranscriptMetrics.cardCornerRadius (8, was 14). The full-screen media viewer stays dark; its toolbar uses the control shape (phase 1). - Share sheet: the composer is the desktop dock (12dp, floating fill, hairline); previews and the text card 10dp. - Ask OpenCode and the widget configuration dialogs: the desktop dialog (floating fill, hairline, 12dp, no tonal elevation). Verified: vm.sh assemble; on FX_1 opened the share sheet (SEND intent), Ask OpenCode and a session's link chip.
Phase 4 of the full-app desktop restyle. Visual only. - Every Material Button / FilledTonalButton / OutlinedButton without an explicit shape now passes OpenCodeShape.control (8dp): Material's buttons default to full capsules and there's no theme-level button shape. Call sites: share, onboarding playground, voice key/provider, voice call rows, pairing scanner (shape only), draft projects, shell output. - Server Details and its trays (MCP servers, skills, tiles): 12/10dp corners instead of iOS's 26/22/16, grouped-row corners included. - What's New cards 12/10dp; onboarding playground panels 12dp. - Welcome (preview) "other ways" card: floating fill with hairline, 10dp. - Appearance: the OpenCode (desktop) theme is the default since the token commit; curated themes keep their colours and get the desktop type, radii and flat surfaces from the theme; System (Material You) stays selectable and keeps Material's container colours. - Devtools: token level only (no component changes). Verified: vm.sh assemble; on FX_1 checked Appearance, Server Details, Voice, What's New and Experimental.
Phase 5 of the full-app desktop restyle (token level only). - Glance control widgets (Start Call, Open Session, New Session) render with the chosen curated theme's colours (the OpenCode desktop palette by default) via glance-material3 ColorProviders from OpenCodeColors; the System theme keeps the wallpaper's dynamic colours. Corners 28 -> 12 (desktop dock). Glance can't load custom fonts, so widget text stays the system font. - Notifications and the session live-activity notification are unchanged: the system draws them, and their only app colour is the run tint. Verified: vm.sh assemble.
Phase 6 of the full-app desktop restyle. - AGENTS.md: "Visuals are Android-native: Material 3 Expressive … SF → Roboto" is replaced by "Visuals follow the OpenCode desktop design system": Inter / IBM Plex Mono, desktop type in sp, flat hairline surfaces, small radii, the desktop palette as default; behaviour (Material structure, back, sheets, IME, TalkBack, 48dp, font scaling) stays Android and flows and copy still follow iOS. Design-system and Buttons bullets name OpenCodeSurfaces, OpenCodeAlertDialog and OpenCodeShape.control. - docs/parity/core-ui.md: a "Visual divergence" section (fonts, palette and its AA adjustments, container mapping, strongBorders, radii, surfaces, controls); Glass/TapTarget rows and the design-system API updated; the appearance-theme default is noted as oc-2. Verified: docs only.
#14) into ui-brand-prototype One conflict, in MarkdownBand.kt: FB-03 registers the code/table horizontal scroller with the drawer pan (drawerPanHorizontalScroller); the brand branch moved that scroller inside the desktop's inset bordered block and dropped the gutter bleed. Resolved by keeping the brand visuals and the FB-03 registration on the horizontally scrolling node inside the block (the gutter's LocalTranscriptLayoutTuning import stays dropped). The other FB-03 registrations (UserAttachmentViews, FileAttachmentViews, MermaidDiagramView, SessionViewAttachments, ComposerView) merged cleanly and still sit on their scrolling nodes.
Material draws an unchecked Switch's border and thumb in colorScheme.outline, which the brand maps to the desktop's border-strong (#CCCCCC on white, #454545 on the #2E2E2E dark card): under 2:1, so an off switch nearly vanished in dark and was faint in light. New OpenCodeSwitchDefaults.colors() (core/ui/OpenCodeSurfaces.kt): for the curated themes the unchecked border and thumb are colors.tertiaryText, 3:1 or more against every surface a switch sits on and its own track (light #6E6E6E 4.4-5.1:1, dark #8A8A8A 3.3-5.2:1); the System theme keeps Material's colours. All 7 Switch call sites pass it (Settings rows, session sheet Always Notify, What's New, request review, devtools x3). Hairline borders are unchanged. Verified: vm.sh assemble; on FX_1 checked Voice and Experimental in light and dark (ui-brand/full/switch-contrast.png).
…er Send) Feedback on the before/after video Ryan posted on X. Visual only. - Copy-command boxes (connection screen, Welcome preview): a clearly filled background again, as main's: new OpenCodeSurfaces.commandFill, desktop bg-layer-03 #EEEEEE in light and the shell block's bg-layer-02 #2E2E2E in dark, with the hairline; Plex Mono, 8dp radius and the copy icon kept. The connection screen's box sets its content colour explicitly (the fill matches surfaceVariant, whose content colour is the secondary text). The New Server sheet has no command box (its hint is inline text), so it's unchanged. - Neutral/secondary buttons: a light neutral fill plus the hairline instead of the base surface (new OpenCodeSurfaces.neutralFill = surfaceContainerHighest, #EEEEEE / #3A3A3A; labels 15.6:1 / 9.7:1): OpenCodeSecondaryButton (Paste), Enter a Server Manually, drawer New Session and the Settings/call group, drawer search and its Cancel, Catch Up Undo, permission Allow Once, and OpenCodeIconButton's neutral style. - Send: its visible face is 40dp (was 34, main's circle is 34), still a rounded square, glyph 20dp; the 48dp target is unchanged. Other trailing controls keep 34. ComposerControlLabel takes a faceDiameter. - Button radius unchanged (the designer liked it). Verified: vm.sh check green (all modules); on FX_1 took main 35515ed / brand-before / brand-after stills of the welcome screen, the composer with text and the drawer footer in light and dark (ui-brand/full/feedback-*.png).
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.
For review (Dan). Do not merge yet.
Restyles the Android app with the OpenCode Desktop design system (
opencode/packages/ui): Inter for UI text, IBM Plex Mono for code and tool output (both OFL, bundled), the desktop palette as the default theme, flat surfaces with hairline borders instead of tonal elevation, desktop radii and type scale. Android only; iOS keeps its look. Behaviour, flows, copy, back/sheets/IME and TalkBack semantics are unchanged; touch targets stay ≥ 48 dp and text scales.Covered: welcome/onboarding, drawer/home, transcript (bubbles, markdown, code/table blocks, tool rows), composer and + menu, session header and chrome, Catch Up, sheets, dialogs, menus, model picker, voice/call surfaces, media/browser/share, all Settings pages, widgets (colours and corners). Material You stays available as Settings › Appearance › System. AGENTS.md's "Android-native visuals" rule is rewritten to point at the desktop design system.
Feedback from X applied: filled grey copy-command boxes, filled secondary buttons, a bigger Send (40 dp visible, 48 dp target), visible off switches (≥ 3:1).
Still Material underneath: text fields, switches, sheet drag handles, the Settings title bar, the camera screen, the call orb, onboarding illustrations, devtools. They take the new colours and shapes but keep Material structure. Other curated themes (Tokyo Night etc.) not checked screen by screen.
Open decisions: hairline borders are 1.6:1 light / 1.9:1 dark (Desktop's look; WCAG 1.4.11 asks 3:1 for UI edges). Five light-mode text colours are slightly darker than Desktop to reach AA.
Verified: full
scripts/check.shon the QA VM at94146943; FB-03 (scrolled tables/code keep their swipe) and FB-07 (back opens the session list) on the restyled screens; TalkBack spot-check on the session sheet, delete dialog and + menu. This PR's CI checks the merge with current main. The CI run's artifacts include a debug APK to install.Before/after videos and stills are in the QA folder (not in the repo).