CodexBar icon indicating copy to clipboard operation
CodexBar copied to clipboard

Feature request: refresh on-open from menu

Open dstier-git opened this issue 5 months ago • 2 comments

Hi, heavy user of Codex here. A few releases ago, I remember that opening from menu twice in succession would automatically refresh provider limits, without me having to manually refresh. This was helpful since it allows for a quick reference without interrupting me from whatever I was currently doing.

Since this no longer happens, I would love to see an option in the settings to automatically refresh provder limits immediately upon the user opening CodexBar from the menu. This would not override the existing refresh clock, since that would be needed to show somewhat-current limit info even if a provider takes a long time to respond upon the app being opened.

This would make it very easy for the user to tap and glance over limits without having to stay on CodexBar a bit longer and interrupt their prior work.

dstier-git avatar Jun 24 '26 06:06 dstier-git

Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 24, 2026, 2:30 AM ET / 06:30 UTC.

Summary Keep open. Current main intentionally does not refresh fresh provider limits on every menu open; the requested opt-in refresh-on-open behavior is a new settings and refresh-policy choice that needs maintainer product sign-off.

Reproducibility: not applicable. as a feature request. Source and tests show the current behavior: fresh menu opens do not trigger provider refresh, while missing or stale retry paths can refresh asynchronously.

Ways to help us reproduce this

  • Add a screenshot or short recording showing the behavior.
  • Add expected vs actual behavior.
  • Include redacted logs or terminal output.

Next step This is a new setting and refresh-behavior choice with performance and prompt-safety tradeoffs, so maintainer product direction should come before implementation.

Review details

Best possible solution:

If maintainers accept the feature, add a default-off refresh-on-open setting that reuses the existing deferred background refresh path and covers fresh, stale, in-flight, and prompt-safe cases with focused menu tests.

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

Not applicable as a feature request. Source and tests show the current behavior: fresh menu opens do not trigger provider refresh, while missing or stale retry paths can refresh asynchronously.

Is this the best way to solve the issue?

Unclear until maintainer sign-off. The narrowest maintainable path would be an opt-in setting built on the existing deferred refresh machinery, not restoring unconditional refresh on every open.

AGENTS.md: found and applied where relevant.

Remaining risk / open question:

  • Refreshing on every menu open could reintroduce menu responsiveness problems or Keychain prompt surprises unless it stays opt-in, deferred/background, coalesced, and non-interactive.

Codex review notes: model internal, reasoning high; reviewed against 2435c93453fe.

Label changes

Label justifications:

  • P3: This is a low-urgency UX/product feature request rather than a broken core workflow.
  • impact:other: The issue affects how quickly users can see fresh provider limit data, which is maintainer-visible but outside the specific impact taxonomy.
Evidence reviewed

What I checked:

Likely related people:

  • steipete: Peter authored the older auto-refresh-on-open commit and recent deferred/coalesced menu refresh work around the same code path. (role: original and recent area contributor; confidence: high; commits: 26fb95b3fcb3, 8adc2c798354; files: Sources/CodexBar/StatusItemController+Menu.swift, Sources/CodexBar/StatusItemController+MenuInteractionRefresh.swift)
  • hhh2210: Larry authored the merged PR that avoided redundant menu-open refreshes and is tied to the current retry-only behavior. (role: menu refresh behavior contributor; confidence: high; commits: 0be735b25a97; files: Sources/CodexBar/StatusItemController+Menu.swift)
  • joshuavial: Joshua authored the menu-open refresh delay fix and the instant-open test coverage around the current behavior. (role: recent menu-open refresh contributor; confidence: high; commits: 3c2d53de57c1; files: Sources/CodexBar/StatusItemController+Menu.swift, Sources/CodexBar/StatusItemController+MenuInteractionRefresh.swift, Tests/CodexBarTests/StatusMenuInstantOpenTests.swift)
  • elijahfriedman: Elijah recently changed menu refresh action behavior in the native menu path adjacent to this request. (role: recent adjacent contributor; confidence: medium; commits: fb8473fe6551, 0260a9a70706; files: Sources/CodexBar/StatusItemController+Menu.swift, Tests/CodexBarTests/StatusMenuPersistentRefreshTests.swift)
How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

clawsweeper[bot] avatar Jun 24 '26 06:06 clawsweeper[bot]

Implemented and landed in #1733 (merge commit c3463404eff8fc3ce15be98ba79ae2cf6bc4dc24).

The setting is off by default. When enabled, opening the menu refreshes enabled providers in the background without changing the periodic cadence; duplicate opens are debounced, closing the menu cancels queued work, and Codex dashboard work is deferred until menu tracking closes. Default stale and missing-data refresh behavior remains unchanged.

Proof: exact PR head 1f3bb5804812be23de990f1d1929919bf7aee23b passed every required CI check, make check, focused model/state tests, the full 44/44 local suite, clean autoreview, and packaged live verification of the default-off setting and persisted behavior. Thanks @dstier-git.

steipete avatar Jul 01 '26 12:07 steipete