* Linux browser: WPE WebKit at the display's rate, frames shared with GPUI as dma-bufs
The sidebar browser on Linux ran WebKitGTK in an offscreen window: every
frame went through the CPU, over a pipe, into a new GPUI image, so pages
topped out near 60 fps whatever the display, and large ones fell well below.
Zeron now carries its own WPE WebKit platform (browser/linux/wpe.c) and runs
it in the helper when the build and the system have WPE WebKit 2.50+:
- WebKit renders on the GPU GPUI draws with, into dma-bufs in a DRM format
modifier GPUI's Vulkan device imports. GPUI copies only each frame's
damaged regions into the page's atlas tile, on the GPU (zeronsh/zui#18).
- Where the driver renders no layout Vulkan imports, the helper reads frames
back with OpenGL ES into a sealed memfd. Without a GPU, WebKit renders on
the CPU into shared memory. Both update the tile in place.
- GPUI's frame callbacks are the pages' vblank: WebKit hears a frame is on
screen at most once per display refresh, so pages run at 60, 144 or 240 Hz
and never render frames the display won't show. Hidden pages, and pages
replaced by their error, get none.
- WebKit runs copy, cut and paste itself, sets the pointer's cursor, and sees
click counts and the pointer leaving the page.
If the WPE helper can't start, the session uses WebKitGTK. Its helper now
renders at the output's scale (it rendered 4x the pixels at 1.5x on Wayland
and downscaled them) and sends Cairo's surface as-is instead of converting it
through GdkPixbuf, which took most of its CPU.
A helper that crashes, sends a message Zeron can't read or is still being
written by a forked child (ETXTBSY) is stopped, replaced or retried; the
tests run the real helper on every render node, in every layout its driver
renders, read back and in shared memory, at 60, 144 and 240 Hz.
* Linux browser bench: shown frames, pacing, copies, press latency, memory
`ZERON_BROWSER_BENCH` measured one page's frame rate and CPU. It now loads
a fresh document for each of a 2D canvas, WebGL 2, scrolling, a CSS spinner
and, with `ZERON_BROWSER_BENCH_VIDEO`, a 60 fps video, and records for each:
the page's frame rate, when GPUI painted every new frame, the bytes copied
into the page's tile from CPU memory and between GPU buffers, CPU, PSS and
NVIDIA GPU memory for Zeron and for WebKit's processes, and a capture. It
then times 40 presses from GPUI's input to the frame showing them, and
measures an idle page. `ZERON_BROWSER_BENCH_WIDTH` sizes the browser.
The counts are kept only in fixture builds (`browser-fixture`), for both
engines, so WebKitGTK and every WPE path are measured the same way.
`ZERON_BROWSER_DMABUF=readback` keeps WebKit on the GPU but reads its frames
back, the path GPUs that render no importable layout take.
* Linux browser bench: WebGL page checks a WebGL 1 context too
The WebGL page's benchInfo() clears a WebGL 1 context and reads a pixel back, so a bench run records that both WebGL versions render.
* Linux browser: rustfmt the WPE engine and its tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
* Linux browser: a paste without text clears WPE's clipboard copy
The WPE helper kept the last clipboard text Zeron shared, and Zeron shared
only text. Pasting with an image or nothing on the system clipboard then
inserted that earlier text, possibly into another page. Zeron now shares
the clipboard on every paste, and empty text clears the helper's copy.
build.rs embeds an empty WPE helper, as when WPE is missing, if wpe.c does
not compile against the installed development files (an older GBM), and
detects them again when PKG_CONFIG_PATH changes. probe_gpu releases the GBM
device and render node it opened when the GPU is unusable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
* Linux browser fixture: rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
* Linux browser docs: the WPE vblank check needs a compositor that answers idle frame callbacks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
---------
Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
* refactor(browser): define stable device-local profile identity
* fix(browser-linux): persist website data and cookies by profile
* fix(browser-macos): persist isolated website stores on macOS 14
* fix(browser): preserve profile lifecycle across tabs and windows
* test(browser): verify persistent storage across app launches and profiles
* docs(browser): document persistent profiles and session lifecycle
* fix(browser-linux): initialize WebKit without blocking the UI
* fix(browser): correct macOS fixture import and Windows profile test
* fix(browser): invoke macOS storage fixture wrapper through bash
* fix(browser): propagate macOS fixture failures and initialize profile cleanup
Require explicit storage results, validate deletion in every store, and preserve primary failures while attempting all profile cleanups. Add opt-in native cookie and same-process reopen diagnostics.
Validated on macOS 27 arm64: release check/build and native tests pass. Two complete storage runs correctly fail on cookies returning after process restart; all profile cleanups pass. Cookie deletion persistence remains unresolved.
* fix(browser-macos): retain profile stores for the application lifetime
* fix(browser-macos): preserve profile stores through process exit
* test(opencode): remove fixture startup and clock races
* Revert "test(opencode): remove fixture startup and clock races"
This reverts commit dffcec2cdee4d6903649fe156c5b813d91e12376.
* test(browser): verify PR state follows profile identity
* refactor(ui): model transcript link targets and activation
* feat(ui): open transcript web links in session browser tabs
* feat(ui): add transcript link actions and keyboard access
* feat(ui): show full web destinations on hover and focus
* feat(ui): truncate long transcript links without losing content
* test(ui): cover transcript browser links end to end
Add native transcript link fixtures, preserve focus when action menus mount, and document interaction, Linux runtime requirements, and platform validation limits.
Fixes#351
* feat(ui): open Markdown preview links in session browser tabs
* fix(ui): make link destination tooltips compact
* fix(ui): suppress link tooltips while context menus are open
* feat(ui): add default link destination toggle
* fix(ui): use shared context menu rows for links