Skip to content

fix(site/src/pages/AISettingsPage/ModelsPage): duplicate Add model dropdown in empty state#26685

Merged
tracyjohnsonux merged 1 commit into
mainfrom
tracy/models-empty-add-cta
Jun 25, 2026
Merged

fix(site/src/pages/AISettingsPage/ModelsPage): duplicate Add model dropdown in empty state#26685
tracyjohnsonux merged 1 commit into
mainfrom
tracy/models-empty-add-cta

Conversation

@tracyjohnsonux

Copy link
Copy Markdown
Contributor

Mirrors the providers page on /ai/settings/providers: when the models table is empty on /ai/settings/models, the empty state now renders an Add model dropdown alongside the description so users have an obvious next step.

Changes

  • AddModelDropdown accepts an optional align prop (defaults to "end"), so the existing header instance is unchanged.
  • The empty state passes a second instance via TableEmpty's cta prop with align="start", matching how ProvidersPageView duplicates AddProviderDropdown.
  • Updated the Empty Storybook story to assert two Add model buttons render (header + empty state).

Verification

  • pnpm --dir site exec biome check src/pages/AISettingsPage/ModelsPage/
  • pnpm --dir site exec tsc -p . --noEmit
  • pnpm --dir site exec vitest run --project=storybook src/pages/AISettingsPage/ModelsPage/ (20/20 stories pass, including the updated Empty play)
Reference: providers page pattern

ProvidersPageView.tsx already does this with AddProviderDropdown:

<TableEmpty
  message="No providers configured"
  cta={<AddProviderDropdown align="start" />}
/>

This PR brings the models page in line with that pattern.


Note

Opened by Coder Agents on behalf of @tracyjohnsonux.

…opdown in empty state

Mirror the providers page: when the models table is empty, render an
Add model dropdown inside the empty state alongside the description so users
have a clear path to add their first model.
@tracyjohnsonux tracyjohnsonux merged commit 99c0362 into main Jun 25, 2026
53 of 54 checks passed
@tracyjohnsonux tracyjohnsonux deleted the tracy/models-empty-add-cta branch June 25, 2026 00:58
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants