Skip to content

fix(plugins): ui.radio is flat when not selected, with official's new dot (UP-214) - #1175

Merged
Hona merged 2 commits into
devfrom
up-214/plugin-radio
Nov 25, 2026
Merged

Hona merged 2 commits into
devfrom
up-214/plugin-radio

Conversation

@Hona

@Hona Hona commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

The plugin runtime's ui.radio follows official's new radio look (anomalyco/opencode#66108, ledger row UP-214): a control that is not selected is flat, and the selected dot has official's gradient, ring and drop. The WSL dialog is the one place that draws it.

Why

Official redrew the radio as Figma has it (packages/ui/src/forms/radio/radio.css at a44675ecee). The app draws radios in two places:

  • The provider connect dialog's choice step uses rune-kit's RadioItem. That is fixed in Rune (feat(kit): the radio control is flat when not selected, and takes a surface rune#2198) and reaches the app with the next Rune pin.
  • The WSL dialog uses ui.radio, which the plugin runtime draws itself (radio_widget in crates/opencode-plugin-runtime/src/ui_nodes.rs). It still had the old 6% top light and the old dot. This PR fixes it and needs no pin.

What changes

Part Before After Official
A control that is not selected bg-base with a 6% top light Flat bg-base radio.css:92
A selected control The accent with a 20% top light Unchanged radio.css:125
The selected dot Flat grey, a ring in the depth highlight, its own 0.5 px drop The depth gradient over the grey, a ring in the contrast icon colour, the small elements' drop (the same drop, now from the token) radio.css:140-160

Not ported: official's new surface="layer-1". Its WSL dialog passes no surface, so ui.radio gets no new prop and the plugin contract is unchanged.

What a user sees

In the WSL dialog, in dark, a distro's radio that is not selected loses its faint top light, and the selected one's dot is a little brighter at the top with a lighter ring. In light only the dot changes: the top light was white on a white base.

Run

  • Pictures, headless, Windows x64: this PR's build beside a dev build (published dev 489). A scratch plugin, not in the repo, opens a dialog that draws ui.radio in each state it has: not selected, selected, not selected with a danger-tone description, disabled, disabled and selected, and line height 16. Dark and light, at 2x, compared pixel by pixel.
Theme Pixels that differ Where
Dark 3,520 of 2560 x 1600 (largest channel difference 22 of 255) only the column of the six controls
Light 270 (largest 22) only the two selected dots

Dark, with a control that is not selected, a selected one and a disabled selected one at 6x:

ui.radio in dark, before and after

Light:

ui.radio in light, before and after

  • The same on the next Rune pin: the same scratch dialog on this change rebased onto the pin bump (fix(deps): pin rune to d5c7a5ad, the effect warm for backdrop blur only (214 commits, rune#1962-#2246) #1192), beside this PR's picture above. Inside the six controls, and 4 pt around each, 0 pixels differ in dark and in light. So the look does not depend on the pin. (Elsewhere 192 pixels differ in dark and 188 in light, all in the Settings gear on Home behind the dialog, which the bump redraws.)
  • scripts/guardrails.ps1: 9 of 9 pass on this head.
  • Compiled by this PR's build jobs: macOS, Windows x64 and arm64, Linux x64. Linux arm64 is not built in a PR run.

Not run

  • The WSL dialog itself was not opened: opening it lists the machine's WSL distros. The pictures are of the same node (ui.radio) in a scratch dialog.
  • ui.radio has no invalid state, so there is none to picture.
  • The connect dialog's radio is not in this PR: it is rune-kit's and changes with the Rune pin that brings feat(kit): the radio control is flat when not selected, and takes a surface rune#2198. Until then the two dialogs' radios differ by that pin.

@Hona
Hona marked this pull request as draft November 25, 2026 08:19
@Hona
Hona force-pushed the up-214/plugin-radio branch 2 times, most recently from cc7c7d0 to bde1931 Compare November 25, 2026 11:00
… dot

The plugin runtime draws its own radio (the WSL dialog). Official redrew the radio (anomalyco/opencode#66108): no top light on a control that is not selected; the selected dot has the depth gradient, a ring in the contrast icon colour and the small elements' drop.
@Hona
Hona force-pushed the up-214/plugin-radio branch from bde1931 to 568a577 Compare November 25, 2026 11:51
@Hona
Hona marked this pull request as ready for review November 25, 2026 12:29
@Hona
Hona merged commit 7ff893d into dev Nov 25, 2026
2 checks passed
@Hona
Hona deleted the up-214/plugin-radio branch November 25, 2026 12:29
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