Skip to content

feat(desktop): land the desktop application stack on dev - #5318

Merged
lidge-jun merged 1 commit into
devfrom
codex/260920-desktop-app-stack
Sep 20, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/260920-desktop-app-stack

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Verification

  • The consolidation is the tree difference of the stack tip against the point the chain branched from, applied to current dev; only one file conflicted. src/server/responses/codex-ws-wire.ts had an import collision where dev added the request-failure model types and the desktop branch replaced readFileSync with packageVersion. Both intents are kept: the type import stays and packageVersion replaces the now-unused readFileSync, which no longer appears in the file.
  • Local suites, typecheck, builds and installs were not run in this lane; exact-head hosted CI on this pull request is the execution evidence.

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.

Consolidates the desktop stack that was carried as a GitHub native stack on top
of the macOS menu bar companion. #5196 landed as 38a5ab9 by squash, which
detached every child in the chain from its base, so the remaining work is
applied here as one branch against the current dev instead of replayed through
bases that no longer exist.

Carries the standalone binary, the Tauri v2 cross-platform tray and webview
shell, the GUI desktop shell integration, the WidgetKit appex bundle, and the
signed desktop packaging for DMG, MSI, AppImage and deb.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 20, 2026 11:11
@lidge-jun
lidge-jun merged commit 2ff7f33 into dev Sep 20, 2026
12 of 13 checks passed
@lidge-jun
lidge-jun deleted the codex/260920-desktop-app-stack branch September 20, 2026 11:12
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 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-20T11:16:58.830672Z 22175d9 PR opened
ℹ️ 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.

@github-actions github-actions Bot added the enhancement New feature or request label Sep 20, 2026
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

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: a3f4a91a-3f55-4529-8f0e-52525b8415ad

📥 Commits

Reviewing files that changed from the base of the PR and between 38a5ab9 and 22175d9.

⛔ Files ignored due to path filters (18)
  • desktop/src-tauri/Cargo.lock is excluded by !**/*.lock
  • desktop/src-tauri/icons/128x128.png is excluded by !**/*.png
  • desktop/src-tauri/icons/128x128@2x.png is excluded by !**/*.png
  • desktop/src-tauri/icons/32x32.png is excluded by !**/*.png
  • desktop/src-tauri/icons/64x64.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square107x107Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square142x142Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square150x150Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square284x284Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square30x30Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square310x310Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square44x44Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square71x71Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/Square89x89Logo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/StoreLogo.png is excluded by !**/*.png
  • desktop/src-tauri/icons/icon.ico is excluded by !**/*.ico
  • desktop/src-tauri/icons/icon.png is excluded by !**/*.png
  • desktop/src-tauri/icons/tray/icon.png is excluded by !**/*.png
