Skip to content

Models per team: a team's Models row and dialog, and Providers naming the teams with their own list - #2086

Merged
davidmckayv merged 1 commit into
mainfrom
team-models-screens
Nov 24, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
team-models-screens

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

The screens for per-team model limits: an admin sets, per team, which models its people may run, within the organization's allowlist.

A team's page. A Models row in About, beside Parent team: "Everything the organization allows", the one model's name, or "3 models". An owner or an admin opens a dialog listing what the organization allows: every model the provider offers (getModelCatalogue view=all, which no allowlist or team narrows), kept to the organization's allowlist when Only allowed models is on with models. Both are spelled provider/model. They tick the team's models and Save, or press "Use everything the organization allows" (an outlined button, as Cancel is) to clear the list. A model on the team's list that the organization no longer allows shows greyed with why, and comes off on save. Anybody else reads the row, with nothing to press. Who may edit is the server's canMove verdict on the team, which is true for an owner or an admin of the organization.

Admin, Providers. Under Allowed models, a "Teams with their own list" row names each team that has one, each linking to its team in Admin. It isn't shown while no team has a list.

Activity. Every team event names its team under what was done, by the name it had then. A change to a team's models says its models before and after by their names, under its decision, as a guidance change's words are (Activity rows don't open for any event). The views wrap inside their outline on a phone; the last two ran off the edge.

A run refused for its model (model.refused) reads as Blocked, with a line naming the model and whose list left it out (the person's teams' or the organization's, from the row's rule), and the Blocked view now asks for it; it was drawn as Allowed. On a phone (the app's own breakpoint), each row draws its Bot and decision under What, so Decision with its Before and Now is on screen.

Usage says "3 refused" and "set in OpenBot", not "off the allowlist" and "chosen by OpenBot".

Conversation. A refused run is the app's notice (an outlined Item with its icon and any action beside it), not plain red text. A later turn refused by the server keeps its message sent and empties the box, as a refused first message does; a turn that failed any other way before it did anything still hands its words back. The rail of turns draws only once the turns run past the view; beside two turns in view it was a stray mark. The model picker keeps the page's 16px gutter from the window's edge, and a name and its Default tag wrap as a pair, so "GPT-6.1 Terra" keeps one line on a phone.

Refused turns stay. Each refused turn keeps its own notice under its own message (a second refusal no longer replaces the first), outlined in dark as in light. After a reload they come back from listRefusedTurns: the person's message, what a routine asked ("Routine didn't run."), or a task's brief, each placed after afterMessageId with the same notice under it, never drawn twice beside a live one.

Activity on a phone scrolls its rows with the page, every row whole; wider, the log keeps its own scroll. Deleting a team goes to the list without its page ever reading the deleted team again, so "Couldn't find that team." no longer flashes.

Models by name. Providers' Allowed models row, Usage, In conversations' default, and both models dialogs name each model as the provider lists it ("GPT-4.1 Mini"), from the same listing the team's page uses (lib/models/names.ts). A model no listing names, such as a remote Bot's own, keeps its id. The id stays only where a person types one (Another model).

The default. With Only allowed models on and the deployment's default left out, the catalogue now makes the newest allowed model the default and refuses a Bot set to the old one. In conversations names that model, and the Allowed models dialog no longer says the default stays offered.

The picker. Saving or clearing a team's list invalidates the model catalogue, so an admin who is in the team sees the composer's picker follow at once. Other people's browsers keep the catalogue's existing five-minute stale time, as with the organization's allowlist, and each send already checks the pick with the server.

A refused run. MODEL_NOT_ALLOWED already reaches the chat as the server's own sentence (stopped-turn.ts, covered by stopped-turn.test.ts). Nothing changed there.

The API. Built on the spec PR, #2084 (aab86399, which includes main and adds listRefusedTurns), whose commits are the first on this branch; the client is generated from its spec, unchanged. Once #2084 merges, this branch rebases onto main.

Tests

  • app/tests/team-models.test.tsx: the screens on the spec's own MSW handlers. An admin sets one model, then two, then clears; the writes carry an Idempotency-Key; the dialog offers only listed models the allowlist names, and every listed model while it narrows nothing; the catalogue goes stale on save; the greyed model comes off; a non-admin reads only; a 403's sentence shows; Providers names and links the teams.
  • app/tests/team-models-screens-layout.test.tsx (real browser, added to CI's real-browser job): the same flow driven in Chromium and WebKit, light and dark, wide and at a phone's width, held to no sideways scroll, no cut-off control, no overlapping row and a dialog that fits.
  • teams.test.tsx, teams-screens-layout.test.tsx and settings-tool-cards-admin-layout.test.tsx answer the new read. The two browser fixtures that draw a team's page bundle the brand marks (marks-plugin.ts), since the dialog draws each model's maker.

Merge after the spec and the back end.

A team's page has a Models row: everything the organization allows, a model's name, or how many. An owner or an admin chooses the team's models from what the organization allows, by name, or lets the team use everything again; a model the organization no longer allows shows greyed, saying why. Anybody else reads it. Providers names the teams with their own list, each linking to its team, and names every model by its name, as do Usage and both models dialogs.

Activity: a run refused for its model reads as Blocked and is in the Blocked view, saying whose list left it out by the teams' names; a change to a team's models names the team and its models before and after; every team event names its team. On a phone each row draws its Bot and decision under What, and the rows scroll with the page at every width.

Conversations: a refused turn is the app's notice under its own message, outlined in light and dark, and stays after a reload (listRefusedTurns); a refused later turn keeps its message sent, as a refused first message does; the rail of turns draws only once the turns run past the view.

Model picker: keeps the page's gutter, lines up with its button, and wraps a name and its Default tag as a pair. Deleting a team goes to the list without saying the team can't be found.
@davidmckayv
davidmckayv merged commit 6f67025 into main Nov 24, 2026
35 checks passed
@davidmckayv
davidmckayv deleted the team-models-screens branch November 24, 2026 04:42
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