Skip to content

Conversation

emma-sg
Copy link
Member

@emma-sg emma-sg commented Sep 16, 2025

Closes #2824

Changes

  • Refactors the superadmin quota edit dialog into its own component
  • Uses a Data Grid for to display an editable table of quotas
  • Updates the Data Grid with better typing1 & a few more features (namely, min, max, and step props for number input types)
  • Adds plan backend setup, including env variables, API endpoint, and use of this endpoint in the frontend
    • To use this, set available_plans to a JSON string matching the PlansResponse object type. If unset, the presets section will show a single "unset" preset.

Testing

This should be tested with both frontend and backend deployed with these changes, so you might want to test locally or deploy to dev.

Screenshots

Description Screenshot
Open modal Screenshot 2025-09-23 at 7 55 00 PM
Preset detail, showing disparity from current plan Screenshot 2025-09-23 at 7 55 07 PM
Adding extra execution minutes Screenshot 2025-09-23 at 7 55 58 PM
Subtracting execution minutes, with warning visible Screenshot 2025-09-23 at 7 59 24 PM
Updating multiple values Screenshot 2025-09-23 at 8 00 46 PM

Testing

All tested locally against dev.

Footnotes

  1. We're pretty limited by Lit's lack of support for generics in element types, so there's a few errors from lit-analyzer that are a little tricky to get around, but iirc work is being done to get closer to this! So we might not need to switch to JSX for this to be supportable in the future.

@emma-sg emma-sg requested review from ikreymer and SuaYoo September 16, 2025 00:48
@emma-sg emma-sg marked this pull request as draft September 20, 2025 18:27
@emma-sg
Copy link
Member Author

emma-sg commented Sep 22, 2025

From Discord by @ikreymer:

the grid view is nice but a few questions:

  • i think we want to just have increment for gifted and extra minutes, but not any of the other settings (concurrent crawls, page limit, or monthly minutes), those can be lowered seeing the diff is nice for all. not quite sure if it does that?
  • do we actually want to hard code plan settings here? If we do add that, they should probably be configured on the backend, not in the frontend

@emma-sg emma-sg force-pushed the admin-relative-execution-minutes-editor branch from 3663e35 to caeceb5 Compare September 24, 2025 00:06
@emma-sg emma-sg marked this pull request as ready for review September 24, 2025 00:06
Copy link
Member

@ikreymer ikreymer left a comment

Choose a reason for hiding this comment

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

Looks good! We may move the plans to a separate configmap/secret later, but this should be good for now!

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.

[Task]: Make extra execution minute admin UI additive (rather than absolute)
2 participants