Repository navigation
feat: show plan and auth expiry in list output - #174
Merged
Merged
Conversation
- Parse chatgpt_subscription_active_until from the stored id_token. - Persist plan_expires_at and expose it in list JSON. - Add PLAN EXPIRE to plain and live list tables; missing or past timestamps render as '-'. - Refresh plan expiry from auth and usage sync; keep schema version 4 because the field is optional. - Cover ISO-8601/numeric claim parsing and expired display in tests. Closes #157
@loongphy/codex-auth-darwin-arm64
@loongphy/codex-auth-darwin-x64
@loongphy/codex-auth-linux-arm64
@loongphy/codex-auth-linux-x64
@loongphy/codex-auth-win32-arm64
@loongphy/codex-auth-win32-x64
@loongphy/codex-auth
commit: |
Use the shared column allocator for list, live details, switch, and remove. PLAN EXPIRE is a deferred column in the allocator instead of a hardcoded special case, so it only appears after normal columns have grown. Keep each view's visual order, preserve complete percentages, and document the dynamic column model in docs/dynamic-columns.md. Add width-sweep coverage for deferred plan expiry and live column order.
- Rename docs/schema-migration.md to docs/schema.md. - Define schema_version as a compatibility gate rather than a shape changelog. - Add data-authority, reader/writer, recovery, and mixed-fleet criteria. - Document optional derived/cache fields such as plan_expires_at. - Move migration details under a dedicated Migration section. - Update implementation and changelog references.
Use one shared first/grow/deferred order for every view. CREDITS now sits just above the deferred expiry fields, so expiry columns hide first, then CREDITS, then the remaining metadata. Unsupported columns are skipped without changing the shared order. Update the dynamic-columns document and add a regression test for CREDITS hiding before LAST.
Loongphy
force-pushed
the
feat/list-plan-expiry
branch
from
October 22, 2026 11:21
ae77b14 to
de9d04a
Compare
Show both PLAN EXPIRE and AUTH EXPIRE in plain list output. Both remain deferred columns, so they still hide before CREDITS and other normal columns.
Keep PLAN and PLAN EXPIRE adjacent in both views, move AUTH EXPIRE and RESET CREDITS before LAST ACTIVITY, and make LAST ACTIVITY the final and lowest-priority column. It is now deferred and hides first. Update the shared dynamic-column document and order/hide tests.
Grow ACCOUNT only after deferred columns, so long labels cannot hide expiry or last-activity fields. Render zero reset credits as 0 without an expiry marker. Keep CREDITS and RESET CREDITS adjacent, LAST ACTIVITY at the end, and update the dynamic-column docs and regression tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plain
listnow shows bothPLAN EXPIREandAUTH EXPIREas deferred columns.list --livealready showed both; the two columns are hidden beforeCREDITSand the rest of the normal columns.Summary
Adds a
PLAN EXPIREcolumn tolistoutput, sourced from the storedid_tokenclaimhttps://api.openai.com/auth.chatgpt_subscription_active_until.plan_expires_atand expose it inlist --json.-for missing, invalid, or already-expired timestamps so stale snapshots do not look current.PLAN EXPIREuntil other columns have their width, so mid-sized terminals keep status/usage cells readable.Closes #157.
Tests
zig build test -j1zig build run -- listzig fmt --check src tests build.zig