Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5f6bdf6
Prototype: OpenCode desktop brand tokens in core/ui
R44VC0RP Nov 9, 2026
9415991
Prototype: desktop-style transcript (bubble, code blocks, tool rows)
R44VC0RP Nov 9, 2026
2209075
Prototype: desktop-style composer and + menu
R44VC0RP Nov 9, 2026
03065cf
Prototype: desktop-style drawer and home
R44VC0RP Nov 9, 2026
34cb92e
Prototype: desktop-style welcome/connection screen
R44VC0RP Nov 9, 2026
03acc6f
Prototype: desktop-style Settings sections
R44VC0RP Nov 9, 2026
da7635c
Brand: AA contrast fixes, strong hairlines, tests for the desktop look
R44VC0RP Nov 9, 2026
7407267
Brand: desktop-style sheets, dialogs, menus and controls
R44VC0RP Nov 9, 2026
bc6be5a
Brand: desktop-style session chrome
R44VC0RP Nov 9, 2026
ded8b00
Brand: desktop-style voice, media, browser and share surfaces
R44VC0RP Nov 9, 2026
6227fb9
Brand: desktop-style secondary Settings pages and buttons app-wide
R44VC0RP Nov 9, 2026
0105092
Brand: widgets use the app's theme colours and desktop corners
R44VC0RP Nov 9, 2026
93ea7be
Docs: the desktop design system replaces the Android-native visual rule
R44VC0RP Nov 9, 2026
d3fe7d2
Merge origin/main (sound effects #13, drawer hscroll FB-03 / back FB-…
R44VC0RP Nov 9, 2026
81f03a2
Brand: off switches reach 3:1 (WCAG 1.4.11)
R44VC0RP Nov 9, 2026
9414694
Brand: X feedback (filled command boxes, filled neutral buttons, bigg…
R44VC0RP Nov 9, 2026
a9794d9
Merge main (3f3689d2) into ui-brand-prototype
R44VC0RP Nov 9, 2026
388f51d
Brand: desktop-style title bars
Tarquinen Nov 9, 2026
c1fdaab
Brand: desktop-style call orb
Tarquinen Nov 9, 2026
7e0359e
Brand: desktop-style switches and sheet handles
Tarquinen Nov 9, 2026
0790a6f
Brand: lighter off switches, 12 dp sheet corners
Tarquinen Nov 9, 2026
2f48101
Brand: desktop call card and graphite call orb
Tarquinen Nov 9, 2026
0645df9
Brand: desktop-style text fields
Tarquinen Nov 9, 2026
e156dba
Merge brand/controls into ui-brand-prototype
Tarquinen Nov 9, 2026
4655466
Merge brand/voice into ui-brand-prototype
Tarquinen Nov 9, 2026
689359c
Merge brand/screens into ui-brand-prototype
Tarquinen Nov 9, 2026
8221532
Brand: desktop-style camera screens and onboarding illustrations
Tarquinen Nov 9, 2026
de50d38
Brand: signal and danger colours, a raised dark floating fill
Tarquinen Nov 9, 2026
439201d
Brand: plus menu as a floating popover like the session menu
Tarquinen Nov 9, 2026
e16ac6f
Brand: markdown tables fit the inset block
Tarquinen Nov 9, 2026
bf3e725
Brand: Settings server card matches the groups below it
Tarquinen Nov 9, 2026
e7b14fa
Brand: drawer floating controls and coloured unread marks
Tarquinen Nov 9, 2026
fff54f4
Brand: polish prompts, failures, tool output, Send and Welcome
Tarquinen Nov 9, 2026
829376f
Brand: devtools on the desktop surfaces
Tarquinen Nov 9, 2026
35239f6
Merge branch 'ui-brand-prototype' into brand/screens
Tarquinen Nov 9, 2026
45e23ca
Merge branch 'ui-brand-prototype' into brand/polish
Tarquinen Nov 9, 2026
957d753
Brand: give the call card's unavailable controls more definition
Tarquinen Nov 9, 2026
8a9cbaa
Brand: keep squeezed table columns readable
Tarquinen Nov 9, 2026
b761a43
Brand: a little air under Settings row subtitles
Tarquinen Nov 9, 2026
5fd9331
Merge brand/screens into ui-brand-prototype
Tarquinen Nov 9, 2026
12301ff
Merge brand/polish into ui-brand-prototype
Tarquinen Nov 9, 2026
2f3803b
Brand: keep the call orb as on iOS
Tarquinen Nov 9, 2026
593c80b
Brand: 16 dp sheet corners
Tarquinen Nov 9, 2026
f053454
Brand: bold corner marks on the pairing scanner
Tarquinen Nov 9, 2026
df7a1a2
Merge branch 'brand/voice' into ui-brand-prototype
Tarquinen Nov 9, 2026
8de96c6
Brand: Android phone in the welcome illustration
Tarquinen Nov 9, 2026
cfecef6
Merge branch 'brand/screens' into ui-brand-prototype
Tarquinen Nov 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@ testing once `PLAY_OPEN_TESTING` is on). `scheduled-release.yml` releases `main`
still make sense so the two codebases diff side by side.
- Track every iOS file in `docs/parity/<area>.md` (see [docs/parity/README.md](docs/parity/README.md))
and update the row in the same commit.
- Visuals are Android-native: Material 3 Expressive components and surfaces (Liquid Glass →
M3 surfaces/tonal elevation, SF Symbols → Material Symbols via `OpenCodeIcons`, SF → Roboto;
BerkeleyMono only for onboarding brand marks). No glass/blur imitation, no web views as the
app shell, no React Native/Flutter/KMP UI.
- Visuals follow the OpenCode desktop design system (`packages/ui` in the opencode repo), not
iOS: Inter for UI text and IBM Plex Mono for code and tool output (bundled, OFL), the
desktop's type scale in sp, flat surfaces with hairline borders instead of tonal elevation
or glass, small radii (`OpenCodeRadius`, `OpenCodeShape.control`), the desktop palette as
the default theme (`BrandPalette`). Use `core/ui` tokens and `OpenCodeSurfaces`
(`OpenCodeAlertDialog`, floating fill + `openCodeHairline`) rather than raw Material
colours or capsules. Behaviour stays Android: Material components' structure, system back
and predictive back, sheets, IME, TalkBack semantics, ≥48 dp targets and font scaling.
Android looks different from iOS on purpose; behaviour, flows and copy still follow iOS.
SF Symbols → Material Symbols via `OpenCodeIcons`; BerkeleyMono only for the wordmark. No
glass/blur imitation, no web views as the app shell, no React Native/Flutter/KMP UI.

## Modules (fixed; never edit `settings.gradle.kts`)

Expand Down Expand Up @@ -87,14 +94,17 @@ already wired by its parent; keep those names.
(composables). Same rules as iOS (answer the press; navigation and closing stay quiet).
- Design system (`ai.opencode.core.ui`, `ai.opencode.core.motion`; details in
`docs/parity/core-ui.md`): wrap roots in `OpenCodeAppTheme {}`; iOS semantic colours via
`OpenCodeTheme.colors.*`, M3 roles via `MaterialTheme.colorScheme`; iOS text styles via
`OpenCodeTextStyles.*` or `MaterialTheme.typography`; `OpenCodeShape`/`OpenCodeRadius`/
`OpenCodeSpacing`; iOS springs via `Motion.*.spec()` (respects reduce motion).
`OpenCodeTheme.colors.*` (`border` follows high contrast), M3 roles via
`MaterialTheme.colorScheme`; text styles under iOS names via `OpenCodeTextStyles.*` (desktop
sizes) or `MaterialTheme.typography`; `OpenCodeShape`/`OpenCodeRadius`/`OpenCodeSpacing`;
floating panels, dialogs and popovers via `OpenCodeSurfaces`; iOS springs via
`Motion.*.spec()` (respects reduce motion).
- Icons: `OpenCodeIcon(SFSymbol.X, contentDescription)` or `OpenCodeIcon("sf.name", …)`. To add
one: a line in `scripts/material-symbols.txt`, run `python3 scripts/fetch-material-symbols.py`,
add the `SFSymbol` entry and the core-ui.md row (the coordinator commits shared files).
- Buttons: `OpenCodePrimaryButton` (Next/Send), `OpenCodeSecondaryButton` (Back/Skip); red only
for destructive roles. Touch targets ≥ 48dp (`Modifier.openCodeTapTarget`, after `clickable`),
for destructive roles. A raw Material `Button` takes `shape = OpenCodeShape.control` (Material
defaults to a capsule); dialogs use `OpenCodeAlertDialog`. Touch targets ≥ 48dp (`Modifier.openCodeTapTarget`, after `clickable`),
`OpenCodeIconButton` for icon controls.
- Unfinished features stay behind Experimental, off by default, as on iOS.

Expand Down
107 changes: 65 additions & 42 deletions app/src/main/kotlin/ai/opencode/app/AppView.kt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/src/main/kotlin/ai/opencode/core/ui/AppTheme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ object ThemePalette {

fun definition(theme: AppTheme): ThemeDefinition = when (theme) {
AppTheme.System -> system
AppTheme.OpenCode -> opencode
AppTheme.OpenCode -> BrandPalette.opencode
AppTheme.TokyoNight -> tokyonight
AppTheme.Catppuccin -> catppuccin
AppTheme.Dracula -> dracula
Expand Down
90 changes: 90 additions & 0 deletions core/src/main/kotlin/ai/opencode/core/ui/BrandPalette.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package ai.opencode.core.ui

/**
* The OpenCode desktop/web palette (`packages/ui` theme `oc-2`, its `--v2-*` tokens), used for
* [AppTheme.OpenCode] instead of the iOS-generated palette. Neutral and monochrome like the
* desktop app: the accent is the desktop's contrast fill (`--v2-background-bg-contrast` /
* `--v2-background-bg-icon-button-contrast`), blue is kept for links.
*
* Desktop token → field:
* canvas `bg-base`, canvasWeak `bg-deep` (sidebar), codeBand `bg-layer-01`, userBubble
* `bg-layer-02`, surfaceStrong `bg-layer-03`, text/strong `text-base`, textWeak `text-muted`,
* textTertiary `text-faint`, border `border-base` (flattened), borderStrong `border-strong`,
* link `text-accent`, syntax `--syntax-*`, diff `--v2-state-*-success/danger`.
*
* Light-mode divergences from the desktop, each darkened just enough for WCAG AA (4.5:1) on the
* fills it sits on (white, `#FAFAFA` code/drawer, `#EEEEEE` inline code): textTertiary `#808080`
* → `#6E6E6E`, link `#3B5CF6` → `#3A5BF6`, syntax keyword `#C83D8B` → `#C83B8A`, syntax string
* `#198B43` → `#188540`, diff-added text `#198B43` → `#17813E`. Dark mode is the desktop's.
*/
internal object BrandPalette {
private fun hex(value: String, alpha: Double = 1.0): ThemeRGBA {
val v = value.removePrefix("#").toLong(16)
return ThemeRGBA(((v shr 16) and 0xFF) / 255.0, ((v shr 8) and 0xFF) / 255.0, (v and 0xFF) / 255.0, alpha)
}

val opencode = ThemeDefinition(
id = AppTheme.OpenCode,
title = "OpenCode",
light = ThemeVariant(
canvas = hex("#FFFFFF"),
canvasWeak = hex("#FAFAFA"),
codeBand = hex("#FAFAFA"),
userBubble = hex("#F2F2F2"),
surfaceStrong = hex("#EEEEEE"),
text = hex("#161616"),
bodyText = hex("#242424"),
textStrong = hex("#0A0A0A"),
textWeak = hex("#5C5C5C"),
textTertiary = hex("#6E6E6E"),
border = hex("#E6E6E6"),
borderStrong = hex("#CCCCCC"),
accent = hex("#242424"),
link = hex("#3A5BF6"),
syntaxKeyword = hex("#C83B8A"),
syntaxString = hex("#188540"),
syntaxNumber = hex("#007B80"),
syntaxComment = hex("#5C5C5C"),
syntaxType = hex("#5230C2"),
diffAddedFill = hex("#E7F9EA"),
diffRemovedFill = hex("#FCECEB"),
glassDiffAddedFill = hex("#198B43", 0.12),
glassDiffRemovedFill = hex("#B82D35", 0.10),
diffAddedText = hex("#17813E"),
diffRemovedText = hex("#B82D35"),
swatchCanvas = hex("#FFFFFF"),
swatchRing = hex("#C7C7C7"),
swatchAccent = hex("#242424"),
),
dark = ThemeVariant(
canvas = hex("#161616"),
canvasWeak = hex("#101010"),
codeBand = hex("#1C1C1C"),
userBubble = hex("#2E2E2E"),
surfaceStrong = hex("#3A3A3A"),
text = hex("#EDEDED"),
bodyText = hex("#DDDDDD"),
textStrong = hex("#FAFAFA"),
textWeak = hex("#AEAEAE"),
textTertiary = hex("#8A8A8A"),
border = hex("#2D2D2D"),
borderStrong = hex("#454545"),
accent = hex("#DBDBDB"),
link = hex("#A2BCFF"),
syntaxKeyword = hex("#F799C6"),
syntaxString = hex("#96E3A6"),
syntaxNumber = hex("#93E9F6"),
syntaxComment = hex("#AEAEAE"),
syntaxType = hex("#9E99F7"),
diffAddedFill = hex("#14361D"),
diffRemovedFill = hex("#461516"),
glassDiffAddedFill = hex("#6BD586", 0.14),
glassDiffRemovedFill = hex("#F17471", 0.14),
diffAddedText = hex("#6BD586"),
diffRemovedText = hex("#F17471"),
swatchCanvas = hex("#161616"),
swatchRing = hex("#454545"),
swatchAccent = hex("#DBDBDB"),
),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ private fun ColorsSection() = Section("Colors") {
"canvas" to c.canvas, "groupedCanvas" to c.groupedCanvas, "groupedCard" to c.groupedCard,
"userBubble" to c.userBubble, "codeBand" to c.codeBand, "inlineCodeFill" to c.inlineCodeFill,
"text" to c.text, "secondaryText" to c.secondaryText, "tertiaryText" to c.tertiaryText,
"border" to c.border, "accent" to c.accent, "link" to c.link,
"sendButton" to c.sendButtonBackground, "destructive" to c.destructive,
"border" to c.border, "accent" to c.accent, "link" to c.link, "signal" to c.signal,
"sendButton" to c.sendButtonBackground, "destructive" to c.destructive, "danger" to c.danger,
"syntaxKeyword" to c.syntaxKeyword, "syntaxString" to c.syntaxString, "syntaxNumber" to c.syntaxNumber,
"syntaxComment" to c.syntaxComment, "syntaxType" to c.syntaxType,
"diffAddedFill" to c.diffAddedFill, "diffRemovedFill" to c.diffRemovedFill,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ object DynamicSystemTheme {
}

/** The app's semantic colours for the System theme, read from the wallpaper's [scheme]. */
fun colors(scheme: ColorScheme, isDark: Boolean, highContrast: Boolean): OpenCodeColors {
fun colors(scheme: ColorScheme, isDark: Boolean, highContrast: Boolean, strongBorders: Boolean = highContrast): OpenCodeColors {
val fixed = ThemePalette.system.variant(isDark)
val onSurface = scheme.onSurface
val bodyResolver: (Double) -> Color = { tone ->
Expand All @@ -81,11 +81,12 @@ object DynamicSystemTheme {
onSurface.copy(alpha = tone.toFloat())
}
}
val border = if (highContrast) scheme.outline else scheme.outlineVariant
val border = if (highContrast || strongBorders) scheme.outline else scheme.outlineVariant
return OpenCodeColors(
theme = AppTheme.System,
isDark = isDark,
highContrast = highContrast,
strongBorders = strongBorders || highContrast,
variant = variant(scheme, fixed),
canvas = scheme.surface,
groupedCanvas = scheme.surfaceContainer,
Expand All @@ -103,6 +104,7 @@ object DynamicSystemTheme {
sendButtonBackground = scheme.primary,
sendButtonForeground = scheme.onPrimary,
link = scheme.primary,
signal = scheme.primary,
syntaxKeyword = fixed.syntaxKeyword.color,
syntaxString = fixed.syntaxString.color,
syntaxNumber = fixed.syntaxNumber.color,
Expand All @@ -113,6 +115,7 @@ object DynamicSystemTheme {
diffAddedText = onSurface,
diffRemovedText = onSurface,
destructive = scheme.error,
danger = scheme.error,
bodyTextResolver = bodyResolver,
)
}
Expand Down
23 changes: 17 additions & 6 deletions core/src/main/kotlin/ai/opencode/core/ui/OpenCodeButtons.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package ai.opencode.core.ui

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.FilledTonalButton
Expand All @@ -11,6 +13,7 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
Expand All @@ -20,12 +23,15 @@ enum class OpenCodeButtonRole { Normal, Destructive }

object OpenCodeButtonDefaults {
/**
* Height every peer button shares (iOS `.controlSize(.large)` ≈ 50 pt). Hierarchy comes
* from style, never size.
* Height every peer button shares: the 48 dp touch target (denser than iOS's 50 pt `.large`,
* still well above the desktop's 32 px). Hierarchy comes from style, never size.
*/
val height: Dp = 52.dp
val height: Dp = 48.dp

val contentPadding = PaddingValues(horizontal = 20.dp, vertical = 12.dp)
val contentPadding = PaddingValues(horizontal = 16.dp, vertical = 10.dp)

/** The desktop's button radius (`--radius-md`-ish 8 at phone size), not a capsule. */
val shape: Shape = RoundedCornerShape(OpenCodeRadius.fill)
}

/**
Expand Down Expand Up @@ -55,6 +61,7 @@ fun OpenCodePrimaryButton(
onClick = onClick,
modifier = modifier.heightIn(min = OpenCodeButtonDefaults.height),
enabled = enabled,
shape = OpenCodeButtonDefaults.shape,
colors = colors,
contentPadding = OpenCodeButtonDefaults.contentPadding,
content = content,
Expand Down Expand Up @@ -84,15 +91,19 @@ fun OpenCodeSecondaryButton(
role: OpenCodeButtonRole = OpenCodeButtonRole.Normal,
content: @Composable RowScope.() -> Unit,
) {
// Desktop neutral button: a light neutral fill with a hairline.
val container = OpenCodeSurfaces.neutralFill
val colors = if (role == OpenCodeButtonRole.Destructive) {
ButtonDefaults.filledTonalButtonColors(contentColor = OpenCodeTheme.colors.destructive)
ButtonDefaults.filledTonalButtonColors(containerColor = container, contentColor = OpenCodeTheme.colors.destructive)
} else {
ButtonDefaults.filledTonalButtonColors()
ButtonDefaults.filledTonalButtonColors(containerColor = container, contentColor = OpenCodeTheme.colors.text)
}
FilledTonalButton(
onClick = onClick,
modifier = modifier.heightIn(min = OpenCodeButtonDefaults.height),
enabled = enabled,
shape = OpenCodeButtonDefaults.shape,
border = BorderStroke(1.dp, OpenCodeTheme.colors.border),
colors = colors,
contentPadding = OpenCodeButtonDefaults.contentPadding,
content = content,
Expand Down
Loading
Loading