Commit Graph
4 Commits
Author SHA1 Message Date
Alessandro cafcfc9545 Release idle Browser resources without interrupting agents
The shared Chromium, Xvfb and Xpra runtime could remain alive indefinitely
after chats stopped using it. Suspend it after one hour of inactivity by
default, preserving saved tab URLs and the shared sign-in profile. Protect
running and paused owners, subordinate parent tasks, connected viewers,
browser calls and downloads; passive polling must not restart the runtime
or extend its lifetime.

Add Stop internal browser to Browser Settings, release the runtime on
global plugin disable, and clean stale display directories only when no
live owner or process reference remains. Document the global timeout,
opt-out and loss of unsaved page state on suspension.

Validation: 206 focused tests and 20 real-Chromium security tests passed.
Live Docker checks verified periodic and manual shutdown from 13 child
processes to zero, download protection, tab/cookie recovery, the WebUI
control and CSRF rejection. The reported GPU busy-loop was not reproduced;
this change bounds idle lifetime without changing graphics flags.

Refs #1892, #2029.
2026-11-12 20:59:02 +01:00
Alessandro 8f84c99a1e Speed up Browser and Desktop startup
Reduce Xpra startup delays by limiting the initial system D-Bus and CUPS waits to one second. Share the defaults across Browser launches and Desktop launches and restarts while preserving explicit environment overrides. Disable local shared-memory transport for the WebSocket viewers.

Add regression coverage for timeout defaults, inherited overrides, and transport arguments. Verified 10 focused tests and live Browser rendering and Desktop interaction on localhost:32081.
2026-09-08 12:18:50 +02:00
Jehu bb2a2ecf16 Make the interactive Browser honor configured keyboard layouts
The private Browser Xvfb always started with the US XKB layout, so
non-US keyboards could not type their printed characters in the
interactive Browser window: German Mac users could not type "@" via
Option+L, and umlauts, brackets, and AltGr/Option symbols landed on
wrong keys or vanished.

Add keyboard_layout / keyboard_variant Browser settings (validated as
safe XKB tokens, empty keeps US behavior). Browser startup applies the
layout to the private display with setxkbmap and pins it on the Xpra
shadow server (--keyboard-sync=no, --keyboard-layout, --keyboard-variant)
so connecting clients cannot override the server layout. Layout changes
flow through browser_runtime_config and restart internal runtimes.

The fallback canvas input path also stopped discarding Alt/AltGr
combinations that produce printable characters, and the settings UI
offers free-text layout/variant fields linking to the official
xkeyboard-config list.
2026-08-27 13:01:36 +02:00
Alessandro 005b366b51 Add interactive internal Browser viewport
Render the existing Patchright page through an isolated, authenticated Xpra session with CDP screencast and snapshot fallbacks.

Keep Chromium out of fullscreen, synchronize native viewport resizing across canvas and modal handoffs, and remove Xpra decoration and shadow-cursor artifacts.

Move loading feedback into each Browser tab while reserving the footer for actual errors.
2026-08-16 12:58:17 +02:00