Repository navigation
feat: replace the AI spend page with the redesigned one - #32686
Conversation
67835c5 to
5b5f9bc
Compare
mollymaefraser
left a comment
There was a problem hiding this comment.
LGTM 🚀 few non blocking nits
| @@ -783,11 +780,6 @@ export const router = createBrowserRouter( | |||
| element={<AISettingsGatewayKeysPage />} | |||
| /> | |||
| <Route path="spend" element={<AISettingsSpendPage />} /> | |||
There was a problem hiding this comment.
Q: Old /ai/settings/spend links used ISO timestamps for startDate/endDate and separate provider_name/client/model params. The new page silently ignores those and falls back to the last 7 days with no filter. Is that acceptable since the old page was marked experimental, or is it worth mapping the old params (or at least taking the date part of the ISO value)?
There was a problem hiding this comment.
I think that's fine, since the old page was experimental. Old links still open the page, they just lose the dates and filters.
| }); | ||
|
|
||
| const now = new Date("2026-03-12T15:30:00Z"); | ||
| const path = "/ai/settings/spend/experimental"; |
There was a problem hiding this comment.
/ai/settings/spend/experimental could forward to /ai/settings/spend? or nobody should have been using it anyway?
There was a problem hiding this comment.
/ai/settings/spend/experimental never shipped in a release, so only internal links point to it.
…32687) ## Description Only the old spend page read `retention_start` from the per-user AI spend response, to limit its date picker. That page is gone, and the AI Gateway retention endpoint now serves this purpose, so the field is removed. The server still narrows a default period to the retention and rejects an explicit one that starts before it. Related to AIGOV-729 ## Changes - Remove `RetentionStart` from `codersdk.OrganizationAISpendReport`. - Keep the retention start local to `aiSpendRetainedPeriod`, its only reader. - Regenerate the API docs and TypeScript types, and update the tests and mocks. Depends on #32686. > [!NOTE] > Generated by Coder Agents on behalf of @ssncferreira.
Description
The redesigned AI spend page now replaces the old one at
/ai/settings/spend.Changes
spendroute at the redesigned page and remove the unlistedspend/experimentalroute.ExperimentalBadge.paginatedOrganizationAISpendquery.spendAccessandSpendAmount, which the rest of the app still uses, intoAISpendPage/.SpendAmounttoTotalSpendAmountand remove its per-user variant, which only the old page used.Closes AIGOV-729
Note
Generated by Coder Agents on behalf of @ssncferreira.