Skip to content

feat(linux): enable native browser shell and foundation CI - #462

Draft
crynta wants to merge 35 commits into
mainfrom
feat/linux-foundation
Draft

crynta wants to merge 35 commits into
mainfrom
feat/linux-foundation

Conversation

@crynta

@crynta crynta commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

What

Enable experimental Linux source builds and native browser composition with WebKitGTK. Add an Ubuntu 24.04 foundation job for the workspace build, strict Clippy, tests and isolated GTK checks. Local build, strict Clippy and workspace tests pass at ee1661d78. Hosted native jobs are running; dependency policy fails on the pre-existing rustix advisory below. The previous head passed all platform jobs. This milestone remains in draft for outstanding native macOS/Windows acceptance and dependency-policy validation.

Linux now has native split/sidebar placement and clipping, sidebar transitions, tab previews, keyboard modifier tracking, panel ownership/placement, and a verified process-local GLES fallback when GTK cannot create its default context. Existing contributor sections contain the native package and build instructions. Linux now discovers and rasterizes page icons through bounded asynchronous WebKitGTK evaluation, and reuses the native selective cosmetic matcher instead of copying the generic rule index into each page. Other platforms retain their existing paths.

Why

Removing the platform refusal alone leaves a browser with broken geometry, missing previews and inconsistent native input. This milestone establishes the build and browser-shell baseline while preserving WebKit admission, sandboxing and privileged/content boundaries. It does not declare Linux release support, extension parity or Work/agentic execution parity.

Shared fixes are isolated in #451, #452, #453, #454, #455, #456, #457, #459, #460, #461, #463 and #464 and included here as dependencies. Their changes should drop from this diff as they land and main is merged. No rebase or force push is needed.

How tested

Fedora 45 ARM64 VM, GTK 3.24.52 and WebKitGTK 2.54.2:

  • Tauri development build passed with the separate development identity. Native acceptance used an immutable, checksummed copy so Cargo test builds could not replace the executable.
  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets --locked -- -D warnings, and scripts/ci/linux-test.sh cargo test --workspace --locked passed on the current integrated tree.
  • Frontend check passed 189 unit files/1,367 tests; production build and 145 emitted CSS checks passed. All 84 focused Chromium component tests passed, including Linux sidebar coverage.
  • Agentic boundary and security fork-lock checks passed. Dependency policy and workflow/isolation checks passed earlier in this branch; hosted CI will verify the final tree.
  • Private Wayland compositor with GLES: cold startup, launcher input, keyboard and mouse grid selection, real tab previews, split/sidebar interactions, Wikipedia, the public Zephium GitHub repository and signed-out YouTube. Only consent controls were used on public pages.
  • GTK X11 on private Xwayland: cold startup, launcher input, keyboard previews/switching/cancellation passed. Native-coordinate mouse activation passed on harmless local fixtures with the underlying page counter unchanged. An earlier apparent click-through was traced to the nested input transport moving the X11 pointer to a different coordinate; GTK routed the delivered point correctly. Final clean pointer verification passed, including refusal when the target window did not match. Pixel comparisons confirmed transparent rounded corners; the surrounding rectangular shadow belongs to the test compositor. The Xwayland input transport swallowed its first synthetic button attempt during initialization; the verified retry passed. Earlier transient launcher residue did not recur in the final app run.
  • Actual app under headless Mutter 51.1/Xwayland: repeated narrow/wide panel geometry stayed within the 1400×950 desktop and Escape unmapped it. This extra run used localhost fixtures; its deadline ended the harness after the samples. Weston sessions closed normally.
  • Native harnesses used disposable home/XDG data, private displays and a service-free D-Bus session. They did not access a personal keyring or installed application.

Five additional isolated Fedora native checks passed: async result bounds/cancellation, dynamic favicon discovery and exact 32×32 SVG rasterization, dynamic generic cosmetics with visibility/pause/navigation, actual network blocking with pause/resume and per-view isolation, and GTK stage placement. A representative 4,096-entry cosmetic fixture reduces serialized arguments from 202,934 to 328 bytes; this is not an RSS or speed measurement.

The ee1661d78 app passed a private headless Mutter check using the VM's virgl render node: local SVG/PNG/WebP/ICO, Wikipedia, the public Zephium repository and DuckDuckGo. Sidebar favicons and DuckDuckGo result icons rendered correctly. WebGL returned the expected test pixel; its GBM-to-textures fallback was recorded. No sign-ins or result clicks. The reported search-icon failure remains unreproduced. The same immutable build also passed private Wayland/GLES checks for Wikipedia/GitHub favicons, tab switching and focused launcher open/Escape dismissal; the test recorded the VM’s Zink capability warning. Both sessions exited normally and the binary checksum remained unchanged.

cargo deny --locked check found the new pre-existing rustix advisory RUSTSEC-2026-0486. Current origin/main reproduces the same failure, and the hosted Rust policy job fails at cargo deny. The exact dependency-only fix is prepared; changing the reserved blocker manifest/fuzz lock awaits owner coordination. No exception or policy weakening is added. Fork-lock and agentic-boundary checks pass.

Remaining before review

  • Clean X11 input verification and transparent panel corners
  • Final f5003d076 Wayland/X11 app acceptance after the geometry-before-presentation fix; repeated narrow/wide X11 panels stayed within the display
  • New-head Ubuntu CI; all checks passed at the previous head a23996e8c
  • New-head Windows, frontend, policy and workflow CI; previous head passed
  • New-head macOS Rust and WebKit component runs; all passed at a23996e8c
  • Affected shared behavior verified natively on macOS and Windows by the lead
  • Attach final Wayland and X11 screenshots
  • Merge current main before the final push (a4187e9 remains current)
  • Incorporate shared fix PRs as they land

The Ubuntu job loads the distribution’s bubblewrap AppArmor profile only when its ordinary-user preflight fails, preserving WebKit sandboxing and global namespace restrictions. Ubuntu background.

The larger Linux release work still includes full content-blocker/scriptlet qualification, security/secrets acceptance, extensions, Work/agentic browsing, measured performance, packaging and updates.

Native captures

Integrated development build f5003d076, Fedora 45 ARM64, disposable Weston sessions with process-local GLES.

Wayland:

Wayland browser and tab previews

GTK X11 through Xwayland:

X11 browser and tab previews

Updated favicons on the VM render-node path, ee1661d78:

Linux sidebar and search-result icons

# Conflicts:
#	crates/zephium-engine/src/host/construction.rs
#	desktop/Cargo.toml
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

Failed Failed checks: 1 error · 3 warnings · 1 inconclusive

Check name Status Explanation Resolution
Privileged Boundary Intact Error Two prior failures remain unresolved: - Linux release content views enable devtools. The PR permits Linux startup in desktop/src/lib.rs:6767, while construction.rs:1203 enables devtools and WebKit… Disable content-view devtools in release builds and verify the Linux release path. Restore the production img-src policy and serve previews through an already allowed source.
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
One Logical Change Warning The PR still bundles independent filesystem and agent-runtime changes. Against the available origin/main base, lease.rs:55-64 changes Unix lock release, and runtime.rs:2479-2507 synchronizes an … Land the private-filesystem and agent-runtime fixes separately, then merge them into this branch.
Linked Issue For Larger Changes Warning The PR adds Linux support and favicon discovery, but its description does not link an issue with Closes, Fixes, or Refs. The dependency PR links do not satisfy the issue-link requirement. The pr… Add an issue link to the PR description using Closes, Fixes, or Refs.
Tests Cover Changed Behavior Warning The floating-sidebar drag boundaries still lack tests. The PR changes native hover and page-drop decisions in row-drag.svelte.ts, TabList.svelte, and TabRail.svelte. The drag component tests moc… Add drag tests that move from the floating sidebar to the page and back. Verify that native hover clears, sidebar drops are denied, and page drops remain allowed.
Passed Passed checks: 3 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Generated Files Follow Their Source Passed Against the merged main commit a4187e9f7, the PR does not change bindings.ts, either lockfile, or generated i18n output.
Performance Impact Stated Passed The PR changes the content-blocking hot path. Its description reports that a 4,096-entry cosmetic fixture reduces serialized arguments from 202,934 to 328 bytes. It does not claim a memory or speed me…
Full details: Performance Impact Stated

Explanation

The PR changes the content-blocking hot path. Its description reports that a 4,096-entry cosmetic fixture reduces serialized arguments from 202,934 to 328 bytes. It does not claim a memory or speed measurement.

Full details: Privileged Boundary Intact

Explanation

Two prior failures remain unresolved: - Linux release content views enable devtools. The PR permits Linux startup in desktop/src/lib.rs:6767, while construction.rs:1203 enables devtools and WebKitGTK applies that setting without a release guard at vendor/wry/src/webkitgtk/mod.rs:793-795. - desktop/tauri.conf.json:37 expands the production img-src policy to allow two preview sources. This relaxes the production CSP.

Resolution

Disable content-view devtools in release builds and verify the Linux release path. Restore the production img-src policy and serve previews through an already allowed source.

Full details: One Logical Change

Explanation

The PR still bundles independent filesystem and agent-runtime changes. Against the available origin/main base, lease.rs:55-64 changes Unix lock release, and runtime.rs:2479-2507 synchronizes an agent-runtime test. These changes require separate filesystem and runtime review alongside the Linux foundation.

Resolution

Land the private-filesystem and agent-runtime fixes separately, then merge them into this branch.

Full details: Linked Issue For Larger Changes

Explanation

The PR adds Linux support and favicon discovery, but its description does not link an issue with Closes, Fixes, or Refs. The dependency PR links do not satisfy the issue-link requirement. The prior failure remains unresolved.

Resolution

Add an issue link to the PR description using Closes, Fixes, or Refs.

Full details: Tests Cover Changed Behavior

Explanation

The floating-sidebar drag boundaries still lack tests. The PR changes native hover and page-drop decisions in row-drag.svelte.ts, TabList.svelte, and TabRail.svelte. The drag component tests mock tabDragOver and tabDrop without checking those calls. A regression could send a sidebar drop to the underlying page.

