Skip to content

[Feature]: 托盘面板中能不能增加显示 Codex 重置卡的剩余有效时间 #241

Closed

Description

@chenjiu111

Existing issues

  • I searched existing issues and did not find a duplicate.

Problem or use case

Win-CodexBar 当前可以显示 Codex 重置卡的可用数量,例如:

“2 reset credits available”

但没有显示下一张重置卡将在什么时候过期,因此用户无法准确判断应在什么时间之前使用重置卡。

上游 macOS 版 CodexBar 已经支持显示重置卡的到期时间,包括相对倒计时和绝对时间,但当前 Windows 版托盘面板似乎只显示了重置卡数量。

Proposed solution

将上游 CodexBar 的重置卡到期时间显示功能移植到 Win-CodexBar。

建议在 Codex 托盘卡片的“Reset credits”区域,显示下一张重置卡的到期时间,例如:

重置卡
当前有 2 张可用 · 下一张将在 6 天 21 小时后过期

现有的“相对重置时间”设置可以继续控制显示格式:

  • 开启时:显示“6 天 21 小时后过期”
  • 关闭时:显示本地日期和具体时间

如果条件允许,也可以在详细视图中显示每一张可用重置卡各自的到期时间,与上游 macOS 版的实现保持一致。

Affected area

  • Tray panel
  • Settings UI
  • Config file / settings persistence
  • CLI
  • Provider-specific behavior
  • Installer / release packaging
  • Startup / background behavior
  • Documentation
  • Other

Alternatives considered

目前只能打开 Codex 或相关界面,手动查看重置卡的到期日期。

Win-CodexBar 虽然已经显示重置卡数量,但仅显示数量无法判断具体过期时间。

开启或关闭“相对重置时间”也无法解决该问题,因为当前托盘面板没有显示任何重置卡到期时间字段。

Visual details

当前显示:

Reset credits
2 reset credits available

期望显示:

Reset credits
2 reset credits available
下一张将在 6 天 21 小时后过期

Image

Additional context

运行环境:

  • Win-CodexBar 版本:0.45.2
  • 操作系统:Windows 11
  • Codex 登录方式:OAuth
  • ChatGPT 套餐:Plus
  • “相对重置时间”:已开启
  • 当前显示的可用重置卡数量:2 张

上游实现参考:

上游 CodexBar 维护者已经确认,macOS 版会在菜单卡片中将每张重置卡的到期时间显示为倒计时或绝对时间。

本功能请求是希望将该功能移植到 Windows 版的 Codex 托盘卡片中。

Activity

  1. added
    enhancement
    on Jul 28, 2026
  2. Finesssee commented on Jul 29, 2026

    @Finesssee
    Collaborator

    Thanks for the request, I will try my best to do it.

  3. Finesssee commented on Jul 29, 2026

    @Finesssee
    Collaborator

    Resolved on main

    Shipped Codex reset-credit next expiry on the tray card (count was already shown; expiry was missing).

    What landed

    • Parse status / expires_at from /wham/rate-limit-reset-credits
    • Attach informational reset-credits extra window when available_count > 0
    • Tray/MenuCard: count + Next expires in … (honors Relative reset time); no fake % bar
    • Locales: NextExpires* strings
    • Tests: Rust unit + mockito real fetch_usage attach; Vitest MenuCard/hook

    Commits (among others)

    • 534f827e Parse Codex reset credit next expiry for tray
    • 2c224fd5 Show Codex reset credit count and next expiry on tray
    • 3b38af39 Add expires mode to useFormattedResetTime
    • b1a8e431 Add NextExpires locale strings
    • 30c5c989 Test Codex reset-credits attach via mockito fetch_usage

    Note

    Row only appears when OpenAI returns available_count > 0 (e.g. Plus with reset credits). Free / zero credits correctly hides the row — not a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions