feat(site): add AI settings providers pages and routes#25583
Conversation
There was a problem hiding this comment.
💡 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 ?? []} |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
14a62f7 to
3aac253
Compare
c34e51a to
1152845
Compare
3aac253 to
c24e4da
Compare
1152845 to
a28647d
Compare
| </Button> | ||
| </div> | ||
| <div className="flex flex-col gap-6 pt-6"> | ||
| <div className="flex items-center gap-4 min-w-0"> |
There was a problem hiding this comment.
I noticed a bunch of min-w-0s were removed in #25579, so just double checking these are necessary too
f91be01 to
9e89ae2
Compare
c24e4da to
2a02336
Compare
…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.
2a02336 to
e6b7ad4
Compare

Linear: DEVEX-355
Fourth PR in a 5-PR stack splitting #25328. Wires the new
/ai/settingsprovider management UI.AISettingsLayouthosts the section under/ai/settingswith 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.ProvidersPagelists configured AI providers via the queries added in PR 2.AddProviderPagewalks through provider-type selection and form submission, with type-specific credential fields.UpdateProviderPageedits an existing provider with the same form components.testHelpers/entities.ts.router.tsxmounts the new/ai/settingslayout with index,add, and:providerIdchild routes. Thegovernancechild route lands together with the dashboard navigation changes in the next PR.Removes the now-unused knip ignore entries for
src/api/queries/aiProviders.tsandsrc/pages/AISettingsPage/ProvidersPage/components/addableProviderTypes.ts, and drops the matching@lintignoretags ongetProviderIconandMockAIProviderssince the pages and page stories now consume them.Stack
Replaces #25328 once the stack lands.