📒 Files selected for processing (143)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .gitignore
  • AGENTS.md
  • README.md
  • app/Info.plist
  • app/Package.swift
  • app/Sources/IconProbe/main.swift
  • app/Sources/MenuBarApp/main.swift
  • app/Sources/MenuBarCore/Discovery.swift
  • app/Sources/MenuBarCore/PollingCoordinator.swift
  • app/Sources/MenuBarCore/ProxyClient.swift
  • app/Sources/MenuBarCore/WidgetSnapshot.swift
  • app/Sources/MenuBarCoreTests/TransportSuite.swift
  • app/Sources/MenuBarUI/AppDelegate.swift
  • app/Sources/MenuBarUI/CompanionViews.swift
  • app/Sources/MenuBarUI/PopoverPanel.swift
  • app/Sources/MenuBarUI/PopoverViewController.swift
  • app/Sources/MenuBarUI/ProviderListView.swift
  • app/Sources/MenuBarUI/StatusIcon.swift
  • app/Sources/MenuBarUI/Theme.swift
  • app/Sources/MenuBarUI/TimelineChartView.swift
  • app/Sources/MenuBarUI/Views.swift
  • app/Sources/MenuBarUITests/Harness.swift
  • app/Sources/MenuBarUITests/main.swift
  • app/Sources/OpenCodexWidget/Views.swift
  • app/Sources/UIProbe/main.swift
  • app/Widget-Info.plist
  • desktop/README.md
  • desktop/package.json
  • desktop/scripts/build-widget.sh
  • desktop/scripts/collect-release-assets.ts
  • desktop/scripts/prepare-sidecar.ts
  • desktop/scripts/updater-manifest.ts
  • desktop/src-tauri/Cargo.toml
  • desktop/src-tauri/build.rs
  • desktop/src-tauri/capabilities/default.json
  • desktop/src-tauri/icons/icon.icns
  • desktop/src-tauri/src/auth.rs
  • desktop/src-tauri/src/discovery.rs
  • desktop/src-tauri/src/formatting.rs
  • desktop/src-tauri/src/lib.rs
  • desktop/src-tauri/src/logging.rs
  • desktop/src-tauri/src/main.rs
  • desktop/src-tauri/src/proxy.rs
  • desktop/src-tauri/src/sidecar.rs
  • desktop/src-tauri/src/tray.rs
  • desktop/src-tauri/src/updater.rs
  • desktop/src-tauri/src/widget.rs
  • desktop/src-tauri/src/window.rs
  • desktop/src-tauri/tauri.conf.json
  • desktop/ui/index.html
  • desktop/ui/main.js
  • docs-site/astro.config.mjs
  • docs-site/src/content/docs/fr/reference/cli/lifecycle.md
  • docs-site/src/content/docs/getting-started/installation.md
  • docs-site/src/content/docs/getting-started/quickstart.md
  • docs-site/src/content/docs/guides/desktop-app.md
  • docs-site/src/content/docs/guides/macos-menu-bar.md
  • docs-site/src/content/docs/ja/getting-started/installation.md
  • docs-site/src/content/docs/ja/getting-started/quickstart.md
  • docs-site/src/content/docs/ja/guides/macos-menu-bar.md
  • docs-site/src/content/docs/ja/reference/cli/lifecycle.md
  • docs-site/src/content/docs/ko/getting-started/installation.md
  • docs-site/src/content/docs/ko/getting-started/quickstart.md
  • docs-site/src/content/docs/ko/guides/macos-menu-bar.md
  • docs-site/src/content/docs/ko/reference/cli/lifecycle.md
  • docs-site/src/content/docs/reference/cli/lifecycle.md
  • docs-site/src/content/docs/ru/getting-started/installation.md
  • docs-site/src/content/docs/ru/getting-started/quickstart.md
  • docs-site/src/content/docs/ru/guides/macos-menu-bar.md
  • docs-site/src/content/docs/ru/reference/cli/lifecycle.md
  • docs-site/src/content/docs/tr/reference/cli/lifecycle.md
  • docs-site/src/content/docs/zh-cn/getting-started/installation.md
  • docs-site/src/content/docs/zh-cn/getting-started/quickstart.md
  • docs-site/src/content/docs/zh-cn/guides/macos-menu-bar.md
  • docs-site/src/content/docs/zh-cn/reference/cli/lifecycle.md
  • docs-site/src/content/docs/zh-tw/reference/cli/lifecycle.md
  • gui/src/App.tsx
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/fr.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/tr.ts
  • gui/src/i18n/vi.ts
  • gui/src/i18n/zh-TW.ts
  • gui/src/i18n/zh.ts
  • gui/src/lib/desktop-shell.ts
  • gui/src/pages/usage-companion-panel.tsx
  • gui/src/pages/usage-companion-utils.ts
  • gui/tests/desktop-shell.test.ts
  • package.json
  • readme/README.fr.md
  • readme/README.ja.md
  • readme/README.ko.md
  • readme/README.ru.md
  • readme/README.tr.md
  • readme/README.zh-CN.md
  • readme/README.zh-TW.md
  • readme/i18n-manifest.json
  • scripts/build-macos-app.sh
  • scripts/build-standalone.ts
  • scripts/package-macos-release.sh
  • scripts/test-layout/layout.json
  • src/cli/help.ts
  • src/cli/registry.ts
  • src/client/machine-listener.ts
  • src/lib/bun-runtime.ts
  • src/lib/package-tree-integrity.ts
  • src/lib/package-version.ts
  • src/lib/standalone.ts
  • src/lib/winsw.ts
  • src/server/gui-static.ts
  • src/server/management-api.ts
  • src/server/management/companion-routes.ts
  • src/server/management/route-registry.ts
  • src/server/responses/codex-ws-wire.ts
  • src/service/health.ts
  • src/service/launchd.ts
  • src/service/state.ts
  • src/service/windows-taskxml.ts
  • src/tray/windows-tray.ps1
  • src/update/index.ts
  • structure/INDEX.md
  • structure/desktop-shell.md
  • structure/gui-and-management-api.md
  • structure/manifest.json
  • structure/ops/docs-and-release.md
  • structure/ops/service-and-sidecars.md
  • structure/overview.md
  • tests/ci-workflows/ci-structure-gate.test.ts
  • tests/ci-workflows/ci-workflows.test.ts
  • tests/ci-workflows/release-desktop-scripts.test.ts
  • tests/fixtures/test-layout-expected.json
  • tests/gui/gui-desktop-sidecar-script.test.ts
  • tests/gui/gui-static.test.ts
  • tests/gui/macos-build-script.test.ts
  • tests/gui/standalone-build-script.test.ts
  • tests/lib/standalone.test.ts
  • tests/server/companion-settings.test.ts
  • tests/service/standalone-service.test.ts
 _________________________________________________________________________________________
< If you don't make mistakes, you're not working on hard enough problems. - Frank Wilczek >
 -----------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( 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

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • UI screenshot required.

What to do

  • Add a screenshot of the UI change to the PR description.

Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required enforce-target check will keep failing until every issue above is resolved.

@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: 22175d9c39

ℹ️ 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 on lines +159 to +160
if [[ "$RUNNER_OS" == "Windows" ]]; then sha256sum "dist/ocx-${RELEASE_VERSION}-${STANDALONE_TARGET}.zip" > "dist/ocx-${RELEASE_VERSION}-${STANDALONE_TARGET}.sha256"
else sha256sum "dist/ocx-${RELEASE_VERSION}-${STANDALONE_TARGET}.tar.gz" > "dist/ocx-${RELEASE_VERSION}-${STANDALONE_TARGET}.sha256"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Generate standalone checksums with release-local paths

These commands hash dist/ocx-..., so each checksum records a filename beginning with dist/. The attachment job later downloads the files into dist/release, changes into that directory, and runs shasum -c; it therefore looks for dist/release/dist/ocx-..., fails before gh release upload, and leaves every non-dry-run release without the new assets. Generate the checksum after changing into dist, or otherwise record only the artifact basename.

Useful? React with 👍 / 👎.

Comment on lines +214 to +217
- name: Setup Rust
uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # master
with:
toolchain: stable

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Install both Rust targets before the universal macOS build

The Rust setup installs only the runner's host target, but the macOS matrix later invokes tauri build --target universal-apple-darwin, which compiles both aarch64-apple-darwin and x86_64-apple-darwin. On a fresh hosted runner, the non-host standard library is absent, so the macOS packaging leg fails instead of producing the DMG and updater archive; configure the toolchain action with both targets (or add them explicitly) before the build.

AGENTS.md reference: .github/AGENTS.md:L18-L18

Useful? React with 👍 / 👎.

Comment on lines 29 to +30
export async function handleCompanionRoutes(ctx: ManagementContext): Promise<Response | null> {
if (ctx.url.pathname === "/api/companion/open-in-browser" && ctx.req.method === "POST") {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require a GUI session before opening the host browser

This new route is registered as session-only, but the handler never checks ctx.principal; in fact, its added test calls it as admin-token and expects success. Consequently, any caller holding the management token—including a remote administrator—can make the proxy host launch browser windows, contrary to the declared dashboard-only boundary. Reject non-gui-session principals before parsing or opening the URL, as the other session-only handlers do.

Useful? React with 👍 / 👎.

Comment on lines +49 to +52
let rendered = format!("{scaled:.decimals$}");
return format!(
"{}{}",
rendered.trim_end_matches('0').trim_end_matches('.'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve integer trailing zeroes when abbreviating values

When decimals is zero, rendered has no decimal fraction, yet trim_end_matches('0') still removes significant integer zeroes. For example, 100,000 tokens becomes "100" and is rendered as 1K, while 500,000 becomes 5K; the same corruption affects count and high-cost tray/widget metrics. Only trim zeroes from a fractional portion, or skip trimming entirely when decimals == 0.

Useful? React with 👍 / 👎.

Comment on lines +45 to +47
pub async fn usage_summary(&self) -> Result<Value, ProxyError> {
self.get("/api/usage?range=7d").await
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use today's usage range for the tray headline

usage_summary is used exclusively by the tray-title refresh, but it requests seven days of usage. The default tokens headline—and the requests, cost, and template fields—therefore displays seven-day totals rather than today's totals, unlike the legacy companion and the documented desktop/widget behavior. Point this request at range=today (or reuse usage_today) so the tray metric matches its intended period.

Useful? React with 👍 / 👎.

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.

2 participants