CodexBar icon indicating copy to clipboard operation
CodexBar copied to clipboard

Left/right provider navigation doesn't work

Open anirudhvee opened this issue 6 months ago • 3 comments

Description

In CodexBar 0.29.1, the merged provider switcher has left/right arrow navigation in the code, but it does not work for me in the actual open menu.

This is separate from #1144. Cmd-number shortcuts would be new shortcuts, while this is existing left/right navigation code that does not seem to work through the real menu.

Environment

  • CodexBar version: 0.29.1
  • Base/source context: current main after v0.29.1 still has the same left/right navigation path
  • macOS version: 26.5 (25F71)
  • Hardware: Apple Silicon (MacBookPro17,1)
  • Menu mode: merged provider switcher menu

Steps to Reproduce

  1. Enable merged icon mode with multiple providers
  2. Open the CodexBar menu from the menu bar
  3. Press the right arrow key
  4. Press the left arrow key

Actual Behavior

Nothing changes in the provider switcher.

Expected Behavior

  • right arrow moves to the next switcher item
  • left arrow moves to the previous switcher item

Reproducibility

This is reproducible on my machine.

I verified:

  • the provider switcher is visible at the top of the open menu
  • clicking the provider switcher works
  • pressing left/right while the menu is open does not switch providers

Evidence

The code already appears to have left/right provider switcher navigation, but the existing test path calls performKeyEquivalent directly. That does not prove the real open NSMenu receives left/right keypresses.

anirudhvee avatar May 26 '26 05:05 anirudhvee

Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed May 26, 2026, 1:49 AM ET / 05:49 UTC.

Summary Keep open. Current main still has only the direct StatusItemMenu.performKeyEquivalent arrow path and direct unit coverage, while the reported failure is the real open NSMenu key-delivery path in v0.29.1; no post-release source fix or canonical replacement issue was found.

Reproducibility: Do we have a high-confidence way to reproduce the issue? No live reproduction was established here; the source path and direct test gap are clear, but the reported failure requires real macOS open-menu key delivery to confirm.

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 The affected files are clear, but the next step should be a maintainer or macOS runner confirming the live open-menu key path before a repair is claimed.

Review details

Best possible solution:

Repair the real open-menu left/right key path for the existing provider switcher behavior, keep it separate from the Cmd-number feature request, and validate with focused tests plus fresh bundle proof.

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

Do we have a high-confidence way to reproduce the issue? No live reproduction was established here; the source path and direct test gap are clear, but the reported failure requires real macOS open-menu key delivery to confirm.

Is this the best way to solve the issue?

Is this the best way to solve the issue? Unclear until the live event path is verified; the narrow fix should target real NSMenu arrow-key delivery for the existing switcher rather than adding the separate Cmd-number behavior tracked at https://github.com/steipete/CodexBar/issues/1144.

AGENTS.md: found and applied where relevant.

Remaining risk / open question:

  • I could not run a freshly built macOS bundle in this read-only review, so the exact live AppKit event path still needs confirmation.
  • The existing unit test can remain green even if real open-menu arrow keys are consumed before performKeyEquivalent is reached.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 7c751570b7e9.

Label changes

Label changes:

  • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
  • add clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.

Label justifications:

  • P2: This appears to be broken existing menu navigation with a narrow UI blast radius.
  • impact:other: The issue affects user-visible provider-switcher navigation ergonomics rather than data, auth, sessions, messages, security, or availability.
Evidence reviewed

Acceptance criteria:

  • swift test --filter StatusMenuSwitcherClickTests
  • make check
  • Fresh bundle smoke proof: enable Merge Icons with multiple providers, open the real CodexBar menu, press right then left arrow, and verify the selected switcher item changes both directions.

