Skip to content

fix(codex-keeper): label quota windows by actual window seconds - #28

Open
bytemain wants to merge 1 commit into
walkingddd:mainfrom
bytemain:fix/quota-window-label
Open

fix(codex-keeper): label quota windows by actual window seconds#28
bytemain wants to merge 1 commit into
walkingddd:mainfrom
bytemain:fix/quota-window-label

Conversation

@bytemain

Copy link
Copy Markdown

问题

账号状态页对所有付费套餐硬编码 5小时限额 / 周限额 标签(quotaWindowLabels() 只按套餐类型判断)。但窗口真实长度来自上游 usage 返回的 primary_window_seconds,pro 类账号的 primary window 可能是 7 天——页面会把周窗口的数据贴上"5小时限额"标签(重置时间距今数天可证)。

修复

按实际 window_seconds 选标签(18000→5小时限额、604800→周限额、2592000→月限额),秒数未知时才回退到传统 5小时/周 标签对。vue-tsc --noEmit 通过。

The account status page hardcoded the 5-hour/weekly label pair for
every paid plan. Upstream usage payloads decide the real window length
(primary_window_seconds), and pro accounts can report a weekly primary
window, so the page showed weekly data under a 5-hour label.

Pick the label from the actual window seconds (5h/weekly/monthly) and
keep the conventional pair only as a fallback when the seconds are
unknown.

Signed-off-by: 怪味胡豆 <raft-mobile-guaiweihudou@mail.build>
Signed-off-by: artin <artin@cat.ms>
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.

1 participant