Skip to content

Sort providers by next weekly reset - #5212

Open
primerch wants to merge 5 commits into
steipete:mainfrom
primerch:provider-weekly-reset-sort
Open

primerch wants to merge 5 commits into
steipete:mainfrom
primerch:provider-weekly-reset-sort

Conversation

@primerch

Copy link
Copy Markdown

Summary

  • Add a Weekly reset option to the provider sorting menu.
  • Order the provider tabs in the menu-bar popup, Overview cards, and Settings sidebar by the next reported seven-day reset. Providers without a future weekly reset follow in their saved order.
  • Keep Overview first and preserve the selected provider when its tab moves. Reopening the popup uses the latest quota snapshots.
  • Show all enabled providers in Overview while weekly sorting is active, with per-account ordering when Show all accounts in Overview is enabled.

Verification

  • make check
  • ./Scripts/test_fast.sh --jobs 9 --filter 'WeeklyResetOrderTests|ProviderBrowsingTests|MergedOverviewAccountsTests|SettingsSidebarToolbarTests|StatusMenuMergedOverviewRefreshTests|StatusMenuSwitcherRefreshTests|StatusMenuSwitcherClickTests|StatusMenuInstantOpenTests|StatusMenuSwitcherTrackingTests|UserProviderPluginTests' passed 128 tests.
  • Opened the refreshed preview's native menu-bar popup and verified the visible provider tab order.

Native switcher screenshot after a simulated quota refresh

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:feature Preliminary submission classification; full source review pending. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

Adds an opt-in weekly-reset sort for provider tabs, Overview rows, and the Settings sidebar.

Example: Codex resets in 60 minutes and Kimi resets in 15 minutes.

  • Before: The saved provider order places Codex before Kimi.
  • After: Weekly reset sorting places Kimi before Codex while retaining Codex as the selected tab.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) No definite code defect was found, but required runtime and upgrade evidence is incomplete and product scope remains undecided.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Users cannot arrange providers to see which reported weekly quota resets soonest.
Reason: The use case is concrete, but the new preference and its coupling to unlimited Overview visibility need owner direction.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: this PR adds a distinct sorting capability, but its broader Overview behavior needs an owner decision.

Reviewed head: 7e50e4f1b18579330bfeadc4e9e1ec69466f95c6
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should weekly-reset sorting preserve Overview’s saved selection and six-provider limit, or deliberately show every enabled provider?
  • Recommendation: Approve sorting within existing Overview limits: Keep the optional chronological order while retaining saved provider selection and the existing cap.
  • Why: This PR adds a persisted preference and couples sorting to a broader Overview scope, while merged history explicitly preserves the existing selection contract and no human approval settles the change.

Before merge

  • Add real behavior proof - The inspected screenshot shows a native switcher render, and the reported tests exercise production presentation code with injected snapshots, but neither demonstrates ordering and refresh through the running app across the changed surfaces; the persisted UserDefaults key providersSortedByWeeklyReset also lacks a latest-stable upgrade run. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Provide a recording or runtime logs from the built app showing ordering after quota refresh, retained selection, sidebar and Overview behavior, plus fresh-install and v0.85.0 upgrade/restart behavior with saved settings intact; redact account details, IPs, API keys, and non-public endpoints.
Agent review details

How this fits together

Settings and cached provider/account snapshots feed presentation code that orders the sidebar, popup tabs, and Overview cards without adding quota fetches.

flowchart TD
    A[Saved provider order] --> D[Weekly reset ordering]
    B[Cached quota snapshots] --> D
    C[Sorting preference] --> D
    D --> E[Provider switcher]
    D --> F[Overview rows]
    D --> G[Settings sidebar]
Loading

Technical review

Best possible solution:

Add the shared opt-in sorter while preserving existing Overview selection and limits unless the owner explicitly approves expanding its scope.

Do we have a high-confidence way to reproduce the issue?

This is a new ordering capability rather than a reported upstream bug; source and injected-snapshot tests establish the intended scenario without executing target code.

Is this the best way to solve the issue?

A shared sorter over measured weekly windows fits the existing presentation owners, but sorting does not inherently require bypassing Overview selection or its provider cap.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a26ca57b5186.

Provenance checked

  • Saved provider order and browsing preferences keeps the original intent (3a45dc7: The landed browsing change retained the existing alphabetical Boolean, manual order, hidden plugin slots, and reversible restoration for compatibility.)
  • Overview provider selection and cap changes intended behavior with a stated reason (096c957: Account expansion was deliberately applied after provider selection, preserving the six-provider cap; this PR explicitly proposes showing all enabled providers during weekly sorting.)
  • Plugin switcher identities and selection keeps the original intent (e9da079: First-class plugin tabs use stable provider instance IDs and preserve plugin-only and singleton presentation; the new ordering continues using those identities.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 096c957 adds Sources/CodexBar/UsageStore+OverviewAccounts.swift:19 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 096c957f9c5c; files: Sources/CodexBar/UsageStore+OverviewAccounts.swift)
  • Yuxin Qiao: Raw commit 3a45dc7 adds Sources/CodexBar/SettingsStore+ProviderBrowsing.swift:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3a45dc7cf7c2; files: Sources/CodexBar/SettingsStore+ProviderBrowsing.swift)
  • Elijah Friedman: Raw commit 348ad23 adds Sources/CodexBar/SettingsStore+ProviderBrowsing.swift:27 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 348ad23ff72d; files: Sources/CodexBar/SettingsStore+ProviderBrowsing.swift)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 29, 2026, 1:14 AM ET / 06:14 UTC.

@primerch
primerch marked this pull request as ready for review November 29, 2026 06:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-05T00:46:05.117577Z d67b6c3 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e50e4f1b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

primerch and others added 2 commits November 29, 2026 19:42
Merge current main and preserve Overview selections and its provider limit while sorting. Isolate the regression fixtures, update the architecture anchor, and keep synthetic proof outside the repository.

Co-authored-by: Reacher <macryze@icloud.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants