Skip to content

feat(quota): display weekly window reset countdown in the quota header #248

Description

@airvzxf

Summary

Extend the mmx quota table so the weekly reset countdown is visible alongside the existing per-row reset cell, following the same window-tag style introduced in #240.

Motivation

After #240 was implemented (#243), the table shows a reset countdown per row with a window tag (5h Reset …, 1d Reset …). The weekly window — which drives the Wk left metric — currently has no countdown anywhere in the output, so it is not possible to tell at a glance how long until the weekly quota refreshes.

Adding a 1w Reset … cell in the header row, aligned with the per-row reset column, makes the weekly cycle as scannable as the rolling 5-hour and daily windows already are.


Comparison

Current Output

╭──────────────────────────────────────────────────────────────────────────────╮
│ MINIMAX  TokenPlan Quota                       Week: 2026-08-31 — 2026-09-07 │
├────────────────────────────────────────────────────────────┬─────────────────┤
│ general  Left             85%   Wk left             97%    │ 5h Reset 36m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ video    Left            3 / 3  Wk left            21 / 21 │ 1d Reset 4h 36m │
╰────────────────────────────────────────────────────────────┴─────────────────╯

Proposed Output

When the weekly reset is 1–6 days away:

╭────────────────────────────────────────────────────────────┬─────────────────╮
│ MINIMAX  TokenPlan Quota     Week: 2026-08-31 — 2026-09-07 │ 1w Reset 6d 23h │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ general  Left             85%   Wk left             97%    │ 5h Reset 36m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ video    Left            3 / 3  Wk left            21 / 21 │ 1d Reset 4h 36m │
╰────────────────────────────────────────────────────────────┴─────────────────╯
╭────────────────────────────────────────────────────────────┬─────────────────╮
│ MINIMAX  TokenPlan Quota     Week: 2026-08-31 — 2026-09-07 │ 1w Reset 3d 1h  │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ general  Left             85%   Wk left             97%    │ 5h Reset 36m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ video    Left            3 / 3  Wk left            21 / 21 │ 1d Reset 4h 36m │
╰────────────────────────────────────────────────────────────┴─────────────────╯

When the weekly reset is less than a day away:

╭────────────────────────────────────────────────────────────┬─────────────────╮
│ MINIMAX  TokenPlan Quota     Week: 2026-08-31 — 2026-09-07 │ 1w Reset 23h    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ general  Left             85%   Wk left             97%    │ 5h Reset 36m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ video    Left            3 / 3  Wk left            21 / 21 │ 1d Reset 4h 36m │
╰────────────────────────────────────────────────────────────┴─────────────────╯
╭────────────────────────────────────────────────────────────┬─────────────────╮
│ MINIMAX  TokenPlan Quota     Week: 2026-08-31 — 2026-09-07 │ 1w Reset 6h     │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ general  Left             85%   Wk left             97%    │ 5h Reset 36m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ video    Left            3 / 3  Wk left            21 / 21 │ 1d Reset 4h 36m │
╰────────────────────────────────────────────────────────────┴─────────────────╯

When the weekly reset is less than an hour away:

╭────────────────────────────────────────────────────────────┬─────────────────╮
│ MINIMAX  TokenPlan Quota     Week: 2026-08-31 — 2026-09-07 │ 1w Reset 53m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ general  Left             85%   Wk left             97%    │ 5h Reset 36m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ video    Left            3 / 3  Wk left            21 / 21 │ 1d Reset 4h 36m │
╰────────────────────────────────────────────────────────────┴─────────────────╯
╭────────────────────────────────────────────────────────────┬─────────────────╮
│ MINIMAX  TokenPlan Quota     Week: 2026-08-31 — 2026-09-07 │ 1w Reset 7m     │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ general  Left             85%   Wk left             97%    │ 5h Reset 36m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ video    Left            3 / 3  Wk left            21 / 21 │ 1d Reset 4h 36m │
╰────────────────────────────────────────────────────────────┴─────────────────╯

When the weekly reset is less than a minute away:

╭────────────────────────────────────────────────────────────┬─────────────────╮
│ MINIMAX  TokenPlan Quota     Week: 2026-08-31 — 2026-09-07 │ 1w Reset 54s    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ general  Left             85%   Wk left             97%    │ 5h Reset 36m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ video    Left            3 / 3  Wk left            21 / 21 │ 1d Reset 4h 36m │
╰────────────────────────────────────────────────────────────┴─────────────────╯
╭────────────────────────────────────────────────────────────┬─────────────────╮
│ MINIMAX  TokenPlan Quota     Week: 2026-08-31 — 2026-09-07 │ 1w Reset 9s     │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ general  Left             85%   Wk left             97%    │ 5h Reset 36m    │
├────────────────────────────────────────────────────────────┼─────────────────┤
│ video    Left            3 / 3  Wk left            21 / 21 │ 1d Reset 4h 36m │
╰────────────────────────────────────────────────────────────┴─────────────────╯

Notes on Formatting

  • The new 1w Reset … cell lives in the header row, aligned with the existing per-row reset column, so the table gains one column to the right of the Week: range.
  • The countdown uses the same unit ladder as the per-row cells: days + hours when ≥ 1 day, hours only below 1 day, minutes only below 1 hour, seconds only below 1 minute.
  • When the countdown reaches zero, the cell can read 1w Reset now or stay blank — happy to align on whichever feels consistent with the per-row behavior.

Discussion & Implementation

Same offer as in #240: I'm happy to discuss and adjust this design based on feedback, and if the maintainers approve, I can implement the change and open a pull request.

cc @SaladDay — thanks again for the work on #243; this builds on the same table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions