fix(codex-keeper): label quota windows by actual window seconds - #28
Open
bytemain wants to merge 1 commit into
Open
fix(codex-keeper): label quota windows by actual window seconds#28bytemain wants to merge 1 commit into
bytemain wants to merge 1 commit into
Conversation
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>
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.
问题
账号状态页对所有付费套餐硬编码
5小时限额 / 周限额标签(quotaWindowLabels()只按套餐类型判断)。但窗口真实长度来自上游 usage 返回的primary_window_seconds,pro 类账号的 primary window 可能是 7 天——页面会把周窗口的数据贴上"5小时限额"标签(重置时间距今数天可证)。修复
按实际
window_seconds选标签(18000→5小时限额、604800→周限额、2592000→月限额),秒数未知时才回退到传统 5小时/周 标签对。vue-tsc --noEmit通过。