Repository navigation
wip: apply maintainer review — slim reset credits, local times, schema stays v4 (stacked on #159) - #173
Merged
Conversation
…a stays v4
- remove the NEXT RESET column and the next_reset_at field (the value is
always one of the two timestamps already shown in the 5H/WEEKLY cells)
- rename ACCESS EXP LOCAL -> ACCESS EXPIRE and drop the LOCAL suffix
pattern; credit expiry renders in local time (UTC mixing removed)
- remove the per-credit columns (C1/C2 EXP) and their width machinery
- RESET CREDITS cell shows 'N (exp MMM-DD)': count plus the earliest
available-card expiry in local form
- slim persisted credit records to {id, status, expires_at, title};
wrapper available_count/total_earned_count and per-card reset_type/
granted_at/description dropped (upstream drops total_earned_count too)
- rename auth_expires_at -> access_token_expires_at across the
persistence/fetch/JSON layers
- schema_version stays 4: additive optional fields, older binaries
ignore unknown keys, data self-heals on the next --api refresh
- docs and tests updated accordingly
[skip ci]
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.
WIP / draft — stacked on #159 (base is #159's head branch; this diff contains only the maintainer-review implementation). Will be retargeted to main after #159 merges.
What
Implements the four changes requested in the #159 review:
NEXT RESETcolumn removed — its value is always one of the two reset timestamps already embedded in the 5H/WEEKLY cells (58% (14:20 on 22 Oct)); the derivednext_reset_atfield is removed with it (registry, JSON output, and view layers).ACCESS EXP LOCAL→ACCESS EXPIRE— and theLOCALsuffix pattern is dropped: credit expiry now renders in local time, so every timestamp in the table shares one timezone (the previous per-credit columns pinned the backend timezone).C1 EXP,C2 EXP, …) removed — replaced by the enrichedRESET CREDITScell:N (exp MMM-DD)— the persisted count plus the earliest available-card expiry in local form. The old columns were rigid 23-char, grew unbounded withcredits.len, showed expiry without card identity, and mixed UTC into the table.schema_versionstays 4 — the new fields (access_token_expires_at,last_usage.reset_credit) are optional additive data: older binaries ignore unknown keys, and the data self-heals on the next--apirefresh. The v4→v5 migration is dropped.Persisted credit record
id(upstream opaque identity),status(upstream keeps redeemed rows in the list —RateLimitResetCreditStatus: available/redeeming/redeemed — and rendering filters toavailablelike upstream's picker),expires_at,title(the only human-readable identity).available_count(duplicatesreset_creditson disk),total_earned_count(upstream drops it too),reset_type/granted_at/description(nothing renders or acts on them).status == availableexactly like upstream's picker.Renames
auth_expires_at→access_token_expires_atacross the registry record, persisted JSON key, fetch layer, view layer, and JSON output — it is specifically the access token's JWTexp, and matches the registry's_atseconds convention (created_at,last_used_at,last_usage_at,resets_at).Docs
schema-migration.mdstays at the schema 4 policy (v5 history entry removed).docs/commands/list.mdanddocs/json-api.mdupdated:ACCESS EXPIRE/RESET CREDITScolumns, slimreset_creditshape, nonext_reset_at, all-local time rendering.Scope
Validation
zig build -Doptimize=ReleaseFastclean; fullzig build testexit 0list --live --skip-api: the live table showsACCESS EXPIRE/RESET CREDITScolumns, noNEXT RESET, no per-credit columns, no UTC strings; plainlistoutput is byte-identical to main