Add an AI status page to the drawer #2

Merged
arne merged 1 commit from aistatus-page into main 2026-09-15 22:33:55 +02:00
Owner

Reads how much of your own quota is left on Claude and Codex from the OAuth token each CLI already wrote to disk, calling the same undocumented endpoints each CLI's own usage indicator calls. Unofficial by necessity: the documented usage APIs reject a Claude Code or inference key and want a separately issued org Admin key instead. Cached for ten minutes; a sixth drawer page reached by paging.

Reads how much of your own quota is left on Claude and Codex from the OAuth token each CLI already wrote to disk, calling the same undocumented endpoints each CLI's own usage indicator calls. Unofficial by necessity: the documented usage APIs reject a Claude Code or inference key and want a separately issued org Admin key instead. Cached for ten minutes; a sixth drawer page reached by paging.
Reads how much of your own quota is left on Claude and Codex — not whether
the vendor's infrastructure is up — from the same OAuth token the `claude`
and `codex` CLIs already wrote to disk, calling the same undocumented
endpoints each CLI's own usage indicator calls
(`/api/oauth/usage`, `/backend-api/wham/usage`).

Unofficial by necessity: the documented usage APIs reject a Claude Code or
inference key outright and want a separately issued org Admin key instead,
a more sensitive credential this machine does not have. A stale
User-Agent or a reshaped response both fail the same way — the row reads
"unreachable" rather than crashing.

The token is read and used inside one `sh -c` process, handed to curl over
stdin (`-K -`) rather than as an argument, so it never sits in that
process's argv. Cached for ten minutes rather than fetched on every open,
since the codex endpoint rate-limits aggressively below ~300s.

A sixth drawer page, reached by paging (`Ctrl+L`) rather than a direct
keybind — added to Drawer.qml's page list and Glyph.qml's marks, drawn in
Sidebar.qml next to `updates`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HpAeUXpLaAbAd9pLszDV9k
arne force-pushed aistatus-page from 55e939c3ef to 6ece57426c 2026-09-15 22:33:48 +02:00 Compare
arne merged commit 31b6549008 into main 2026-09-15 22:33:55 +02:00
arne deleted branch aistatus-page 2026-09-15 22:33:55 +02:00
arne referenced this pull request from a commit 2026-09-15 22:33:55 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bases/fjord!2
No description provided.