Skip to content

feat(desktop): native macOS usage panel and release regression fixes - #5490

Merged
lidge-jun merged 15 commits into
devfrom
codex/fix-tray-scroll-corners
Sep 22, 2026
Merged

lidge-jun merged 15 commits into
devfrom
codex/fix-tray-scroll-corners

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the macOS usage popup with an AppKit panel hosting SwiftUI and Apple Liquid Glass. Native scrolling keeps controls reachable; the existing Tauri process retains tray and runtime ownership.
  • Align companion filtering, current-interval charts, nested model identifiers and tray/widget titles. Preserve the Windows/Linux web surface with a bounded inner scroll area.
  • Include regression fixes found while reviewing v2.59.0 through dev, with focused coverage and shared hosted test isolation. Known source-review findings are resolved; final all-platform hosted verification is still being tracked.

The native presentation follows the former companion mechanism from commit 38a5ab9 (#5196); it does not restore a second application or runtime owner.

Verification

  • The user explicitly prohibited further local tests and requested a no-verify push. The active local GUI suite was terminated. Final-candidate local checks: NOT RUN after that instruction.
  • Earlier scoped evidence is recorded in devlog/_plan/260922_native_tray_release/021_integration_verification.md and 031_verification.md; it is not a substitute for final exact-head hosted CI.
  • Hosted CI at 3d64bd3040b2da7953962da3c05be14f31991e56: PR CI, all-platform dispatch including Windows and macOS control, and service lifecycle PR CI and service lifecycle passed; the all-platform dispatch is still completing its final macOS jobs. Earlier failures are preserved in 031_verification.md and drove the follow-up fixes.
  • Sol read-only reviewers completed the assigned baseline review and accepted the follow-up source fixes. Security review covered updater lease delegation, release-resume source binding, CA publication, Desktop partial recovery, and rejected configuration mutations. No unresolved concrete source finding remains; this is technical review, not a separate maintainer approval or execution proof.
  • The user confirmed the installed native panel works. The image below is a native synthetic fixture captured before the final data-parity adjustments; it contains no account data and is not Windows compositor proof.

Native macOS usage panel with synthetic data

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Maintainer delivery decision: the repository owner explicitly authorized admin integration into dev after successful required exact-head CI, followed by preview and main stable deployment. This is maintainer integration, not an independent approval. Final merge remains gated on the recorded verification and unresolved review findings.

Summary by CodeRabbit

  • New Features

    • Added a native macOS usage panel with SwiftUI, charts, provider accounts, quotas, refresh controls, and Liquid Glass styling on supported systems.
    • Added the View → Show Usage menu item and keyboard shortcut.
    • Added hidden-provider and model filtering across usage totals, charts, quotas, menu-bar titles, and widgets.
  • Improvements

    • Charts now indicate when data is partial or incomplete.
    • Improved Claude Desktop switching and update recovery safety.
    • Added stronger release, signing, and runtime verification.
  • Documentation

    • Expanded guidance for native macOS usage, timeline filters, and partial data.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: b0335d47-a228-4df6-a4d1-65a7c78aebb6

📥 Commits

Reviewing files that changed from the base of the PR and between 39143fd and 3d64bd3.

⛔ Files ignored due to path filters (7)
  • devlog/_plan/260922_native_tray_release/evidence/native-glass-bottom.png is excluded by !**/*.png
  • devlog/_plan/260922_native_tray_release/evidence/native-glass-top.png is excluded by !**/*.png
  • devlog/_plan/260922_native_tray_release/evidence/native-panel-bottom.png is excluded by !**/*.png
  • devlog/_plan/260922_native_tray_release/evidence/native-panel-dark.png is excluded by !**/*.png
  • devlog/_plan/260922_native_tray_release/evidence/native-panel-light.png is excluded by !**/*.png
  • devlog/_plan/260922_native_tray_release/evidence/web-tray-opaque-bottom.png is excluded by !**/*.png
  • devlog/_plan/260922_native_tray_release/evidence/web-tray-vibrant-bottom.png is excluded by !**/*.png
📒 Files selected for processing (136)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • app/Package.swift
  • app/Sources/MenuBarCore/CompanionUsage.swift
  • app/Sources/MenuBarCore/MenuBarTitle.swift
  • app/Sources/MenuBarCore/ProxyClient.swift
  • app/Sources/MenuBarCore/ProxyModels.swift
  • app/Sources/MenuBarCore/ProxySnapshot.swift
  • app/Sources/MenuBarCore/UsageTimeline.swift
  • app/Sources/MenuBarCore/WidgetSnapshot.swift
  • app/Sources/MenuBarCoreTests/TransportSuite.swift
  • app/Sources/MenuBarCoreTests/WidgetSnapshotSuite.swift
  • app/Sources/NativeTray/Models.swift
  • app/Sources/NativeTray/Panel.swift
  • app/Sources/NativeTray/Popover.swift
  • app/Sources/NativeTray/Surface.swift
  • app/Sources/NativeTray/UsageSections.swift
  • app/Sources/NativeTray/UsageView.swift
  • app/Sources/NativeTrayTests/main.swift
  • app/Sources/OpenCodexWidget/Views.swift
  • desktop/README.md
  • desktop/scripts/build-local.ts
  • desktop/scripts/verify-macos-runtime.sh
  • desktop/src-tauri/Entitlements.plist
  • desktop/src-tauri/build.rs
  • desktop/src-tauri/src/companion_query.rs
  • desktop/src-tauri/src/companion_usage.rs
  • desktop/src-tauri/src/lib.rs
  • desktop/src-tauri/src/menu.rs
  • desktop/src-tauri/src/native_tray.rs
  • desktop/src-tauri/src/native_tray_accounts.rs
  • desktop/src-tauri/src/native_tray_data.rs
  • desktop/src-tauri/src/native_tray_snapshot.rs
  • desktop/src-tauri/src/proxy.rs
  • desktop/src-tauri/src/tray.rs
  • desktop/src-tauri/src/widget.rs
  • desktop/src-tauri/tauri.conf.json
  • devlog/_plan/260922_native_tray_release/000_plan.md
  • devlog/_plan/260922_native_tray_release/001_evidence.md
  • devlog/_plan/260922_native_tray_release/002_plan_review.md
  • devlog/_plan/260922_native_tray_release/010_native_presentation.md
  • devlog/_plan/260922_native_tray_release/011_presentation_verification.md
  • devlog/_plan/260922_native_tray_release/020_shell_integration.md
  • devlog/_plan/260922_native_tray_release/021_integration_verification.md
  • devlog/_plan/260922_native_tray_release/030_regression.md
  • devlog/_plan/260922_native_tray_release/031_verification.md
  • devlog/_plan/260922_native_tray_release/040_release.md
  • docs-site/src/content/docs/guides/claude-code.md
  • docs-site/src/content/docs/guides/desktop-app.md
  • docs-site/src/content/docs/guides/integrations.md
  • docs-site/src/content/docs/reference/management-api.md
  • gui/src/pages/Tray.tsx
  • gui/src/pages/tray-data.ts
  • gui/src/pages/tray.css
  • gui/src/pages/usage-companion-panel.tsx
  • gui/src/pages/usage-companion-utils.ts
  • gui/tests/claude-desktop-mode-picker.test.tsx
  • gui/tests/codex-account-pool-stale-refresh.test.tsx
  • gui/tests/tray-data.test.ts
  • gui/tests/usage-companion-utils.test.ts
  • scripts/ci/run-bun-test-batches.sh
  • scripts/test-layout/layout.json
  • scripts/test.ts
  • scripts/verify-release-resume.ts
  • src/claude/desktop-first-party.ts
  • src/claude/intercept/local-ca.ts
  • src/claude/intercept/runtime.ts
  • src/claude/intercept/settings.ts
  • src/cli/claude-desktop.ts
  • src/codex/model-cache.ts
  • src/companion/settings.ts
  • src/integrations/target.ts
  • src/providers/api-key-selection.ts
  • src/providers/model-rename-fields.ts
  • src/providers/model-rename-migration.ts
  • src/responses/inline-document.ts
  • src/router.ts
  • src/server/management/agent-settings-routes.ts
  • src/server/management/companion-routes.ts
  • src/server/management/native-integration-routes.ts
  • src/server/management/oauth-account-routes.ts
  • src/update/index.ts
  • src/update/ownership-transaction.ts
  • src/usage/ledger-retention.ts
  • src/usage/timeline.ts
  • structure/INDEX.md
  • structure/catalog.md
  • structure/clients/claude-desktop.md
  • structure/clients/integrations.md
  • structure/companion.md
  • structure/data-planes/inbound-compat.md
  • structure/desktop-shell.md
  • structure/gui-and-management-api.md
  • structure/manifest.json
  • structure/ops/docs-and-release.md
  • structure/overview.md
  • structure/providers-and-adapters.md
  • structure/runtime.md
  • tests/adapters/bridge-lifecycle.test.ts
  • tests/ci-workflows/ci-bun-crash-classifier.test.ts
  • tests/ci-workflows/ci-crash-disposition.test.ts
  • tests/ci-workflows/ci-workflows.test.ts
  • tests/ci-workflows/release-desktop-scripts.test.ts
  • tests/ci-workflows/release-resume-identity.test.ts
  • tests/ci-workflows/test-runner.test.ts
  • tests/claude-integration/claude-desktop-config-path.test.ts
  • tests/claude-integration/claude-desktop-first-party.test.ts
  • tests/claude-integration/claude-intercept-local-ca.test.ts
  • tests/claude-integration/claude-intercept-settings.test.ts
  • tests/claude-integration/claude-messages-endpoint.test.ts
  • tests/claude-integration/claude-models-discovery.test.ts
  • tests/cli/cli-status-json.test.ts
  • tests/clients/integrations-superseded-store.test.ts
  • tests/clients/remote-workspace-command-runner.test.ts
  • tests/codex-integration/codex-service-manager-probe-hardening.test.ts
  • tests/codex-integration/codex-shim-destroyed-probe.test.ts
  • tests/codex-integration/native-profile-crash-boundaries.test.ts
  • tests/fixtures/provider-outbound-e2e.ts
  • tests/fixtures/test-layout-expected.json
  • tests/helpers/abortable-sse-upstream.ts
  • tests/helpers/status-stale-observation.ts
  • tests/helpers/timeout-gated-error-body.ts
  • tests/helpers/update-bun-ownership-child.ts
  • tests/providers/api-key-catalog-authority.test.ts
  • tests/providers/model-rename-migration.test.ts
  • tests/providers/provider-outbound.test.ts
  • tests/responses/chat-inline-document-bytes.test.ts
  • tests/server/api-keys-routes.test.ts
  • tests/server/companion-settings.test.ts
  • tests/server/server-auth.test.ts
  • tests/server/server-management-auth.test.ts
  • tests/server/server-request-body-size.test.ts
  • tests/update/update-bun-ownership-lease.test.ts
  • tests/usage/usage-ledger-retention.test.ts
  • tests/usage/usage-timeline.test.ts
  • tests/vision/vision-routed.test.ts
 _______________________________________
< Goodbye, 3-hour code review sessions. >
 ---------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Sep 22, 2026
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 58 / 80

이 PR은 맥 트레이의 사용량 창을 웹뷰 대신, 지금 돌아가는 Tauri 프로세스 안의 AppKit 패널(SwiftUI)로 바꿉니다. 네트워크와 계정 정보는 러스트가 읽고, 스위프트에는 보여 주기용 JSON만 넘깁니다. 윈도·리눅스는 예전 웹 팝업을 유지하되 안쪽만 스크롤되게 맞춥니다. 같은 필터 규칙이 트레이 제목, 위젯, 웹 컴패니언에도 쓰이게 맞춰져 있습니다. 베이스는 dev가 맞습니다.

여기에 업데이트 소유권 임대(src/update/), 모델 이름 바꾸기 필드 표, 타임라인에 숨긴 공급자 전달, CI에서 혼자 도는 테스트 분리 같은 회귀 수정도 같이 들어 있습니다. 초안이고, 작성자가 최종 로컬 검사는 돌리지 않았다고 적어 두었습니다. 호스트 CI의 test 2/4는 지금 빨간 상태입니다.

tests/clients/remote-workspace-command-runner.test.ts - 가짜 bwrap을 테스트 폴더 안에 만들고 0o700으로 열었습니다. 그런데 실제 검사(src/remote-control/workspace-command-runner.tstrustedBubblewrap)는 파일뿐 아니라 부모 폴더도 다른 사람이 쓸 수 있으면 막습니다. 깃허브 러너에서는 그 부모가 자주 열려 있어서, 예전처럼 process.execPath를 쓰던 때는 통과하던 두 테스트가 먼저 "group or world writable"로 떨어지고, "remain a real directory" 검사까지 가지 못합니다. 이 PR이 바꾼 픽스처가 test 2/4를 막고 있습니다.

desktop/src-tauri/src/native_tray_snapshot.rsdisplay_settings - 설정 읽기에 실패하면 showToday·showChart·showModels는 꺼지는데 showAccounts만 기본이 켜집니다. 그 결과 오늘은 "설정을 못 읽었다"고 나오면서 계정 구간만 따로 불러옵니다. 일부러라면 괜찮지만, 지금 화면은 한쪽으로만 살아 있어 헷갈립니다.

desktop/src-tauri/build.rsdesktop/scripts/verify-macos-runtime.sh - 릴리스·번들 검사는 NSGlassEffectView(Liquid Glass) 심볼이 반드시 있어야 합니다. 실행 때는 macOS 26 미만에서 예전 재질로 떨어지지만, 빌드 도구는 Xcode 26급이 아니면 릴리스 게이트를 통과하지 못합니다. CI 맥 러너와 서명 파이프라인이 그 버전인지가 합치기 전 조건입니다.

메인테이너의 판단이 필요한 지점

네이티브 트레이와 업데이트·모델 이름·CI 격리·문서가 한 PR에 묶여 있습니다. 초안 설명도 소스 리뷰·exact-head CI가 남아 있다고 합니다. 트레이만 먼저 나눌지, 회귀 묶음을 그대로 갈지 정해 주세요. allow-jit 권한은 번들 Bun 때문에 들어가며 검사 스크립트가 그 사전을 고정합니다. 이 권한 범위를 릴리스에서 그대로 받을지 확인해 주세요. 설정에 30일 표시를 끄는 칸은 없고, 설정만 읽히면 30일 칸은 항상 나옵니다. 그게 의도인지 확인해 주세요.

너의 추천

초안인 채로 두세요. 먼저 privateBubblewrapFixture를 쓰기 금지 검사가 통과하는 위치(또는 검사 우회가 허용된 테스트 전용 경로)에 두고 test 2/4를 초록으로 만든 뒤, 설정 실패 시 showAccounts 기본값과 Liquid Glass 빌드 도구 요구를 문서·CI에 한 줄로 고정하세요. 네이티브 패널의 소유권 분리(스위프트는 표시만) 방향은 유지해도 됩니다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun
lidge-jun marked this pull request as ready for review September 22, 2026 09:06
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 22, 2026 09:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-22T09:18:18.897464Z 3d64bd3 Draft marked ready
ℹ️ 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: 3d64bd3040

ℹ️ 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".

Comment thread src/server/management/agent-settings-routes.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant