Skip to content

feat(site): add AI settings providers pages and routes#25583

Merged
jakehwll merged 1 commit into
mainfrom
jakehwll/DEVEX-355/04-pages
May 26, 2026
Merged

feat(site): add AI settings providers pages and routes#25583
jakehwll merged 1 commit into
mainfrom
jakehwll/DEVEX-355/04-pages

Conversation

@jakehwll

@jakehwll jakehwll commented May 21, 2026

Copy link
Copy Markdown
Contributor

🤖 This PR was written by Coder Agents on behalf of Jake Howell.

Linear: DEVEX-355

Fourth PR in a 5-PR stack splitting #25328. Wires the new /ai/settings provider management UI.

  • AISettingsLayout hosts the section under /ai/settings with a sidebar outlet.
  • AISettingsSidebar(View) shows a single "Providers" nav entry. The remaining sidebar entries arrive with the broader AI settings section reshuffle in the next PR.
  • ProvidersPage lists configured AI providers via the queries added in PR 2.
  • AddProviderPage walks through provider-type selection and form submission, with type-specific credential fields.
  • UpdateProviderPage edits an existing provider with the same form components.
  • Storybook stories cover each view's loading, empty, populated, error, and form states using the mock providers from testHelpers/entities.ts.
  • router.tsx mounts the new /ai/settings layout with index, add, and :providerId child routes. The governance child route lands together with the dashboard navigation changes in the next PR.

Removes the now-unused knip ignore entries for src/api/queries/aiProviders.ts and src/pages/AISettingsPage/ProvidersPage/components/addableProviderTypes.ts, and drops the matching @lintignore tags on getProviderIcon and MockAIProviders since the pages and page stories now consume them.

Stack
  1. feat(site): add UI primitives for the AI settings stack #25579 jakehwll/DEVEX-355/01-primitives, primitives
  2. feat(site): add AI provider API client and query layer #25580 jakehwll/DEVEX-355/02-api, API client and query layer
  3. feat(site): add AI settings provider form components #25581 jakehwll/DEVEX-355/03-components, provider form components
  4. jakehwll/DEVEX-355/04-pages, pages and routes (this PR)
  5. jakehwll/DEVEX-355/05-section, section reshuffle

Replaces #25328 once the stack lands.

jakehwll commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14a62f7e84

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<ProvidersPageView
isLoading={providersQuery.isLoading}
isFetching={providersQuery.isFetching}
providers={providersQuery.data ?? []}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle provider list query errors explicitly

When useQuery(aiProvidersList()) fails, providersQuery.data is undefined while isLoading and isFetching are both false, so coercing to [] causes ProvidersPageView to render the normal empty-state message (No providers configured) for 403/500 failures. This masks real backend/auth errors as a successful empty result and can mislead admins into taking incorrect actions; pass error state to the view and render an explicit failure state instead of defaulting failed fetches to an empty array.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the amended commit. ProvidersPage now threads providersQuery.error through to ProvidersPageView, which renders an ErrorAlert above the table when the list fetch fails. Added a LoadError story to exercise that state.

Reply from Coder Agents on behalf of Jake Howell.

@jakehwll jakehwll changed the title feat(site/src/pages/AISettingsPage): add AI settings providers pages and routes feat(site): add AI settings providers pages and routes May 21, 2026
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/04-pages branch from 14a62f7 to 3aac253 Compare May 21, 2026 16:52
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/03-components branch from c34e51a to 1152845 Compare May 21, 2026 16:52
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/04-pages branch from 3aac253 to c24e4da Compare May 22, 2026 08:15
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/03-components branch from 1152845 to a28647d Compare May 22, 2026 08:15
</Button>
</div>
<div className="flex flex-col gap-6 pt-6">
<div className="flex items-center gap-4 min-w-0">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a bunch of min-w-0s were removed in #25579, so just double checking these are necessary too

@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/03-components branch 2 times, most recently from f91be01 to 9e89ae2 Compare May 26, 2026 16:17
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/04-pages branch from c24e4da to 2a02336 Compare May 26, 2026 16:20
Base automatically changed from jakehwll/DEVEX-355/03-components to main May 26, 2026 16:27
…s and routes

Wires the new /ai/settings provider management UI:

- AISettingsLayout hosts the section under /ai/settings with a sidebar
  outlet.
- AISettingsSidebar(View) shows a single "Providers" nav entry; the
  remaining sidebar entries arrive with the broader AI settings section
  reshuffle in the next PR of the stack.
- ProvidersPage lists configured AI providers via the queries added in
  PR 2.
- AddProviderPage walks through provider-type selection and form
  submission, with type-specific credential fields.
- UpdateProviderPage edits an existing provider with the same form
  components.
- Storybook stories cover each view's loading, empty, populated, error,
  and form states using the mock providers from testHelpers/entities.ts.
- router.tsx mounts the new /ai/settings layout with index, add, and
  :providerId child routes. The governance child route lands together
  with the dashboard navigation changes in the next PR.

Removes the now-unused knip ignore entries for src/api/queries/aiProviders.ts
and src/pages/AISettingsPage/ProvidersPage/components/addableProviderTypes.ts,
and drops the matching @lintignore tags on getProviderIcon and
MockAIProviders since the pages and page stories now consume them.
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/04-pages branch from 2a02336 to e6b7ad4 Compare May 26, 2026 16:29
@jakehwll jakehwll enabled auto-merge (squash) May 26, 2026 16:31
@jakehwll jakehwll merged commit 0a7ac7c into main May 26, 2026
26 of 28 checks passed
@jakehwll jakehwll deleted the jakehwll/DEVEX-355/04-pages branch May 26, 2026 16:38
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 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