Skip to content

Usage widgets permanently show 0% on Enterprise accounts; add an option to hide them when usage is zero #598

Description

@tough-griff

On Enterprise accounts the usage API returns null for every rate-limit window (see #343), which ccstatusline correctly reads as 0%. The session/weekly usage widgets are then permanently stuck at zero, and the session reset timer keeps counting down from transcript block metrics next to a usage figure that never moves:

$XYZ ▓▓▓▓▓▓▓▓▓░ 85.1% | 0% 2h5m | 0%

Widgets, left to right (raw-value mode):

Output Widget Hide states
$XYZ Extra Usage Used disabled,no-data
▓▓▓▓▓▓▓▓▓░ 85.1% Extra Usage Utilization disabled,no-data
0% Session Usage no-data
2h5m Block Reset Timer no-data
0% Weekly Usage no-data
(hidden) Weekly Reset Timer no-data
Widget config for this line
[
  {
    "id": "fb09dd02-a41b-4172-bfdf-4dd7e329b8a7",
    "type": "extra-usage-used",
    "color": "ansi256:11",
    "rawValue": true,
    "metadata": {
      "hide": "disabled,no-data"
    },
    "numberFormat": {
      "style": "compact"
    }
  },
  {
    "id": "9fdb44e0-25bf-44ac-b943-a34f1b377d18",
    "type": "separator",
    "character": " "
  },
  {
    "id": "351546ed-1c7c-4663-8c2a-cf7ca36443b7",
    "type": "extra-usage-utilization",
    "color": "ansi256:11",
    "numberFormat": {
      "style": "compact"
    },
    "rawValue": true,
    "metadata": {
      "display": "slider",
      "hide": "disabled,no-data",
      "invert": "false"
    }
  },
  {
    "id": "7b2987cb-1c37-4f4c-bce6-4adb6d482626",
    "type": "separator",
    "color": "ansi256:7",
    "dim": true
  },
  {
    "id": "b125133a-d2da-4254-955e-ad9bfa5a3487",
    "type": "session-usage",
    "color": "ansi256:80",
    "numberFormat": {
      "style": "compact"
    },
    "rawValue": true,
    "metadata": {
      "invert": "false",
      "display": "time",
      "hide": "no-data"
    }
  },
  {
    "id": "52245476-8615-43c9-8db5-7fd37c45139c",
    "type": "separator",
    "character": " "
  },
  {
    "id": "6fa9558a-8a03-442c-bfef-dfb5854cba65",
    "type": "reset-timer",
    "color": "ansi256:80",
    "dim": true,
    "numberFormat": {
      "style": "compact"
    },
    "rawValue": true,
    "metadata": {
      "display": "time",
      "compact": "true",
      "absolute": "false",
      "hide": "no-data"
    }
  },
  {
    "id": "d7a551fb-4953-44bd-8448-ecaecacf9668",
    "type": "separator",
    "color": "ansi256:7",
    "dim": true
  },
  {
    "id": "a73d2332-9fbb-48f9-abc5-02d4561157ca",
    "type": "weekly-usage",
    "color": "ansi256:81",
    "numberFormat": {
      "style": "compact"
    },
    "rawValue": true,
    "metadata": {
      "display": "time",
      "invert": "false",
      "hide": "no-data"
    }
  },
  {
    "id": "1df9ff5e-64a3-41ad-8f97-d45367ba35ee",
    "type": "separator",
    "character": " "
  },
  {
    "id": "1a69f9af-0275-40f5-8521-af07f0e8940b",
    "type": "weekly-reset-timer",
    "color": "ansi256:81",
    "dim": true,
    "numberFormat": {
      "style": "compact"
    },
    "rawValue": true,
    "metadata": {
      "display": "time",
      "compact": "true",
      "hours": "false",
      "hide": "no-data"
    }
  }
]

On this account extra usage is the only thing that moves. Session Usage, the Block Reset Timer and Weekly Usage never change, so they're pure noise, and no-data can't hide them because the data is present and reads 0%. (Weekly Reset Timer is only hidden because no weekly window is reported at all.) The same happens briefly on regular plans right after a window resets, and the per-model weekly widgets (Sonnet/Opus/Fable) and Extra Usage Used/Utilization sit at zero for most non-Enterprise users most of the time.

Proposal: add an opt-in zero hideable state (same as the one the git counters, token widgets and Compaction Counter already have) to:

  • Session / Weekly / Weekly Sonnet / Weekly Opus / Weekly Fable Usage: hide while usage is 0%
  • Block Reset Timer / Weekly Reset Timer: hide while that period's usage is 0% and no reset window has started
  • Extra Usage Used / Extra Usage Utilization: hide while nothing has been spent

Extra Usage Remaining would not get it. Hiding it at zero spend hides the full budget, and hiding it at $0 left hides the one warning worth showing.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions