Repository navigation
feat(panel): reset odds from whenreset.app - #61
Merged
Merged
Conversation
Autopilot-Run: 2026-10-14-whenreset-odds
Autopilot-Run: 2026-10-14-whenreset-odds Requirements: R01, R03, R04, R05, R06, R07i, R08i
Autopilot-Run: 2026-10-14-whenreset-odds Requirements: R02, R03, R05, R06, R07i
Autopilot-Run: 2026-10-14-whenreset-odds Requirements: R03, R06, R07i
Autopilot-Run: 2026-10-14-whenreset-odds
InfinityScripter
marked this pull request as ready for review
October 14, 2026 19:01
This was referenced Oct 14, 2026
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.
What this changes
Adds a "Reset odds" card under the limits strip: the chance that Claude or Codex limits get reset early, taken from whenreset.app's public API (
/api/v1/resets.json, no key).How it fetches: an ephemeral session with redirects refused, a 15 s timeout and its own User-Agent, at most once every 15 minutes (on a 5-minute timer, at launch and when the panel opens). The last good answer is kept in UserDefaults, so the card shows right after launch. Answers over 1 MB are ignored. If the network fails, the card shows the cached figures marked as old, or "loading" / "unavailable". It never shows 0% for an unknown value.
Parsing and the card's rules (state, staleness, note, banked line, counts) live in
Sources/Model/ResetOdds.swiftand are covered by the model checks. The request is listed in PRIVACY.md.Issue
—
How you tested it
swift-6-0job will cover it.CONTROL_BAR_DUMP_MENU=1prints the "Reset odds" block with both providers. In the live panel, clicking the chevron expands the card and the panel grows. Screenshots of the folded and unfolded card still need to be attached (the CLI cannot upload images).Checklist
main, so I'm not fixing something that already changed.Is this for everyone, or is it your fork?
For everyone: the card covers both providers the app already shows, and it can be switched off.