Skip to content

fix: adjust quota overview timing layout#137

Open
DemosHume wants to merge 1 commit intoqxcnm:mainfrom
DemosHume:codex/quota-usage-card-ui
Open

fix: adjust quota overview timing layout#137
DemosHume wants to merge 1 commit intoqxcnm:mainfrom
DemosHume:codex/quota-usage-card-ui

Conversation

@DemosHume
Copy link
Copy Markdown
Contributor

@DemosHume DemosHume commented Apr 16, 2026

变更摘要 / Summary

  • 调整账号页额度概览卡的底部信息布局:左下角显示具体重置时间,右下角显示距离重置的剩余倒计时。
  • 新增共享的倒计时格式化逻辑,支持 5 小时窗口与 7 天窗口,并在剩余时间少于 10 分钟时显示秒。
  • Adjust the quota overview footer on the accounts page so each window shows the reset timestamp on the left and the countdown text on the right.
  • Add shared countdown formatting for both the 5-hour and 7-day windows, including second-level precision when less than 10 minutes remain.

改动范围 / Scope

  • Frontend
  • Desktop / Tauri
  • Service
  • Gateway / Protocol Adapter
  • Docs / Governance
  • Workflow / Release

主要文件 / Key Files

  • apps/src/app/accounts/accounts-page-helpers.tsx
  • apps/src/lib/utils/usage.ts

示例图 / Example

Quota overview example

验证 / Validation

  • pnpm -C apps run test
  • pnpm -C apps run build:desktop
  • pnpm -C apps run test:ui
  • cargo test --workspace
  • 其他本地验证已说明 / Other local validation explained below

已执行的实际验证 / Completed validation:

pnpm run build:desktop
- result: passed

未执行的验证与原因 / Skipped validation and why:

- pnpm -C apps run test: 本次未执行,当前改动仅涉及账号页额度卡布局与倒计时格式。
- pnpm -C apps run test:ui: 本次未执行,当前未补充对应 UI 自动化用例。
- cargo test --workspace: 本次未执行,当前改动未涉及 Rust / service / gateway。

风险与影响面 / Risks & Impact

  • 影响范围限定在账号页额度概览卡的展示层,不改变后端 usage 数据来源与计算结果。
  • 倒计时文本现在依赖前端当前时间进行格式化,因此只影响展示,不影响服务端实际重置时间。
  • This change is limited to the presentation of quota overview cards on the accounts page and does not alter backend usage calculations.
  • Countdown text is now formatted from the frontend current time, which affects display only and does not change the actual reset timestamp.

备注 / Notes

  • 本 PR 已清理为纯前端 UI 修改,不包含此前其他分支上的自动刷新逻辑变更。
  • This PR has been cleaned up to contain UI-only changes and excludes the earlier auto-refresh logic work.

@DemosHume
Copy link
Copy Markdown
Contributor Author

image

@DemosHume DemosHume force-pushed the codex/quota-usage-card-ui branch from 4936685 to 09e048f Compare April 16, 2026 10:21
@DemosHume DemosHume changed the title Adjust quota overview timing layout fix: adjust quota overview timing layout Apr 16, 2026
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