Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
⏳ DRAFT
What to do
Review readiness checklist
1/4 boxes ticked. This PR stays in draft until every box above is ticked. Hygiene✅ Deterministic PR hygiene checks passed. |
|
사용량 쪽에 통합으로 설계부탁드립니다 아니면 제가 넣어보겠습니다 |
|
@coderabbitai review |
|
|
GOAT |
리뷰 · 우선순위 72 / 80이 PR은 맥 메뉴 막대에 OpenCodex 오늘 사용량을 붙입니다. 요청 수, 토큰 그래프, Codex 잔여량, OpenCode Go 잔여량을 보여 줍니다. 모니터만 끄면 프록시는 그대로 돕니다. 설정 칸은 사용량 페이지에서 Coverage 다음에 있습니다. 유지자가 말한 사용량 통합입니다. 그 칸은 최신 커밋 base는 모니터는 라인 native/menubar/main.swift 라인 gui/src/i18n/de.ts 9행 라인 native/menubar/main.swift 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
478a73b to
6fabe14
Compare
추가 리뷰 · 우선순위 72 / 80지난 리뷰의 맨 위 커밋은 옮긴 일은 아래쪽 그 다음에 라인 native/menubar/main.swift 라인 native/menubar/main.swift 라인 gui/src/i18n/de.ts 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
|
Thank you for this, @JayYun98 — the CodexBar-style monitor work is being carried forward in #5196, which integrates it with the maintainer companion on Closing this PR as superseded by #5196. Since the head of this PR lives on your fork and cannot be pushed to by maintainers, if you'd like to keep contributing to this feature please push follow-up commits to |

Summary
A CodexBar-inspired menu bar for the traffic OpenCodex routes.
I use both OpenCodex and CodexBar. CodexBar made checking usage from the menu bar a habit. Once I started routing more of my work through OpenCodex, I wanted that same quick glance at OpenCodex’s own requests, tokens, and account limits.
This adds an optional native macOS companion and settings integrated into the existing Usage page. Click the menu-bar counter to see today’s usage, a token-history chart, and remaining account limits. Open the dashboard when you want to change what appears. Quitting the companion leaves the proxy running.
CodexBar is the inspiration for the menu-bar workflow, not a dependency or an official integration. No CodexBar source is copied. The native companion uses AppKit, SwiftUI, and Swift Charts without third-party Swift dependencies.
Screenshots
Updated Usage integration, after Coverage breakdown. Captured from the current local GUI using read-only usage snapshots; personal identifiers were replaced before rendering.
Earlier prototype views:
Local macOS prototype, running alongside OpenCodex 2.46.0. The PR changes have separately been ported to
dev. Email and the personal account label are redacted before capture; usage values are unchanged.Scope of this draft
The companion currently requires macOS 14+, a local proxy on port 10100, and a loopback bridge on port 10101. Build it with
sh native/menubar/build.sh; there is no installer or login item. The native menu supports English and Korean, with a system-language default and a menu language selector. Built-in summary templates follow that choice; custom templates are preserved. The dashboard uses its existing locale catalogs, with English fallbacks for some new strings.The monitor reads existing usage history and cached Codex quotas. OpenCode Go uses a fixed read-only usage endpoint. It does not change routing, select accounts, or initiate login. The loopback bridge exposes display data and monitor configuration, never provider keys or account tokens; writes are origin-checked and revision-checked. Account email remains private display data in local snapshots, which is why it is redacted in these screenshots. This does not isolate mutually untrusted processes running as the same OS user.
I would welcome maintainer feedback on keeping the companion in-tree and the local bridge boundary before broadening platform, port, or packaging support.
Verification
The branch is based on
devatf117c20d1244bf20d8cf5bd35de5bb7c71003799. Typecheck, GUI tests, lint, and build were rerun after updating the base. Earlier checks below were run on3d5efc72554505c581b3af2a68d108e9221f14b7; native language checks were run after adding English support.bun run typecheckand the CI-specific TypeScript checks pass.cd gui && bun test --isolate tests— 2,189 tests pass on the updated base, including the template-row regression check.cd gui && bun run lintandbun run buildpass.origin/dev— no issues found.cd docs-site && bun install --frozen-lockfile && bun run buildpasses (465 pages).bun run structure:check,bun run privacy:scan,bun run skill:surface:check, andgit diff --checkpass.cd native/menubar && sh build.sh— native build and data/config/HTTP self-checks pass, including language selection, English fallback, legacy default migration, and custom-template preservation.OpenCodexMonitor --probe— read-only check against the existing local proxy passes.The earlier full backend run on
3d5efc72554505c581b3af2a68d108e9221f14b7completed with 27,021 passing tests, 5 failures, and 57 skipped tests, including the runner’s serial lanes. Those five failures were also reproduced in an untouched worktree of that same upstream commit: the Windows spill-queue timeout, preferred-runtime fallback probe, missing-version runtime selection, and two Linux sandbox executable checks on this Mac. The full backend suite has not been rerun after the final base update, so these are historical results, not an assertion about the new base. The local-CI readiness box stays unchecked; upstream CI and Codex/CodeRabbit review are still pending.The local prototype was also checked in the browser: tab navigation, configuration saves, graph regrouping, and collapsed JSON settings. The PR worktree has not replaced the running proxy or installed companion.
Checklist
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
Documentation
Tests