Skip to content

feat: add Linux desktop support - #64

Merged
harry0703 merged 13 commits into
mainfrom
codex/linux-distro-telemetry
Sep 24, 2026
Merged

harry0703 merged 13 commits into
mainfrom
codex/linux-distro-telemetry

Conversation

@harry0703

@harry0703 harry0703 commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add Linux desktop support, cleanup and package integrations, and distribution telemetry.
  • Target Ubuntu 22.04 x86_64 as the minimum Linux build baseline.
  • Preserve macOS and Windows behavior, including Windows short-path identity handling.
  • Preserve the four substantive Linux commits from PR #62 with their original author, Eliezer Traore (@traoreera), followed by eight Harry-authored qualification and integration commits. The history is linear and contains no private Linux release SOP.
  • Allow scheduling jitter in macOS Spotlight cancellation tests while still asserting completion well before the query deadline.
  • Cache Rust dependency artifacts across runs of the same PR without changing the validation steps.

Validation

  • Cross-platform CI run 35998877527 passed on macOS, Windows, and Ubuntu 22.04, including the full static checks, workspace Rust tests, and native Tauri release build. On the same SHA, cold run to warm rerun wall time changed from 33:23 to 20:07 on Windows, 20:22 to 13:57 on macOS, and 16:22 to 10:37 on Ubuntu. Production code is byte-for-byte identical to the previously green run 35992125225; this follow-up changes only the CI workflow.
  • Local macOS on the identical file tree: pnpm check, Core tests, and all workspace Rust tests passed.
  • Ubuntu 22.04 bundle CI run 35982441523: unsigned .deb and AppImage bundles and GLIBC compatibility check passed.
  • Ubuntu 22.04.5 x86_64 container: .deb installed as version 1.1.3 with no missing dynamic libraries; the app reached main_window_shown under Xvfb. Extracted AppImage AppRun also reached main_window_shown. Both packaged binaries require at most GLIBC_2.34.
  • A native Ubuntu 22.04 graphical desktop and end-to-end signed update remain to be checked for a future release.

Release constraints

This PR does not bump the app version, replace existing 1.1.3 assets, or publish an updater release. Signed Linux packages and end-to-end upgrade acceptance require a new patch release. Keep this PR in draft until Harry explicitly approves merging.

PR #62 remains open. Preserving its author's commits here does not itself mark that PR as merged.

@harry0703
harry0703 force-pushed the codex/linux-distro-telemetry branch from cc8269a to e532496 Compare September 24, 2026 11:17
traoreera and others added 12 commits September 24, 2026 20:12
Phase 1 scaffold: Platform trait implementation, filesystem cleanup rules,
project-artifact rules activation, and Tauri Linux configuration.

Platform implementation (mangodisk-platform):
- Linux module with Platform trait: volumes (/proc/mounts + statvfs),
  directories (XDG base dirs), inventory (/proc/[pid]/comm + /etc/os-release),
  process control (libc::kill), application directories
- Dependencies: libc 0.2, walkdir 2
- Removed compile_error! gate in current.rs

Core adaptations (mangodisk-core):
- Added Linux variant to PlatformConstraint, SourcePlatform,
  SystemMaintenancePlatform, SystemSettingsPlatform enums
- Added Linux branches to all match expressions across 12+ files
- Added CONTROLLED_ENV_ALLOWLIST for Linux (HOME, TMPDIR, XDG_*)
- MAX_PARALLEL_DELETE_WORKERS set to 4 for Linux
- project_artifact_schema: SUPPORTED_PLATFORMS now includes "linux"
- Tests adapted for empty DEFINITIONS on Linux with early returns

Filesystem cleanup rules (28 new TOML files):
- 6 system rules: temp, crash-dumps, thumbnails, dns-cache, font-cache,
  gtk-icon-cache
- 22 application rules: Chrome, Firefox, VS Code, Slack, Discord,
  Spotify, Electron, JetBrains, Docker, pip, npm, Yarn, Cargo, Gradle,
  Maven, GTK-doc, Zoom, Blender, Minecraft, GIMP, Wine

Project-artifact rules:
- Added "linux" to platforms for all 30 cross-platform rules
  (cocoapods remains macOS-only)

Configuration:
- tauri.linux.conf.json: custom decorations, deb + appimage bundles

All 31 project-artifact rules validated at build time by build.rs.

Validation: cargo check OK, 619 Rust tests pass, 0 failures
Phase 2 - Platform trait native implementations:
- file_has_allocated_content: lseek(SEEK_DATA) for sparse file detection
- directory_entry_identities: stat() for inode/device identity batch
- fast_direct_physical_directories: d_type from getdents64

Phase 3 - PrivacyPlatform:
- discover_privacy_sources: 6 Chromium browsers + Firefox with profile
  enumeration (history, cookies, cache, sessions, storage databases)
- clear_system_privacy_trace: shell history (.bash_history, .zsh_history,
  fish_history) and recent documents (XDG recently-used.xbel)

Phase 3 - StartupPlatform:
- scan_startup_sources: XDG autostart desktop files + systemd user services
- Parses .desktop Exec/Name/Hidden fields and systemd Description/WantedBy

Phase 5 - Frontend:
- OperatingSystemService.isLinux() method
- SystemSettingsPlatform and SystemMaintenancePlatform types: added 'linux'
- AiContext.platform: added 'linux'
- ApplicationUninstallPlatform: added 'linuxPackage'
- system-settings-mode.ts: added empty linux entries for SMART_EXTRAS and
  FOCUSED_EXTRAS
- Fixed 3 binary ternaries (isWindows ? 'windows' : 'macos') to include
  Linux in cleanup, privacy, and startup pages
- Added Linux test case to operating-system-service.test.ts

Validation: cargo check OK, 619 Rust tests pass, frontend builds clean
- clippy --workspace --all-targets -- -D warnings and rustfmt are green on
  Linux using narrow positive cfg gates; macOS/Windows paths are unchanged
- run cross-platform-check on ubuntu-24.04 and install the WebKitGTK 4.1,
  tray indicator, rsvg, and patchelf system dependencies
- bundle Linux releases as AppImage so the tauri updater self-update works
- prune large-file and duplicate discovery below snap, flatpak, and
  unwritable system trees (user scope, no elevation); unwritable detection
  ignores nonexistent synthetic roots used by storage tests
- report the Linux package platform in uninstall records
- document Linux filesystem-rule constraints in rules/README.md

Closes #46
@harry0703
harry0703 force-pushed the codex/linux-distro-telemetry branch from e532496 to 07368ff Compare September 24, 2026 12:15
@harry0703
harry0703 marked this pull request as ready for review September 24, 2026 13:24
@harry0703
harry0703 merged commit 0405449 into main Sep 24, 2026
6 checks passed
@harry0703
harry0703 deleted the codex/linux-distro-telemetry branch September 24, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants