Skip to content

Feat: Add Windows support while preserving macOS behavior#457

Open
Luciano16-gif wants to merge 17 commits into
robinebers:mainfrom
Luciano16-gif:feat/windows-port-with-mac-compatibility
Open

Feat: Add Windows support while preserving macOS behavior#457
Luciano16-gif wants to merge 17 commits into
robinebers:mainfrom
Luciano16-gif:feat/windows-port-with-mac-compatibility

Conversation

@Luciano16-gif
Copy link
Copy Markdown

@Luciano16-gif Luciano16-gif commented May 10, 2026

Description

Adds Windows support while preserving the existing macOS behavior as much as possible.

This PR introduces platform-specific panel/tray implementations so macOS can continue using the existing NSPanel-based flow, while Windows uses a standard hidden Tauri window with its own tray behavior. It also adds Windows provider path handling, Windows-friendly process/command behavior, NSIS Windows bundling, and release workflow support for Windows updater artifacts.

The goal is to make OpenUsage usable for Windows users without changing the macOS user experience.

Type of Change

  • Bug fix
  • New feature
  • New provider plugin
  • Documentation
  • Performance improvement
  • Other (describe below)

Testing

  • I ran bun run build and it succeeded
  • I ran bun run test and all tests pass
  • I tested the change locally with bun tauri dev

Additional testing:

  • Tested locally on Windows with Codex, Antigravity, and Copilot.
  • macOS was smoke-tested by another user to verify the app still launches and renders correctly.

Screenshots

macOS smoke test:
image
This screenshot is from someone who was kind enough to run the app on their Mac for testing. Cursor's credit details are intentionally hidden for privacy.

Windows screenshots:
image
image
image
image
image
image
image
image
image

Checklist

  • I read CONTRIBUTING.md
  • My PR targets the main branch
  • I did not introduce new dependencies without justification

Caveats

There are a few caveats worth calling out, but I do not think any of them should block the PR.

  1. Provider manual testing was limited to the providers I have available.
    I manually tested Codex, Antigravity, and Copilot on Windows. Other providers should continue to work because the plugin host API is mostly unchanged, and Windows path handling was added where needed, but I could not manually verify every provider locally because I do not have access to all of them, including Cursor and opencode go.

  2. Some providers still depend on the sqlite3 CLI.
    This preserves the existing OpenUsage provider execution model. On macOS, sqlite3 is normally available by default, but on Windows users may need to install SQLite and make sure sqlite3.exe is available on PATH. The Windows port now surfaces an actionable error when sqlite3 is missing. I intentionally did not replace this with a backend SQLite implementation in this PR because that would be a larger architecture change and could increase macOS regression risk.

  3. macOS testing was limited to smoke testing.
    I do not personally have a Mac, but someone else helped verify that the app still launches and renders correctly on macOS. The macOS-specific NSPanel/tray implementation is kept separate from the new Windows implementation to minimize macOS behavior changes, but a maintainer should still do a normal macOS build/runtime check before merging.

  4. Windows updater support is now part of the release flow.
    Windows uses the NSIS installer path for updater artifacts. The workflow keeps releases as drafts until macOS Intel, macOS Apple Silicon, and Windows x64 updater metadata are all present in latest.json. This is safer for users because public releases should not have incomplete updater metadata, but it also means a Windows release build failure will intentionally block publishing the whole release until fixed. This can be changed if needed.

  5. The release workflow still depends on the existing signing secrets.
    This PR wires Windows into the updater/release flow, but it does not add or change private signing keys. The upstream CI environment still needs the existing Tauri updater signing secrets for updater artifacts to be generated correctly. This is separate from Windows installer code signing, so Windows may still show normal SmartScreen warnings unless the project later adds a Windows code-signing certificate.

Personal note

This is my first open source PR, so feel free to roast me. I’m happy to adjust the structure, scope, or implementation if there is a better way to fit this into the project. Hope you like it!


Summary by cubic

Adds native Windows support while keeping macOS behavior unchanged. Windows runs a hidden, borderless tauri window with a native tray; macOS keeps tauri-nspanel. Also fixes Windows panel max-height caching to prevent clipped or oversized panels on DPI/monitor changes.

  • New Features

    • Platform-specific panel/tray: macOS stays on tauri-nspanel; Windows uses a hidden tauri window with a native tray and menu.
    • Hidden background commands on Windows to prevent console flashes.
    • Provider updates: Windows paths for Cursor and Antigravity state DBs; clearer sqlite3-missing hint on Windows.
    • Frontend: runtime platform detection; safer panel sizing with a Windows max-height cache fix; sidebar uses a drag-region on non-interactive chrome.
    • Release: Windows added to .github/workflows/publish.yml; tauri.windows.conf.json for NSIS bundling; updater artifacts enabled with passive Windows install mode.
  • Migration

    • On Windows, some providers require sqlite3.exe on PATH; the app now surfaces an actionable error if missing.
    • Releases stay draft until macOS (Intel + Apple Silicon) and Windows updater metadata are present in latest.json.

Written for commit bf41aa6. Summary will update on new commits.

@github-actions github-actions Bot added rust Pull requests that update rust code core plugin ci labels May 10, 2026
@Luciano16-gif Luciano16-gif changed the title Feat/windows port with mac compatibility Add Windows support while preserving macOS behavior May 10, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 32 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/hooks/app/use-panel.ts">

<violation number="1" location="src/hooks/app/use-panel.ts:182">
P2: Windows panel max-height cache keyed only by DPI factor, ignoring monitor changes on same-DPI monitors</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread src/hooks/app/use-panel.ts Outdated
@Luciano16-gif
Copy link
Copy Markdown
Author

Oh, also, I’m happy to help test the Windows version for future updates and help maintain the Windows side if that would be useful. I currently have ChatGPT Pro 5x, so I have enough Codex usage to help with follow-up fixes for now, but I’ll probably only have a Plus sub after this month since I got Pro for my birthday haha.

@Luciano16-gif Luciano16-gif changed the title Add Windows support while preserving macOS behavior Feat: Add Windows support while preserving macOS behavior May 10, 2026
@Luciano16-gif
Copy link
Copy Markdown
Author

Luciano16-gif commented May 10, 2026

Small note on scope: in this PR I covered the runtime pieces that I believe are necessary for Windows support to be usable in practice:

  • platform-specific panel/tray behavior;
  • Windows provider path/auth/process handling;
  • Windows language-server discovery;
  • Windows command lookup for provider tooling;
  • Windows resize behavior;
  • NSIS bundling and updater release metadata.

I’m happy to split this into smaller PRs if that would make review easier. My main goal is to add Windows support with the important functionality macOS already has, so both platforms have as much practical parity as possible while keeping macOS behavior isolated from the Windows-specific changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci core plugin rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant