feat(wave): add per-repo budget override in admin panel#1889
Open
jtourkos wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an admin-facing per-repo “points budget override” control to the Wave admin repos panel, gated by the managePoints permission, so budgets can be set/cleared on a per-repository basis.
Changes:
- Extend
WaveProgramRepoWithDetailsDtoschema to includepointsBudgetOverride. - Add Wave API helpers to set/remove a repo budget override.
- Update admin repos route guard and UI to expose a “Budget” action and new modal for editing/removing overrides.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/utils/wave/types/waveProgram.ts | Adds pointsBudgetOverride to the repo-with-details DTO schema. |
| src/lib/utils/wave/wavePrograms.ts | Adds PUT/DELETE helpers for budget override endpoints. |
| src/routes/(pages)/wave/(base-layout)/admin/repos/+layout.ts | Allows access to the admin repos area for managePoints users and passes canManagePoints to pages. |
| src/routes/(pages)/wave/(base-layout)/admin/repos/repos/+page.svelte | Adds “Budget” button on repo cards when canManagePoints is true. |
| src/routes/(pages)/wave/(base-layout)/admin/repos/components/budget-override-modal.svelte | New modal to set/remove the per-repo budget override. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Align hasExistingOverride to use `!= null` consistently with the repo card button, and replace parseInt with Number() + isInteger validation to prevent silent truncation of decimal or exponent input.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the ability for admins with
managePointspermission to set or remove a per-repo budget override from the wave admin repos panel.Changes
pointsBudgetOverridefield towaveProgramRepoWithDetailsDtoSchemasetRepoBudgetOverride(PUT) andremoveRepoBudgetOverride(DELETE) inwavePrograms.tsmanagePointspermission check to repos layout guardbudget-override-modal.sveltefor setting/removing overrides with validation and error handlingFiles Changed
src/lib/utils/wave/types/waveProgram.tspointsBudgetOverrideto schemasrc/lib/utils/wave/wavePrograms.tssrc/routes/.../admin/repos/+layout.tsmanagePointspermissionsrc/routes/.../admin/repos/repos/+page.sveltesrc/routes/.../admin/repos/components/budget-override-modal.svelteTesting
Manual testing in the admin panel — verify the budget button appears for users with
managePointspermission, modal opens, and set/remove operations work.