Skip to content

feat: add Auto Window Rolling to Quota Tracker for seamless rolling-window quota rotation #343

@eachann1024

Description

@eachann1024

feat: Add Auto Window Rolling to Quota Tracker

Problem

When a rolling-window quota (e.g. Codex 5-hour window, GitHub monthly reset) is fully exhausted, users are hard-blocked until the window expires naturally. There's currently no mechanism to keep the quota rotating automatically — which directly contradicts 9Router's core promise of "never stop coding".

Solution

This PR introduces Auto Window Rolling: a background service that silently rotates rolling-window quota usage so users stay unblocked even after a burst exhaustion, without any manual intervention.

Key design decisions:

  • Warmup requests are excluded from usage analytics to avoid skewing stats
  • The feature is opt-in via a clearly labeled toggle in the Quota Tracker header
  • UI control is aligned with the existing header button structure for visual consistency

Changes

Area What changed
quota warmup service Background rotation logic for rolling-window quotas
API route Endpoint to trigger/control the rolling window flow
initialization Wires warmup service into app startup
usage hiding Warmup requests excluded from usage analytics
locale Label updated to "Auto Window Rolling" across all locales
UI Quota Tracker header control aligned with existing button structure

Validation

  • pnpm build passes cleanly
  • Verified Quota Tracker header shows correct label and button structure in browser
  • Warmup requests confirmed absent from usage stats

User Benefit

Users with burst-heavy usage patterns (e.g. heavy Claude Code sessions that drain Codex quota in one go) can enable Auto Window Rolling and let 9Router recover silently in the background — zero wait, zero manual retry.


Happy to rebase, add tests, or adjust any implementation details if this conflicts with your roadmap. Thanks for the great project! 🙏

Here is the link: #265

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions