Skip to content

Add portable Linux desktop with separate windows and shared Omarchy backend - #3573

Merged
steipete merged 2 commits into
mainfrom
feat/linux-desktop
Sep 12, 2026
Merged

Add portable Linux desktop with separate windows and shared Omarchy backend#3573
steipete merged 2 commits into
mainfrom
feat/linux-desktop

Conversation

@steipete

@steipete steipete commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Omarchy's popup currently owns fetching, settings, spending and notifications. This moves those responsibilities into one portable Qt 6 desktop process, with separate Usage & Spend and Settings windows. The compact Omarchy adapter reads its private IPC snapshot and opens the existing windows; multiple monitors no longer run separate provider polls.

Settings are grouped into General, Providers and Advanced. Compact cards wrap long labels, provider names use readable capitalization, and the app menu keeps secondary actions out of the header. Optional refresh-on-open follows the Mac preference; Refresh and Ctrl+R operate on the selected Usage or Spending tab. Integrations/Linux/MAC_COMPARISON.md records remaining Mac feature gaps.

The desktop provides an optional standard Linux tray, launcher actions, login autostart, clipboard support and D-Bus notifications. It reuses the existing JavaScript usage/notification models and Swift CLI, preserves stale data on failures, rejects old in-flight responses after selection changes, and persists settings atomically. The installer migrates existing widget preferences and backs up the old integration. No provider authentication implementation changes.

Stacked on #3571 (following #3569 and #3570). This is the portable desktop foundation; it does not claim complete macOS feature parity or verified KDE/GNOME behavior. Linux dependencies and install/uninstall instructions are in Integrations/Linux/README.md.

Validation:

  • Qt 6.11.2 build with qmake6 and make: passed.
  • 14 shared model tests and 2 isolated installer tests: passed.
  • 8 isolated runtime tests: passed offscreen and repeated successfully with X11/XWayland. Covers one-process reuse, private identity-free IPC, settings validation, malformed config preservation, stale data, selection races, window opening, local spending, refresh-on-open and retention of spending after failure.
  • Installed/restarted the freshly built binary on Omarchy; visually checked native settings/spending windows on Wayland and the compact shell popup. Local screenshots: /tmp/codexbar-linux-settings.png and /tmp/codexbar-linux-spending.png (not uploaded because they contain live account spending).
  • Omarchy plugin validation and git diff --check: passed.
  • Added Ubuntu Qt build/runtime coverage to the integration workflow.
  • Required make test cannot run: Swift is absent. Required make check stops at missing macOS plutil. No Swift sources changed.

@clawsweeper

clawsweeper Bot commented Sep 12, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed September 11, 2026, 11:16 PM ET / September 12, 2026, 03:16 UTC (Revision 2).

ClawSweeper review

What this changes

Adds a Qt Linux desktop for usage, spending, and settings, and converts the Omarchy widget into an adapter sharing its background process.

Merge readiness

Blocked before merge - 5 items remain

This owner-sponsored feature remains useful and is not implemented on the fetched main branch. All three previously reported defects remain unresolved at the reviewed head.

Priority: P2
Reviewed head: 7eb3fabf58a38d612331955f60259973d53906d0

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The shared backend is coherent and scoped, but three concrete defects still prevent landing.
Proof confidence 🌊 off-meta tidepool Not applicable: The OWNER-authored PR is exempt from the external proof gate. Its body reports fresh-binary Wayland checks of the desktop and Omarchy adapter; inspected fake-CLI runtime tests provide supplemental coverage, but do not establish the remaining repair scenarios.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The OWNER-authored PR is exempt from the external proof gate. Its body reports fresh-binary Wayland checks of the desktop and Omarchy adapter; inspected fake-CLI runtime tests provide supplemental coverage, but do not establish the remaining repair scenarios.
Evidence reviewed 9 items Policy and review scope: Read the complete root AGENTS.md; no nested AGENTS.md or maintainer-notes directory was found. Applied provider isolation, preference preservation, and focused validation guidance. Builds and tests were not executed under the read-only review contract.
Prior findings remain unresolved: The supplied previous review identified tray preference overwrite, spending disappearance after settings saves, and missing anonymous account numbers. Inspection of current source and the pinned follow-up commit confirms none was repaired; the follow-up primarily changes layout, refresh behavior, and supplemental tests. The local historical content diff encountered an unavailable object; the GitHub commit endpoint supplied the follow-up patches.
Persisted tray setting overwritten: The installer loads existing linux.json preferences, then unconditionally assigns showTray=false whenever --omarchy is supplied. The reinstall test never customizes showTray between installations.
Findings 3 actionable findings [P1] Preserve the saved tray preference during reinstallation
[P2] Restore spending data after saving settings
[P2] Retain anonymous account numbers in multi-account cards
Security None None.

How this fits together

The Linux desktop runs the existing Swift CLI to obtain provider usage and local spending, then renders windows and desktop notifications. Omarchy reads a private local snapshot instead of running separate provider polls.

flowchart LR
  A[Saved preferences] --> B[Linux desktop backend]
  B --> C[Swift CLI]
  C --> D[Usage and spending models]
  D --> E[Desktop windows and notifications]
  D --> F[Private local snapshot]
  F --> G[Omarchy widget]
Loading

Before merge

  • Preserve the saved tray preference during reinstallation (P1) - This prior finding remains unresolved. If a user enables the tray in Settings and reruns the installer with --omarchy, this assignment overwrites persisted showTray: true, hiding the tray on the next launch. Apply the false default only when the setting is absent and cover a customized reinstall.
  • Restore spending data after saving settings (P2) - This prior finding remains unresolved. With Spending loaded and its scan complete, saving any setting clears m_spending, but only usage is refreshed. The open Spending view becomes empty and stays empty until the user manually refreshes or reopens it; the polling timer cannot restore it. Preserve unaffected spending or arrange a replacement scan when invalidating it.
  • Retain anonymous account numbers in multi-account cards (P2) - This prior finding remains unresolved. With All accounts enabled and identity hidden, the model deliberately leaves accountLabel empty, so every card for the same provider loses its account identifier. Render the existing anonymous accountNumber as a fallback so users can distinguish accounts without revealing email addresses.
  • Resolve merge risk (P1) - Reinstalling with --omarchy silently hides a tray that the user explicitly enabled; customized upgrade behavior is not covered by the installer tests.
  • Complete next step (P2) - Resolve the three retained findings and add focused coverage for customized reinstalls, spending after settings saves, and anonymous multi-account labels.

Findings

  • [P1] Preserve the saved tray preference during reinstallation — Integrations/Linux/install.py:74-75
  • [P2] Restore spending data after saving settings — Integrations/Linux/DesktopController.cpp:128-131
  • [P2] Retain anonymous account numbers in multi-account cards — Integrations/Linux/qml/UsageCard.qml:22-24
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test growth Production net +634 lines; tests net +177 lines Production includes integration code, build resources, and assets; the growth supports the stated portable desktop foundation.
Review continuity 3 prior findings remain The follow-up commit does not resolve any of the previously identified defects.

Merge-risk options

Maintainer options:

  1. Preserve customized reinstall settings (recommended)
    Apply the Omarchy tray default only when no saved value exists, and verify both fresh installation and customized reinstallation.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Preserve explicit showTray values during Omarchy reinstallation and add isolated regression coverage for fresh defaults and customized reinstalls.

Technical review

Best possible solution:

Keep the shared desktop backend while preserving saved preferences, retaining or restoring spending after settings changes, and distinguishing accounts without exposing identity.

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

Yes, source establishes the three patch defects: reinstall after enabling the tray, save settings with Spending already loaded, and display multiple accounts with identity hidden. These scenarios were not executed during this read-only review.

Is this the best way to solve the issue?

Yes, sharing the existing CLI-backed models through one desktop process fits the owner-approved direction; the remaining defects have narrow repairs that preserve that architecture.

Full review comments:

  • [P1] Preserve the saved tray preference during reinstallation — Integrations/Linux/install.py:74-75
    This prior finding remains unresolved. If a user enables the tray in Settings and reruns the installer with --omarchy, this assignment overwrites persisted showTray: true, hiding the tray on the next launch. Apply the false default only when the setting is absent and cover a customized reinstall.
    Confidence: 0.99
  • [P2] Restore spending data after saving settings — Integrations/Linux/DesktopController.cpp:128-131
    This prior finding remains unresolved. With Spending loaded and its scan complete, saving any setting clears m_spending, but only usage is refreshed. The open Spending view becomes empty and stays empty until the user manually refreshes or reopens it; the polling timer cannot restore it. Preserve unaffected spending or arrange a replacement scan when invalidating it.
    Confidence: 0.99
  • [P2] Retain anonymous account numbers in multi-account cards — Integrations/Linux/qml/UsageCard.qml:22-24
    This prior finding remains unresolved. With All accounts enabled and identity hidden, the model deliberately leaves accountLabel empty, so every card for the same provider loses its account identifier. Render the existing anonymous accountNumber as a fallback so users can distinguish accounts without revealing email addresses.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 069c36af7bde.

Labels

Label justifications:

  • P2: This is a bounded Linux desktop improvement with preference and display defects, without evidence of an urgent shipped outage.
  • merge-risk: 🚨 compatibility: The installer can replace an existing user's explicit tray preference during reinstallation.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The OWNER-authored PR is exempt from the external proof gate. Its body reports fresh-binary Wayland checks of the desktop and Omarchy adapter; inspected fake-CLI runtime tests provide supplemental coverage, but do not establish the remaining repair scenarios.

Evidence

Acceptance criteria:

  • [P1] node --test Integrations/Omarchy/test.mjs Integrations/Omarchy/notifications.test.mjs.
  • [P1] python3 Integrations/Omarchy/test_install.py.
  • [P1] qmake6 ../../Integrations/Linux/codexbar-linux.pro.
  • [P1] make -C .local/linux-build -j2.
  • [P1] python3 Integrations/Linux/tests/test_desktop.py.

What I checked:

  • Policy and review scope: Read the complete root AGENTS.md; no nested AGENTS.md or maintainer-notes directory was found. Applied provider isolation, preference preservation, and focused validation guidance. Builds and tests were not executed under the read-only review contract. (AGENTS.md:1, 7eb3fabf58a3)
  • Prior findings remain unresolved: The supplied previous review identified tray preference overwrite, spending disappearance after settings saves, and missing anonymous account numbers. Inspection of current source and the pinned follow-up commit confirms none was repaired; the follow-up primarily changes layout, refresh behavior, and supplemental tests. The local historical content diff encountered an unavailable object; the GitHub commit endpoint supplied the follow-up patches. (7eb3fabf58a3)
  • Persisted tray setting overwritten: The installer loads existing linux.json preferences, then unconditionally assigns showTray=false whenever --omarchy is supplied. The reinstall test never customizes showTray between installations. (Integrations/Linux/install.py:74, 7eb3fabf58a3)
  • Settings save clears spending without restoring it: saveSettings clears spending and its update timestamp but calls only refresh(), which fetches usage. The periodic timer also refreshes only usage; an already-open Spending tab does not request another scan on settingsChanged. (Integrations/Linux/DesktopController.cpp:128, 7eb3fabf58a3)
  • Anonymous account identifier omitted: The shared usage model supplies accountNumber even when identity is hidden, but UsageCard renders only accountLabel and hides the label when empty. Multiple accounts for the same provider therefore have no distinguishing account identifier. (Integrations/Linux/qml/UsageCard.qml:23, 7eb3fabf58a3)
  • Main and release necessity check: The fetched main tree has no Integrations/Linux directory and its Omarchy README describes the standalone widget. The v0.59.0 tree has no Integrations directory. The supplied merged Add native Omarchy usage widget #3568 establishes the earlier widget, not this portable desktop. (Integrations/Omarchy/README.md:3, 069c36af7bde)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Preserve explicit tray preferences and test fresh installation plus customized reinstallation.
  • Ensure settings saves retain or automatically restore an already-open spending view.
  • Restore anonymous account numbering for identity-hidden multi-account cards.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-12T03:07:00.820Z sha c47f6eb :: blocked before merge. :: [P1] Preserve the saved tray preference during reinstallation | [P2] Restore spending data after saving settings | [P2] Retain anonymous account numbers in multi-account cards

@steipete
steipete changed the base branch from feat/omarchy-notifications to main September 12, 2026 03:30
@steipete
steipete merged commit fd49d93 into main Sep 12, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant