Repository navigation
Conversation
There was a problem hiding this comment.
1 issue found across 124 files
Confidence score: 3/5
desktop/Linux/PLAN-LINUX.mddocuments autostart using a hardcoded~/.config/autostartpath instead of$XDG_CONFIG_HOME/autostart, which can cause launch-at-login setup to silently fail for users with non-default XDG config locations; align the path handling with the XDG autostart spec before merging to avoid a user-facing Linux regression.
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="desktop/Linux/PLAN-LINUX.md">
<violation number="1" location="desktop/Linux/PLAN-LINUX.md:33">
P2: Autostart path hardcodes `~/.config/autostart` instead of resolving `$XDG_CONFIG_HOME/autostart` per the freedesktop XDG autostart spec, causing launch-at-login to silently fail for users with custom XDG config directories.</violation>
</file>
Note: This PR contains a large number of files. cubic only reviews up to 40 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
bbaba36 to
9cdfcd4
Compare
9cdfcd4 to
e0aefce
Compare
|
Pushed a cleanup pass for the Cubic notes. Covered the main runtime issues and the smaller script/doc ones:
Checks I reran:
|
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for splitting the Linux desktop work into its own desktop/Linux tree — this is a substantial and useful direction, and the Linux-specific notes around X11/Wayland, PipeWire/PulseAudio, libsecret, autostart, and Tesseract are appreciated.
I’m requesting changes before this can move forward, mostly because this PR introduces a new desktop distribution surface with updater/auth/audio/screen-capture/dependency behavior and needs human maintainer/product review before merge.
Blocking issues I found:
-
desktop/Linux/electron-builder.ymlconfigurespublishtoowner: ZachL111/repo: omi. In a packaged AppImage,desktop/Linux/src/main/updater.tsuses electron-updater against that publish feed. If this were merged as-is, Linux clients could check/download updates from the contributor fork rather than the official BasedHardware release channel. Please remove/disable auto-update for this PR or point it only at the official release source once maintainers confirm the intended Linux release flow. -
desktop/Linux/src/main/apiProxy.tsstill sendsX-App-Platform: windows. The Linux app should not identify as Windows when talking to the backend; this can skew platform-specific backend behavior, analytics, support/debugging, or feature gates. Please change this to the intended Linux platform value and verify any backend expectations. -
This is a very large first-cut feature (124 files, new Electron app, lockfile, updater config, auth/token storage, BYOK headers, Rewind OCR/indexing, screen/audio capture, WebSocket bridges, packaging). The current CI signal shown here is only the repo lint/format check; it does not independently prove the new Linux package typechecks/builds/packages or that the sensitive desktop paths behave safely. Please add/point to maintainers’ preferred validation for
desktop/Linux(npm run typecheck,npm run build, packaging smoke test, and any auth/capture/updater sanity checks) so reviewers can reproduce it.
Given the size and the new security/privacy/release surfaces, I’m also leaving this for human maintainer review rather than treating it as an auto-approvable PR. Once the updater source and platform header are fixed and there is reproducible validation, this will be much easier to review constructively.
|
Will do, looking into both this and security PR as well. |
|
Thanks David, agreed on these. Pushed a follow-up that:
Validation I ran:
I also tried |
|
Small follow-up: the first run caught Black formatting on the new platform-alias test, so I pushed that formatting-only fix too. Current checks are green now: Lint & Format, Hermetic Backend E2E, and Cubic. |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for the follow-up. The earlier high-risk blockers I raised look addressed in this head: the contributor-fork publish/update feed is gone, Linux auto-update is disabled until maintainers choose the official channel, the desktop API proxy now sends X-App-Platform: linux, and there is now a Linux validation checklist plus backend coverage for the Linux platform alias/paywall-plan behavior.
I’m leaving this as a positive maintainer signal rather than an approval because the PR is still a large new desktop distribution surface (Electron app, lockfile/postinstall/native rebuilds, auth/token/BYOK handling, screen/audio capture, Rewind OCR/local indexing, protocol handling, packaging, and backend platform behavior). It still needs human maintainer/product/security/release review and a Linux-host package smoke before merge, especially since the contributor-reported AppImage package attempt did not complete on their host.
No additional blocking issue found in this static follow-up pass, but formal auto-approval remains disallowed for this PR under the maintainer policy.
|
Thanks for the re-review and for confirming the blockers are cleared. To recap where this head landed: the contributor-fork publish feed is removed and Linux auto-update is disabled until maintainers pick the official release channel, the API proxy sends Agreed it should stay with human maintainer, product, security, and release review. The one verification gap I want to be honest about: I could not complete an AppImage package smoke on my own host, so a maintainer or CI running an actual Linux package build is the right gate before merge, not my local run. If it helps the team, I am happy to split the non-runtime pieces (the backend platform-alias handling and the docs/checklist) into a smaller PR that can land independently of the full desktop surface. Whatever is easiest to review. |
# Conflicts: # backend/database/users.py # backend/tests/unit/test_subscription_restructure.py
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for the update. I re-reviewed the current head (0e7ea002bf4ecce5243d119447fcc3c096a89138) statically and did not execute the Linux app code.
I’m going to keep this in changes-requested / human-review-required state for two concrete gates:
-
The current required Backend unit suite is failing. From the GitHub job,
tests/unit/test_lock_bypass_fixes.pyfails inTestScheduledDailySummaryLockFilterbecause the test patchesutils.other.notifications.is_trial_paywalled, but that attribute no longer exists inutils.other.notifications. This may be a main-branch/test-drift issue rather than caused by the Linux port, but this PR still needs a green required suite before merge. -
npm audit --package-lock-onlyindesktop/Linuxflags the packaged Electron runtime as high severity:[email protected]is in the vulnerable range (<=39.8.4, including GHSA-532v-xpq5-8h95). Even though Electron is listed under devDependencies, it is the runtime that gets packaged into the desktop app, so this should be updated/pinned to a non-vulnerable Electron line before shipping a new desktop distribution surface.npm audit --omit=devis clean, so the remaining finding is specifically the Electron runtime/dev packaging dependency.
The earlier high-risk updater/platform-header blockers still look addressed: no contributor fork publish feed, Linux auto-update remains disabled pending an official release channel, the API proxy sends X-App-Platform: linux, and backend platform/paywall coverage exists. This is still a large auth/BYOK/screen-capture/OCR/local-indexing/package surface, so formal approval remains disallowed and human maintainer/security/release review is still needed.
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for the update. I re-reviewed the current head (490da46da5e570843ccb840de84a6905163e72a9) statically and did not execute the Linux app code.
Good news: the required GitHub checks are green on this head, including Backend unit suite, so the previous backend-test gate appears cleared. The earlier high-risk updater/platform-header issues still look addressed: Linux auto-update remains disabled until maintainers choose an official release channel, there is no contributor-fork publish feed in the Linux builder config, and the API proxy sends X-App-Platform: linux with backend coverage for the Linux desktop/paywall behavior.
I’m still keeping this in changes-requested / human-review-required state for the dependency/release gate: npm audit --package-lock-only in desktop/Linux still reports a high-severity Electron runtime advisory for the packaged Electron version ([email protected], vulnerable range <=39.8.4, including GHSA-532v-xpq5-8h95 and related Electron advisories). npm audit --package-lock-only --omit=dev is clean, but in an Electron desktop app the electron devDependency is the runtime that gets packaged and shipped, so this should be updated/pinned to a non-vulnerable Electron line before this becomes a new Linux distribution surface.
Given the size and sensitivity of this PR (new Electron app, lockfile/native rebuilds, auth/token/BYOK handling, protocol handling, screen/audio capture, Rewind OCR/local indexing, and packaging), formal auto-approval remains disallowed under the maintainer policy. After the Electron runtime advisory is resolved, I’d still want human maintainer/security/release review plus a Linux-host package smoke before merge.
…e Linux port npm audit --package-lock-only on desktop/Linux reported 1 high severity vulnerability against the packaged electron 38.8.6, covering four advisories in the vulnerable range <=39.8.4: - GHSA-532v-xpq5-8h95 use-after-free in the offscreen child window paint callback - GHSA-8x5q-pvf5-64mp use-after-free in the offscreen shared texture release() callback - GHSA-f37v-82c4-4x64 crash in clipboard.readImage() on malformed clipboard image data - GHSA-f3pv-wv63-48x8 named window.open targets not scoped to the opener's browsing context This matters more here than in an ordinary dependency bump because this PR is what makes Linux a distribution surface for the app, so the shipped runtime should not start out on a known vulnerable line. devDependencies electron is moved from ^38.2.0 to ^43.1.1 and the lockfile is regenerated. 43.x is what npm audit itself resolves to as the fix, and it is a supported line still receiving security updates, which a 39.8.5 style patch pin would not be. The lockfile churn is confined to electron's own dependency subtree (@electron/get, extract-zip, yauzl, fd-slicer, pend, buffer-crc32, fs-extra and electron's bundled @types/node). No production dependency moved: better-sqlite3, electron-updater, ws, react, vite and typescript are all unchanged. Verification (run in desktop/Linux): - npm audit --package-lock-only before: 1 high severity vulnerability, 4 advisories - npm audit --package-lock-only after: found 0 vulnerabilities - npm run typecheck: clean, both tsconfig.web.json and tsconfig.node.json, 0 errors. This is the meaningful check for a five-major bump, since the app's main process uses desktopCapturer, safeStorage, powerMonitor, globalShortcut, session, Tray and screen, and removed or changed API signatures would surface here - npm run build (electron-vite build): succeeds. Main 26 modules, preload 1 module, renderer 241 modules, all chunks emitted Not verified: the packaged Linux app was not launched or smoke tested. That needs a Linux host and was not possible from this machine, so the AppImage and deb packaging paths and the runtime behaviour of the bumped Electron still need a check on Linux before this lands.
|
Electron is updated to 43.1.1 in 9fc8265, which clears the advisory you flagged. Before, on electron 38.8.6, I went to 43.x rather than pinning something like 39.8.5 because 43 is what The lockfile churn is contained to electron's own subtree (@electron/get, extract-zip, yauzl, On the breaking-change risk from five majors, what I could check passes:
What I have not done, and what still needs doing before this lands: I did not launch or smoke |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for updating Electron. I re-reviewed the current head (9fc826588f19d176cc770bac22b7d87a716ee4fc) in an isolated checkout and did not run the app with user credentials.
Good progress: the earlier high-severity Electron audit blocker looks resolved. In desktop/Linux, both npm audit --package-lock-only and npm audit --package-lock-only --omit=dev now report found 0 vulnerabilities, and npm run typecheck plus npm run build pass on this head. The previous updater/platform-header fixes also still look intact: Linux auto-update is disabled until maintainers choose an official channel, there is no contributor-fork publish feed in electron-builder.yml, and the API proxy sends X-App-Platform: linux.
I’m still requesting changes because the documented/package target does not currently build for .deb. On a Linux host, after npm ci --ignore-scripts, I ran npm run dist:deb; it completed the Vite build, native rebuild, Electron unpack, and then failed in electron-builder’s deb target with:
Please specify project homepage
Please specify author 'email' in the application package.json
It is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options.
Since desktop/Linux/docs/VALIDATION.md explicitly lists npm run dist:deb as part of release validation, please add the required package metadata (homepage and Linux deb maintainer/author email, or the equivalent electron-builder Linux options) and rerun the package smoke on Linux. I could not run the backend unit tests here because this checkout lacks backend Python dependencies (pydantic missing during collection), but the Linux frontend/package checks above are enough to reproduce this blocker.
Given the size and sensitivity of this PR (new Electron distribution surface, auth/token/BYOK handling, screen/audio capture, Rewind OCR/local indexing, protocol handling, dependency/native rebuilds, and release packaging), formal auto-approval remains disallowed. After the .deb package gate is fixed, this should still get human maintainer/security/release review before merge.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
Hey @ZachL111 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Consolidate Linux desktop work as platform seams on desktop/windows (not a forked desktop/linux tree). From #9503 (primary): - X11 active-window via xprop + /proc - Tesseract OCR helper speaking win-ocr-helper protocol - XWayland default + PipeWire capturer - Wayland continuous Rewind default off - AppImage+deb targets (no snap) From #8415: - PulseaudioLoopbackForScreenShare for system-audio loopback - deb runtime depends (tesseract, libnotify, libxss) From #9963: - architecture validation only (forked tree rejected as drift) Also: lazy-require koffi so Linux import of nativeForeground never loads the Win32 native module (fixes linux unit tests off-Windows). Verification: vitest 21/21 on linuxForeground, nativeForeground linux/degrade, rewindSettings wayland. Failure-Class: none Co-authored-by: velinxs <[email protected]> Co-authored-by: ZachL111 <[email protected]> Co-authored-by: palontologist <[email protected]>
…10110) ## Summary Adds a scoped `// eslint-disable-next-line @typescript-eslint/no-require-imports` above the two lazy `require('koffi')` calls (nativeForeground.ts:45, userAssistRegistry.ts:46) so the **Desktop Windows CI / Typecheck · Lint · Test** check goes green on #10096. The lazy require is the right idea (keeps `nativeForeground` importable off-Windows); it just trips the `no-require-imports` rule. This is the exact fix the maintainer requested in the #10096 review. ## Test plan - `cd desktop/windows && npx eslint src/main/usage/nativeForeground.ts src/main/usage/userAssistRegistry.ts` → no `no-require-imports` errors. - Part of the consolidated Linux PR #10096 (supersedes #9503/#9963/#8415). ## Notes Pushed from the `consolidation/linux-electron` HEAD. Intended to be merged into that branch (or squashed into its feat commit) so #10096 can land. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/10110?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Consolidate Linux desktop work as platform seams on desktop/windows (not a forked desktop/linux tree). From #9503 (primary): - X11 active-window via xprop + /proc - Tesseract OCR helper speaking win-ocr-helper protocol - XWayland default + PipeWire capturer - Wayland continuous Rewind default off - AppImage+deb targets (no snap) From #8415: - PulseaudioLoopbackForScreenShare for system-audio loopback - deb runtime depends (tesseract, libnotify, libxss) From #9963: - architecture validation only (forked tree rejected as drift) Also: lazy-require koffi so Linux import of nativeForeground never loads the Win32 native module (fixes linux unit tests off-Windows). Verification: vitest 21/21 on linuxForeground, nativeForeground linux/degrade, rewindSettings wayland. Failure-Class: none Co-authored-by: velinxs <[email protected]> Co-authored-by: ZachL111 <[email protected]> Co-authored-by: palontologist <[email protected]>
Consolidate Linux desktop work as platform seams on desktop/windows (not a forked desktop/linux tree). From #9503 (primary): - X11 active-window via xprop + /proc - Tesseract OCR helper speaking win-ocr-helper protocol - XWayland default + PipeWire capturer - Wayland continuous Rewind default off - AppImage+deb targets (no snap) From #8415: - PulseaudioLoopbackForScreenShare for system-audio loopback - deb runtime depends (tesseract, libnotify, libxss) From #9963: - architecture validation only (forked tree rejected as drift) Also: lazy-require koffi so Linux import of nativeForeground never loads the Win32 native module (fixes linux unit tests off-Windows). Verification: vitest 21/21 on linuxForeground, nativeForeground linux/degrade, rewindSettings wayland. Failure-Class: none Co-authored-by: velinxs <[email protected]> Co-authored-by: ZachL111 <[email protected]> Co-authored-by: palontologist <[email protected]>
#8415) (#10096) ## Summary Consolidates the three open Linux desktop PRs into one landable path: | PR | Approach | Verdict | |---|---|---| | #9503 | Platform seams on `desktop/windows` (+473) | **Primary** — keep | | #8415 | Forked `desktop/Linux` tree (+24k) | Port **Pulse loopback + deb depends** only | | #9963 | Forked `desktop/linux` tree (+58k, ~75% Windows copy) | Reject fork; product extras (sign avatar / monologur) stay follow-ups | Architecture: **one Electron tree** (`desktop/windows`) with `process.platform` branches. No `desktop/linux` / `desktop/Linux` fork — those drift from Windows immediately and double maintenance. ### What lands **From #9503** - X11 active-window (`linuxForeground.ts` via `xprop` + `/proc`) - Tesseract OCR helper speaking `win-ocr-helper` stdio protocol (`resources/linux-ocr-helper/omi-ocr-helper`) - XWayland default (`OMI_OZONE=wayland` override) + PipeWire capturer - Wayland: continuous Rewind capture defaults **off** - Linux targets: AppImage + deb (snap dropped — confinement blocks xprop/tesseract) **From #8415** - `PulseaudioLoopbackForScreenShare` for system-audio loopback - `.deb` depends: `tesseract-ocr`, `tesseract-ocr-eng`, `libnotify4`, `libxss1` **Fix on top of #9503** - Lazy-`require('koffi')` so Linux import of `nativeForeground` never loads Win32 native module (unit tests were broken off-Windows) ## Tests ``` cd desktop/windows npx vitest run \ src/main/usage/linuxForeground.test.ts \ src/main/usage/nativeForeground.linux.test.ts \ src/main/usage/nativeForeground.degrade.test.ts \ src/main/rewind/rewindSettings.wayland.test.ts # → 22/21+ focused Linux tests (includes foregroundMonitor.linux) ``` ## Product invariants None. Path globs under `desktop/windows` for Linux seams only. ## Credits Consolidated from community PRs (code selected into `desktop/windows` seams; forked trees not re-merged): | PR | Author | Role | |---|---|---| | #9503 | @velinxs | Primary Linux platform seams (X11, OCR helper, XWayland, Wayland Rewind default) | | #8415 | @ZachL111 | Pulse loopback flag + deb depends (from Linux packaging work) | | #9963 | @palontologist | Architecture reference; full `desktop/linux` fork not adopted | Git trailers on the feat commit: `Co-authored-by` for all three. Failure-Class: none Closes #9503 Closes #9963 Closes #8415 <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/10096?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
What changed
desktop/LinuxElectron app for Omi on Linux..desktopfile,omi-computer://callback handling, and AppImage/.deb packaging.Why
This splits the Linux desktop work out from the combined desktop branch so the PR only touches
desktop/Linux. No Windows files and no backend files are included here.The goal is to give Linux the same desktop surface as the Mac and Windows apps while keeping the first review focused on the platform port itself.
Notes
Checks
npm install --ignore-scriptsnpm run typechecknpm run buildgit diff --check