Skip to content

fix(plugins): a busy plugin button keeps its look and its words - #1220

Merged
Hona merged 1 commit into
devfrom
upstream-f/plugin-button-busy
Nov 25, 2026
Merged

Hona merged 1 commit into
devfrom
upstream-f/plugin-button-busy

Conversation

@Hona

@Hona Hona commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

A plugin's busy button keeps its look and its words, as official's does.

The fault

A plugin button with loading drew two ways. A small one kept its look and words with a loader before them, but stayed at full strength. A normal or large one turned into the loading look and held the loader alone: its words went away.

Official has one form at every size (packages/app/src/runtime/plugin/ui.tsx:25-41): the button keeps its look and its words, is disabled, drops its icon and shows a 14 loader before the words. The buttons the SSH plugin draws itself do the same (packages/gui-plugins/src/ssh/cover.tsx:46-59, row.tsx:59-71). A disabled button is at half strength, a contrast one at 0.4 (packages/ui/src/actions/button/button.css).

Where a person sees it: the Add beside the link field in the browser's Add extension dialog, the browser's import and clear buttons, the WSL dialog's Add, and the SSH cover's Reconnect, which read "Connecting" in official while it works.

What changes

crates/opencode-plugin-runtime/src/ui_nodes.rs, button: one form for every size. The look stays, the button is disabled, the icon is left out, and a 14 loader stands before the words at the button's own 6 gap (button.css:13). The small button's gap was 4.

Run

Pictures, headless at 2x in both themes, of one scratch plugin that opens a dialog of buttons at rest and busy, in five looks and three sizes: on this PR's Windows x64 CI build and on a build without the change. The build without it is another PR's build of dev as it stood two merges before this PR's base (neither merge touches a button). The dialog was pictured twice, at the normal and at the large size, since a row of busy buttons is wider after the change than the normal dialog.

  1. Every busy button, in each look and size, shows its words in its own look at reduced strength, with a 14 loader before them and its icon left out, and takes no focus. Before: a small one kept its words at full strength; a normal or large one was the loading look with a 16 loader alone (38 and 46 wide where they are 96 and 104 now); the one with an icon showed the icon and the loader, no words.
  2. Every button at rest is the same, pixel for pixel: 0 pixels differ in all 16, in both themes.
  3. The disabled button that is not busy has the same fill and the same ink before and after. Its pixels differ only inside its words' box: it sits 36 further right, pushed by the busy button before it, on another fraction of a pixel.

A busy button's own pixels are not compared between the builds, since its loader turns: what was compared there is its size, its words, its strength and what the tree says of it.

Not run: the dialogs that hold such buttons themselves (the Add extension dialog, the browser's import and clear rows, the WSL dialog, the SSH cover); a real window; macOS and Linux (compiled only).

@Hona
Hona marked this pull request as ready for review November 25, 2026 15:00
@Hona
Hona merged commit 4aa3548 into dev Nov 25, 2026
7 checks passed
@Hona
Hona deleted the upstream-f/plugin-button-busy branch November 25, 2026 15:00
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