Skip to content

fix(settings): compact access pickers for workers and bots - #741

Merged
nixuuu merged 2 commits into
devfrom
fix/settings-compact-access-picker
Nov 14, 2026
Merged

nixuuu merged 2 commits into
devfrom
fix/settings-compact-access-picker

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

What

Settings access pickers listed every worker and bot as a large checkbox with a description, about 90 px per row, so long lists were hard to read. Connector accounts, provider instance workers and environment "specific computers" now share one compact picker:

  • One row per group: label (and description) on the left, a summary on the right: All workers, No bots, Canopy Bot, Main Bot (up to 2 names), or 3 of 12 workers.
  • Popover checklist (bottom sheet on phones): an All … switch with "Includes … added later.", a search field when there are more than 8 items, 32 px rows (40 px on touch) with a computer/bot icon, name, connection state or Read-only, group headings for linked computers, and a footer N of M chosen with Choose all / Clear all.
  • No layout shift: with "All" on, the list stays in place, checked and dimmed (opacity on --duration-fast, ease-smooth-out, none with reduced motion). The footer keeps its place.
  • Saving: connector access had an explicit "Save access" button while provider workers and mobile saved on change. Access now saves when the picker closes with a change, like the other switches in Settings. The trigger shows Saving… meanwhile; errors keep the existing alert. Turning "All" off starts from everyone, so nobody loses access until unchecked.
  • Why a popover: an inline list grows the account row with every worker and nests a scroll area inside a list of accounts. With 2 items the popover is a short, one-tap checklist. With 50 items it gets search and a bounded scroll, and the card stays two rows high either way.

Shared logic (summary, toggles, search, threshold) lives in @canopy/domain/access-picker and is used by web and mobile.

Mobile: PickerSheet gets a checklist mode (selected, header). Connector access, provider workers and environment assignment use the new SettingAccess row with the same model. JS only: no new modules or native config, so the fingerprint is unchanged (OTA-able).

Related: 271a062 (connector access picker), #512

Copy audit (docs/copy.md §8)

Before After Reason
All workers checkbox + Including those added later. All workers switch + Includes workers added later. present tense, names the noun
Only these workers get the instance; elsewhere it is absent. The instance runs only on the chosen workers. one idea, no semicolon
Or choose specific computers (3) Specific computers — Chosen computers get it even without matching tags. setting = noun title + one sentence
Save access button removed (saves on close, trigger shows Saving…) matches other Settings switches; ellipsis for an ongoing action
All includes future workers and bots belonging to you. (mobile) Only these workers and bots can use this account. same text as web
— 3 of 12 workers, No bots, N of M chosen, Choose all, Clear all, Read-only, Connected / Disconnected, No workers match “x”., Search workers digits, sentence case, glossary words (worker, computer, bot), verbs first on buttons

Glossary: only worker, bot, computer, instance. No new terms. State uses text as well as colour (dot + Connected).

Checks

bun install, bun run typecheck (web, mobile, domain), bun run lint, bun run format:check, the web build, and expo export for iOS and Android: clean.

Browser review

Real Chromium against a private stack (Postgres, gateway, web), seeded through SQL with 2 and then 50 workers and bots, plus long names. Light and dark, at 1280 px and 390 px (touch):

  • 2 items: two 32 px rows on the card; the popover lists 3 bots without search; All workers dims the list in place.
  • 50 items: search appears; the scroll is bounded at 28rem (sheet at 70 dvh on phones); long names end in an ellipsis; the popover flips above when there is no room below.
  • Saving: ticking Main Bot and pressing Escape showed Saving…, then Canopy Bot, Main Bot. The header changed to All workers · 2 bots, and the DB has both grants with the revision bumped. Turning All workers off, searching worker-1, then Clear all saved 40 of 50 workers (DB: 40 grants). While searching, Choose all / Clear all act on the matching rows only.

Mobile was not run on a device. It is checked with typecheck and expo export (iOS + Android).

Connector access, provider instance workers and environment computers share one compact picker: a summary row that opens a searchable checklist with an "All" switch. Access saves when the picker closes. Mobile uses the same model in a checklist sheet.
@nixuuu
nixuuu merged commit b5b8033 into dev Nov 14, 2026
12 checks passed
@nixuuu
nixuuu deleted the fix/settings-compact-access-picker branch November 14, 2026 17:43
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