Resolution

Add drag tests that move from the floating sidebar to the page and back. Verify that native hover clears, sidebar drops are denied, and page drops remain allowed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

# Conflicts:
#	crates/zephium-app/src/shell/tests/sidebar_card.rs
#	frame/src/app/browser/tests/NewTabLook.component.test.ts
#	frame/src/features/sidebar/components/SidebarResizeHandle.svelte
#	frame/src/features/sidebar/tests/Sidebar.component.test.ts
Keep panel WebKit rendering opaque while GTK owns rounded paint and input clipping plus bounded shadow padding. Preserve short viewports and avoid redundant child moves that schedule idle redraws.

Validate renderer settings on private Wayland and X11 sessions, native geometry and input at supported scales, and focused component tests. Windows and macOS native validation remains outstanding.
# Conflicts:
#	crates/zephium-private-fs/src/platform/unix.rs
@kirinriki7777-sys

Copy link
Copy Markdown

Tested the current head of this PR (a9048bbe) on Arch Linux with an NVIDIA GPU. Sharing in case it helps with Linux qualification.

Environment

  • Arch Linux, kernel 7.2.15
  • Hyprland 0.56.2 (Wayland)
  • NVIDIA RTX 3060, nvidia-open 615.78.08, Mesa 26.2.5
  • WebKitGTK (webkit2gtk-4.1) 2.54.1, GTK 3.24.52
  • Built with tauri build --no-bundle (release profile)

1. Startup: Wayland protocol error (worked around)

The window appears and the process exits immediately with Error 71 (Protocol error) dispatching to Wayland display. WAYLAND_DEBUG=1 shows:

wl_display#1.error(wp_linux_drm_syncobj_surface_v1#56, 4, "Missing acquire timeline")

__NV_DISABLE_EXPLICIT_SYNC=1 avoids it, as reported in #137.

2. Scrolling YouTube crashes the web process, then the browser process

Reproduced twice: open youtube.com and scroll the home feed; it crashes after about three minutes.

  • WebKitWebProcess aborts (SIGABRT) on its ThreadedCompositor thread. The abort comes from inside libwebkit2gtk-4.1.so.0 (+0x2df8f36), below a deep alternating recursion (+0x2dec4e8 / +0x2de8e7f / +0x2decc5c). Nothing is printed to stderr before the abort.
  • Zephium logs engine: web process terminated: Crashed, then zephium-desktop itself segfaults (segfault at 554, libwebkit2gtk-4.1.so.0 +0x166f52d), called from the GTK main loop via JavaScriptCore. Offsets were identical in both runs.

I could not symbolize further: Arch's debuginfod has no debuginfo for webkit2gtk-4.1 2.54.1-1.

The renderer crash may well be WebKitGTK/NVIDIA-specific, but the browser process going down with it is not. It reproduces without the GPU path:

  1. Open any page in a new tab (I used ja.wikipedia.org).
  2. kill -KILL the WebKitWebProcess that appeared for that tab.

The same log line (engine: web process terminated: Crashed, from the connect_web_process_terminated handler in crates/zephium-engine/src/host/construction.rs) is printed, and zephium-desktop segfaults within the same second, at the same address as the YouTube crashes (segfault at 554, libwebkit2gtk-4.1.so.0 +0x166f52d). A renderer crash should leave the browser running. This step should reproduce on any Linux machine, including your VM.

Workarounds tried (none usable)

Setting Result
WEBKIT_DISABLE_DMABUF_RENDERER=1 Page area is transparent (desktop shows through)
WEBKIT_DISABLE_COMPOSITING_MODE=1 Whole UI invisible
GDK_BACKEND=x11 (Xwayland) Whole UI invisible; Failed to create GBM buffer of size 1x1: Invalid argument twice at startup

On this machine, Electron apps with similar NVIDIA/Wayland rendering problems keep working with --disable-gpu. Zephium has no equivalent fallback: with compositing disabled the UI does not render at all, so there is currently no usable software-rendering path on NVIDIA.

Happy to test further builds on this setup.

@kirinriki7777-sys

Copy link
Copy Markdown

Follow-up: the web-process crash itself is a WebKitGTK issue, not Zephium's.

I scrolled YouTube in WebKitGTK's own MiniBrowser (/usr/lib/webkit2gtk-4.1/MiniBrowser, same webkit2gtk-4.1 2.54.1, only __NV_DISABLE_EXPLICIT_SYNC=1 set). WebKitWebProcess aborted on its ThreadedCompositor thread at the same offset (libwebkit2gtk-4.1.so.0 +0x2df8f36) with the same recursion pattern. MiniBrowser itself stayed up and only logged WebProcess CRASHED.

It seemed easier to hit with YouTube's inline video previews turned off. The page grew heavier while scrolling until a reload, and the web process was at about 1.3 GB RSS shortly before the abort.

So the Zephium-side part is only the browser process segfaulting after a web-process termination (reproducible with kill -KILL, as above).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants