Skip to content

fix(updates): fold the bundled gateway and worker into the desktop app - #172

Merged
nixuuu merged 1 commit into
devfrom
fix/updates-hide-bundled
Nov 5, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/updates-hide-bundled

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 5, 2026

Copy link
Copy Markdown
Member

In desktop local mode, the updates popover listed the app's bundled gateway and worker as separate items. Both update with the app, and both showed wrong states.

Bundled worker showed "Unavailable"

  • Cause: updatesSnapshot gave every installKind=desktop worker without a desktop control session a placeholder "Pair this desktop app…" state. Local mode never opens that session.
  • Fix: the local worker now announces a desktop_bundled capability, stored in workers.capabilities.

Gateway showed "stable" on a nightly app

  • Cause: the bundled gateway fell back to the default channel.
  • Fix: it now reports its build's channel. A channel action is refused with a pointer to Settings → App updates.

Fix

  • With the desktop role, the snapshot marks the bundled parts with gateway_bundled (15) and WorkerUpdate.bundled (10), both additive.
  • The popover and Settings → Workers → Updates leave them out of the list, the counts, the header and Update all.
  • "This Canopy app" explains it: "Includes this computer's gateway and worker."
  • The agent CLIs on this computer still show.
  • Server mode, remote mode and external workers are unchanged.

Row layout (UpdateItem)

  • The action column has a fixed width, so badges line up and an action that appears doesn't move them.
  • The icon, badge and action align to the name line.
  • Long names truncate before the badge.
  • updateTone gives the same state the same tone everywhere: "Up to date" is always green.

Tests: the new updates-bundled.test.ts checks the desktop role and the server role. The update-center, updates, cache, persistence and desktop-updates suites pass.

Copy audit (docs/copy.md §8):

  • The false "Unavailable" state and the wrong "stable" label are removed.
  • New sentences say what happens, then what to do (link to App updates).

In local mode the desktop app's own gateway and worker ship with the app,
but the updates popover and Settings → Workers → Updates listed them as
separate items: the gateway with a default "stable" channel and the worker
as "Unavailable".

- The local-mode worker reports the desktop_bundled capability; the gateway
  stores it with the worker. With the desktop role the snapshot marks the
  gateway (gateway_bundled) and that worker (bundled) as part of the app.
- The UI leaves both out of the list, the counts and Update all. "This
  Canopy app" stands for them; its agent CLIs keep their rows.
- A bundled gateway reports its build's channel and has no channel of its
  own. The bundled worker gets no "Pair this desktop app" placeholder.
- Server role and remote mode are unchanged.
- Update rows keep a fixed action column and align icon, badge and action
  to the name line. "Up to date" uses one tone everywhere.
@nixuuu
nixuuu merged commit 2cd451a into dev Nov 5, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/updates-hide-bundled branch November 5, 2026 12:15
nixuuu added a commit that referenced this pull request Nov 5, 2026
Text and controls were too large in popovers, menus and pickers, and
each screen set its own sizes. This adds one documented scale, applied
through the UI kit.

**The scale** (`docs/ui-scale.md`, linked from AGENTS.md "UI rules")
- Each context has text, row, icon and control sizes for desktop and
phone:
  - content;
  - standard controls (forms, dialogs);
  - settings;
  - compact chrome (sidebar, toolbars);
  - the composer context row;
  - overlays (popovers, menus, pickers, command palette);
  - tooltips.
- Overlays are compact:
  - desktop rows 28 px, 40–44 px on touch;
- buttons `sm` (28 px), checkboxes, switches and search fields one step
smaller;
- user-provided names stay on one line and truncate, with the full name
in a tooltip.
- Typed fields stay 16 px on phones.

**The kit**
- `shared/ui/scale.css` holds the tokens. The standard, chrome and
overlay scopes redefine the text steps for their subtree.
- Popover marks its panel as an overlay; its trigger keeps the parent's
size. DropdownMenu, Select, SearchPicker and HoverCard use Popover, so
they follow. The command palette sets the overlay scope itself, and
Dialog switches back to standard.
- Inside an overlay, Button, ButtonLink and IconButton default to `sm`
unless a size is passed. Checkbox, Switch, SearchField and Input use
their compact sizes.
- New `TruncatedText` component. `clipped` moved into the kit.
- Sidebar density and settings density are folded into the shared tokens
with the same sizes. So are the hand-set sizes from #171 and #172.

**Screens adjusted by hand**
- The project filter: kit search field, one-line rows, a 28 px "Clear
filters" button.
- The model picker and the command palette.
- The worker chip under the composer: "laptop · This computer", with one
separator and no odd gap.

**Unchanged on purpose:** dialogs with forms (connect, add project) keep
the standard size.

Checked before and after for the project filter, model, worker and
thread menus, the command palette, the updates popover, a settings
select, a connect dialog, and the sidebar with the composer. Desktop and
phone, light and dark, long names.
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