Skip to content

Admin → Apps: Open apps switch, give an app to every Bot, and a card that says a Bot's owner can give an app - #2163

Merged
davidmckayv merged 4 commits into
mainfrom
feat/every-bot-switch
Nov 25, 2026
Merged

davidmckayv merged 4 commits into
mainfrom
feat/every-bot-switch

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What

Admin → Apps → an app's page (team edition) gets an Every Bot row, right under "Bot owners can give it to their Bots". One switch gives the app to every Bot in the organization, Bots made later too. Turning it off takes back what the switch gave. Nothing a Bot was given any other way changes.

  • The row: titled "Every Bot". When on, it reads "Every Bot in this organization can use it, Bots made later too." When off, it reads "Only the Bots it's given to can use it." The switch is labelled "Give {app} to every Bot".
  • The write: setEveryBotMutationOptions in app/src/lib/apps/mutations.ts calls updateApp with { everyBot } (API from PR 2160) and an Idempotency-Key. The app screens refetch when it settles.
  • It uses the same components and look as the owner row. The personal edition doesn't show it.

A Bot's app card. Apps are now open to Bot owners by default (PR 2160). So for a Bot that hasn't been given an app, a member looking at somebody else's Bot now reads "This Bot hasn't been given Gmail. Its owner can give it, or an admin." It says "Only an admin can give it." only where an admin kept the app to admins.

Open apps, under Admin → Apps → Giving apps. This is the organization's one switch: Open, the default, or Locked down. It reads and writes the switch's own resource, getAppsSetting and updateAppsSetting (PR 2160), through appsSettingQueryOptions and setAppsLockedDownMutationOptions. Turning it on saves at once. Turning it off opens a dialog that says what changes. The dialog has a box, off by default, labeled "Also take back what OpenBot gave Bots while apps were open". The switch uses the existing settings section, row, Switch, Dialog and Checkbox components.

Why

An admin who wanted an app on every Bot had to give it one Bot at a time, and new Bots didn't get it.

Test

  • app/tests/open-apps-switch.test.tsx:
    • The switch reads Open by default.
    • Turning it off opens the dialog with the box unticked. Cancel sends nothing.
    • Confirming sends { lockedDown: true, takeBackWhatOpenGave: false }, or true with the box ticked.
    • Turning it back on sends { lockedDown: false }, with no dialog.
    • The fake server answers the switch at /settings/apps only, and refuses it on the organization's settings.
  • app/tests/every-bot-app-switch.test.tsx renders the real app page against a fake server that keeps what updateApp sends. The switch starts off. Pressing it sends { everyBot: true } and the switch reads on. Pressing it again sends { everyBot: false } and it reads off. The personal edition has no switch. The test fails without the row and passes with it.
  • End to end on a local team-edition deployment, in headless Chromium and headless WebKit. The admin turns Every Bot on for Gmail, and a member's Bot lists Gmail. She turns it off, and that Bot loses it. A Bot whose owner gave it Gmail themselves keeps it. The admin locks apps down through the dialog: a Bot made then gets nothing by itself, and one press gives only Gmail's read action. She opens them again, and a new Bot gets all four actions. Each screenshot was checked against the rest of the page: same rows, spacing and switch.

@davidmckayv
davidmckayv force-pushed the feat/every-bot-switch branch from 3dcb626 to 6bd84f0 Compare November 24, 2026 22:38
@davidmckayv davidmckayv changed the title Admin → Apps: give an app to every Bot Admin → Apps: give an app to every Bot, and a card that says a Bot's owner can give an app Nov 24, 2026
@davidmckayv
davidmckayv force-pushed the feat/every-bot-switch branch from 6bd84f0 to 84cc4df Compare November 24, 2026 23:07
@davidmckayv davidmckayv changed the title Admin → Apps: give an app to every Bot, and a card that says a Bot's owner can give an app Admin → Apps: Open apps switch, give an app to every Bot, and a card that says a Bot's owner can give an app Nov 24, 2026
@davidmckayv
davidmckayv force-pushed the feat/every-bot-switch branch 8 times, most recently from c16eef7 to fac3cfe Compare November 25, 2026 02:34
An app's page in Admin (team edition) gets an Every Bot row under the Bot owners row. Turning it on sends updateApp with everyBot: true, which gives the app to every Bot in the organization, Bots made later too; turning it off takes back what the switch gave. The row reads everyBot from the app the server answers. The fake apps server now keeps what updateApp sends, and a new test drives the switch on and off and checks the personal edition has no such row.
… it to admins

Apps are open to Bot owners by default, so 'Only an admin can give it' was wrong for a member looking at somebody else's Bot.
Open apps is on by default. Turning it off asks first, and can also take back what OpenBot gave Bots by itself while apps were open; what anybody gave by hand stays. Turning it on opens apps at once.
@davidmckayv
davidmckayv force-pushed the feat/every-bot-switch branch from fac3cfe to 6470028 Compare November 25, 2026 03:14
@davidmckayv
davidmckayv merged commit a4ddde2 into main Nov 25, 2026
22 checks passed
@davidmckayv
davidmckayv deleted the feat/every-bot-switch branch November 25, 2026 03:49
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