Skip to content

refactor: share the AI spend user_ids parser and test the page helper - #32168

Draft
ssncferreira wants to merge 1 commit into
ssncf/ai-spend-period-helpersfrom
ssncf/ai-spend-page-helper
Draft

ssncferreira wants to merge 1 commit into
ssncf/ai-spend-period-helpersfrom
ssncf/ai-spend-page-helper

Conversation

@ssncferreira

@ssncferreira ssncferreira commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Moves the user ID parsing shared by /ai/spend/users and the group members AI spend endpoint into one helper, and moves the pagination and user ID validation tests to the helpers. Follows #32051.

Changes

  • Add parseAISpendUserIDs and use it in /ai/spend/users and /groups/{group}/members/ai/spend. Responses don't change.
  • Add TestParseOrganizationAISpendPage and TestParseAISpendUserIDs in aibridge_internal_test.go.
  • Keep the over-the-limit user IDs test on each endpoint as wiring, and remove the cases the helper tests cover.

Related to AIGOV-728

Note

Generated by Coder Agents on behalf of @ssncferreira.

@linear-code

linear-code Bot commented Nov 13, 2026

Copy link
Copy Markdown

AIGOV-728

@ssncferreira ssncferreira changed the title test(enterprise/coderd): cover the AI spend page helper test: cover the AI spend page helper Nov 13, 2026
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-page-helper branch from 9f98cc0 to 3a13b47 Compare November 13, 2026 12:48
@ssncferreira
ssncferreira removed this pull request from stack #32171 November 18, 2026 13:49
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-page-helper branch from 3a13b47 to a48b0d5 Compare November 18, 2026 13:50
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-page-helper branch from a48b0d5 to 4e37f76 Compare November 18, 2026 15:17
@ssncferreira ssncferreira changed the title test: cover the AI spend page helper refactor: share the AI spend user_ids parser and test the page helper Nov 18, 2026
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-page-helper branch from 4e37f76 to 4bfae21 Compare November 19, 2026 10:41
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-page-helper branch from 4bfae21 to 52e4a2c Compare November 19, 2026 10:45
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-page-helper branch 2 times, most recently from 1c055b1 to 9e4d0d7 Compare November 19, 2026 11:56
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-page-helper branch from 9e4d0d7 to 3410954 Compare November 26, 2026 18:45
@ssncferreira
ssncferreira removed this pull request from stack #32389 November 26, 2026 18:49
@ssncferreira
ssncferreira removed this pull request from stack #32792 November 26, 2026 19:42

This branch has not been deployed

No deployments
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