Skip to content

feat(web): define a type scale and compact overlays - #174

Merged
nixuuu merged 1 commit into
devfrom
feat/ui-scale
Nov 5, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/ui-scale

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 5, 2026

Copy link
Copy Markdown
Member

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 fix(web): use smaller text in the composer context row #171 and fix(updates): fold the bundled gateway and worker into the desktop app #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.

Popovers, menus and pickers used the page's control sizes, so they read
large next to the compact sidebar (e.g. the project filter's search field,
rows and Clear filters button).

- docs/ui-scale.md defines five contexts (content, standard controls,
  compact chrome, overlays, tooltips) with text, row, icon and control
  sizes for phone and desktop, including button sizes per context.
- shared/ui/scale.css holds the type, icon and control tokens and the
  density-standard / density-chrome / density-overlay scopes. The sidebar
  and Settings now use them instead of their own font sizes.
- Popover (and so DropdownMenu, Select, SearchPicker, HoverCard) and the
  command palette are overlays: Button, ButtonLink and IconButton default
  to sm there, icons are 14px, and Checkbox, Switch, SearchField and Input
  take their compact size. Dialogs return to standard controls.
- Menu, listbox and picker rows are 28px on desktop and 40px or more on
  phones. Typed fields stay 16px on phones.
- Overlay rows stay one line: long project, worker, branch and model
  names end in an ellipsis with the full name as a tooltip (TruncatedText).
- The composer's worker chip no longer splits its name and computer
  apart with a wide gap.
- The composer context row and the update rows read the shared tokens
  instead of hand-set sizes.
@nixuuu
nixuuu merged commit 1b4114d into dev Nov 5, 2026
9 checks passed
@nixuuu
nixuuu deleted the feat/ui-scale branch November 5, 2026 12:45
nixuuu added a commit that referenced this pull request Nov 5, 2026
…231)

Stage 5 of 5, mobile UX: catch up with recent web features in the thread
view.

**Done**
- Full access with confirmation.
- The work group is open while the agent works and collapsed after the
turn (the default fold behaviour from #195).
- Tighter work rows in the `work` scale; commands in monospace.
- The shell command card and `!` mode in the composer (#194).
- "Starting" for a dispatched queued turn (#197).
- File badges in the message bubble.
- Finished subagents collapse into one count that opens the lineage
panel (#182).
- The type scale for overlays, chrome, work rows and the context row
(#174/#193).
- Rejected messages show their reason, instead of a generic retry note.

**Deferred**
- The work fold settings (per device on the web).
- Badges placed inline in the text and queue editing (#200/#201); files
stay as chips.
- Linked computers in pickers (needs `LinkedComputerSnapshot` merging).
- Worktree and ref in a new thread.
- Approval countdown and expiry cards.
- Connector errors.
- Mentions, side threads and goal editing.

**Checked** on the Android emulator, light and dark. `check:tmp`: 1425
passed, 0 failed. `expo lint` and `tsc` are clean.

**Copy audit (§8):**
- "Runs as a shell command when delivered."
- "Starting"
- "N finished subagents"
- "Set and manage goals in Canopy on the web."
nixuuu added a commit that referenced this pull request Nov 28, 2026
The background task menu above the composer clipped commands to a single
line. Moving the pointer between tasks opened a second overlay over the
conversation, making the commands hard to compare.

Task descriptions and commands now wrap to three lines inside the menu.
Choosing a task opens its full command and output. In the thread details
panel, hovering the status icon explains the task state.

## Copy audit

The task row tooltip repeated the task name and status. The icon tooltip
now shows just the status, and the button retains its accessible name
and action. Shared text labels suppress a matching hint when the label
fits and reveal the full text when clipped.

## Verification

- Checked the changed components in Chromium with sample tasks, using
the mouse, keyboard and touch emulation at 320 px. Verified task
selection opens the corresponding output, and checked short, wrapped and
clipped labels.
- Web typecheck passed with zero errors and warnings. The full
repository checks run in CI.

Fixes: #174
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