Skip to content

[Bug]: FloatBar shows informational 5h placeholder instead of weekly usage #275

Description

@yy0tt

Existing issues

What happened?

On Win-CodexBar 0.48.0, Codex OAuth can return an informational primary window when no 5-hour session is active, plus a real weekly secondary window.

Safe diagnostic snapshot:

{
  "source": "oauth",
  "login_method": "ChatGPT Pro",
  "primary": {
    "used_percent": 0,
    "window_minutes": 300,
    "reset_description": "No active 5h session",
    "is_informational": true
  },
  "secondary": {
    "used_percent": 26,
    "window_minutes": 10080
  }
}

The tray/settings/CLI identify the weekly window correctly, but the FloatBar displays:

100% · No active 5h session

As a result, the actual weekly limit is not visible in the FloatBar.

Root cause

apps/desktop-tauri/src/floatbar/FloatBar.tsx reads provider.primary unconditionally for remaining/used percent, exhaustion, reset time, and sorting. It does not check provider.primary.isInformational and does not fall back to provider.secondary.

This appears to be a surface-specific omission after #268 introduced the canonical informational session placeholder.

Expected behavior

When provider.primary.isInformational === true and provider.secondary exists, FloatBar should display the secondary/weekly window (including its percentage and reset time), or otherwise expose a setting to select the FloatBar metric.

The fallback should also be used for FloatBar sorting/tone calculations so an informational 0% used / 100% remaining placeholder does not outrank real quota windows.

Reproduction

  1. Use a Codex account whose usage API currently returns no active 5-hour window and a weekly window.
  2. Open Win-CodexBar 0.48.0.
  3. Confirm the tray/settings/CLI show weekly usage correctly.
  4. Enable Floating Bar and Show Reset Time Inline.
  5. Observe 100% · No active 5h session instead of the weekly usage.

Environment

  • Win-CodexBar: 0.48.0
  • OS: Windows 11
  • Provider source: Codex OAuth

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