What I checked:

  • Issue context: The reporter confirmed this is distinct from the Cmd-number shortcut request at https://github.com/steipete/CodexBar/issues/1144 and says clicking the switcher works while left/right arrows in the open menu do nothing.
  • Arrow dispatch source: Current main handles provider navigation only inside StatusItemMenu.performKeyEquivalent for unmodified key codes 123 and 124 when the first item is ProviderSwitcherView. (Sources/CodexBar/StatusItemMenu.swift:18, 7c751570b7e9)
  • Navigation state update: The helper computes previous/next visible switcher selections, updates overview/provider state, and invalidates open menus, so the source path exists when called. (Sources/CodexBar/StatusItemController+ProviderNavigation.swift:4, 7c751570b7e9)
  • Coverage gap: The existing regression test calls menu.performKeyEquivalent(with:) directly for key codes 124 and 123, which does not prove that a real open AppKit menu delivers left/right keypresses to that override. (Tests/CodexBarTests/StatusMenuSwitcherClickTests.swift:225, 7c751570b7e9)
  • Release/current-main check: The diff from latest release v0.29.1 to current main only changes CHANGELOG.md and version.env, so there is no source-side post-release fix for this menu behavior. (7c751570b7e9)
  • Feature provenance: Commit eadf5c175e532ab624fe7db34dadf1a374debb5e introduced the provider switcher arrow-navigation implementation and direct test coverage; git tag --contains shows it shipped by v0.29.1. (Sources/CodexBar/StatusItemController+ProviderNavigation.swift:4, eadf5c175e53)

Likely related people:

  • steipete: Peter Steinberger authored commit eadf5c175e532ab624fe7db34dadf1a374debb5e, which added the StatusItemMenu, provider-navigation helper, action delegate hook, and switcher arrow test. (role: introduced current arrow-navigation path; confidence: high; commits: eadf5c175e53; files: Sources/CodexBar/StatusItemMenu.swift, Sources/CodexBar/StatusItemController+Actions.swift, Sources/CodexBar/StatusItemController+ProviderNavigation.swift)
  • Karl: Commit 9907f7496a8ec83961281a28917e3611fb62fb90 changed provider-switcher runtime click routing and added regression coverage in the same switcher test area. (role: adjacent switcher event-handling contributor; confidence: medium; commits: 9907f7496a8e; files: Sources/CodexBar/StatusItemController+SwitcherViews.swift, Tests/CodexBarTests/StatusMenuSwitcherClickTests.swift)
  • Yuxin Qiao: Commit 2ff00f6d8e66ec5290fccc58a8abe65d795fecca recently changed ProviderSwitcherView layout and nearby switcher tests, making them relevant for routing and validation. (role: recent switcher UI contributor; confidence: medium; commits: 2ff00f6d8e66; files: Sources/CodexBar/StatusItemController+SwitcherViews.swift, Tests/CodexBarTests/StatusMenuSwitcherClickTests.swift)
  • anirudhvee: Beyond reporting this issue, Anirudh Venkatachalam authored commit 94d20eb2d95d769bd7f63a77e6b3644f26ed8639, which added menu keyboard shortcuts in adjacent menu code. (role: adjacent keyboard-shortcut contributor; confidence: medium; commits: 94d20eb2d95d; files: Sources/CodexBar/StatusItemController+Menu.swift, Tests/CodexBarTests/StatusMenuTests.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 May 26 '26 05:05 clawsweeper[bot]

@clawsweeper re-review

anirudhvee avatar May 26 '26 05:05 anirudhvee

🦞🧹 ClawSweeper re-review requested.

I asked ClawSweeper to review this item again. Action: item re-review queued (workflow sweep.yml, event repository_dispatch). Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

  • State: Complete
  • Detail: The targeted re-review finished, the durable review comment was updated, and the synced verdict was routed.
  • Run: https://github.com/openclaw/clawsweeper/actions/runs/26434719592
  • Updated: 2026-05-26T05:49:40.804Z

clawsweeper[bot] avatar May 26 '26 05:05 clawsweeper[bot]