Skip to content

Replace QuotaUsageProvider with Pinia store + enhancements#22640

Draft
davelopez wants to merge 4 commits intogalaxyproject:devfrom
davelopez:add_quota_store
Draft

Replace QuotaUsageProvider with Pinia store + enhancements#22640
davelopez wants to merge 4 commits intogalaxyproject:devfrom
davelopez:add_quota_store

Conversation

@davelopez
Copy link
Copy Markdown
Contributor

Removes the old provider pattern and uses a new quotaUsageStore to ensure quotas are properly reactive across the app. Also ensures the quota values are updated when a "likely quota change" event happens, such as when a history is updated (*), a cleanup operation is complete, or a quota refresh is requested.

Also, it modernizes some components to composition API and Typescript on the way.

(*) After updating the history, there was a bug where the user was updated only in the legacy app and not in the user store, which caused the quota in the masthead to update only on a page refresh or log-out/in cycle. This is properly synced now.

Part of #22606 that can be isolated

How to test the changes?

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

davelopez added 2 commits May 5, 2026 15:45
Removes the old quota source usage provider component and introduces a Pinia store to manage quota usage state and fetching logic across the application. Adopts the store pattern throughout all relevant components, replacing provider logic and updating all quota usage retrieval and reactivity to use the store. Centralizes state, simplifies usage, and makes quota usage handling more maintainable and testable. Updates tests and supporting files to mock or use the store as appropriate.
Improves consistency between user and quota usage data by having the user store trigger refreshes of the quota usage store after relevant user updates. Adds logic to detect when a user update should prompt a quota refresh and ensures both stores are updated atomically. Refactors user state management for clarity and correctness, adding methods for explicit user and quota syncing, and updating related helpers and test utilities to use new store methods.
@davelopez davelopez added kind/enhancement area/UI-UX kind/refactoring cleanup or refactoring of existing code, no functional changes labels May 5, 2026
@github-project-automation github-project-automation Bot moved this to Needs Review in Galaxy Dev - weeklies May 5, 2026
@github-actions github-actions Bot added this to the 26.1 milestone May 5, 2026
Ensures the usage bar receives the correct embedded and compact
values from parent props, enabling more flexible rendering
configurations and improving consistency across usages.
@davelopez davelopez marked this pull request as draft May 5, 2026 15:09
Introduces logic to detect history size changes and only refresh user data when necessary, minimizing redundant API calls.

Co-authored-by: Copilot <copilot@github.com>
@davelopez davelopez marked this pull request as ready for review May 5, 2026 16:14
@davelopez
Copy link
Copy Markdown
Contributor Author

The test_multiple_quota_sources_for_user failure seems legit. Investigating...

@davelopez davelopez marked this pull request as draft May 6, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/UI-UX kind/enhancement kind/refactoring cleanup or refactoring of existing code, no functional changes

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

1 participant