feat: generic plugin-driven usage & quota modal - #288
Open
JamesDAdams wants to merge 2 commits into
Open
Conversation
Contributor
Author
Contributor
Author
|
@co-l To not overload the code of Openfox the usage and quota is designed to be fill by plugins |
- Add generic QuotaMetric/QuotaSource/QuotaReport types (windowed + token-balance) - Extend plugin contract with QuotaProvider + registerQuotaProvider - Aggregate all registered providers via GET /api/quota (resilient to failures) - Add useQuotaStore (zustand) and QuotaModal (generic, no per-plugin code) - Add QuotaIcon + header button left of Settings with warning dot (desktop + mobile) - Shared isQuotaMetricOverLimit helper; auto-refresh (interval + focus) + manual refresh - Add unit/component tests for aggregation, modal shapes, and header button
JamesDAdams
force-pushed
the
feat/usage-quota
branch
from
September 4, 2026 11:24
9b20fcf to
1eed2c1
Compare
Contributor
Author
|
@co-l I make the change for i18n translate |
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
Added generic plugin-driven usage & quota tracking to OpenFox:
QuotaMetric,QuotaSource, andQuotaReporttypes supporting windowed limits and token balance metrics.QuotaProviderandregisterQuotaProvider./api/quotaserver endpoint to aggregate quota metrics across all loaded plugins.QuotaModalcomponent accessible via a new header action button, with visual indicators for metrics approaching or exceeding limits.AI-Enhanced Development
Tell what models helped shape this PR:
Cache Impact
Does this PR affect anything cached — system prompts, tool definitions, skills, or other context?