Skip to content

Preserve bar space while the shell restarts - #11887

Open
jkarmel wants to merge 1 commit into
omacom:quattrofrom
jkarmel:fix/preserve-bar-space
Open

jkarmel wants to merge 1 commit into
omacom:quattrofrom
jkarmel:fix/preserve-bar-space

Conversation

@jkarmel

@jkarmel jkarmel commented Sep 15, 2026

Copy link
Copy Markdown

Restarting the shell currently drops the bar's exclusive zone, expands tiled windows into that space, then shrinks them again when the bar returns. That's very disruptive while working.

This PR keeps the built-in bar's space reserved throughout shell restarts and crashes, with a status message in the strip until the shell returns.

A separate Quickshell configuration owns the reservation and loads no plugins or authentication services. The interactive bar occupies the same strip without reserving it twice. Bounded socket messages carry the current screens, edge, size, visibility, colors, and readiness. Explicit restarts, abnormal-exit retries, exhausted retries, and clean stops have distinct messages.

Bar space preserved during shell restart

Validation

  • ./test/all passed: CLI suite and all 239 shell test files. Run with LANG=C.UTF-8, LC_ALL unset, and PYTHONDONTWRITEBYTECODE=1; the VM had a default route for the existing network-interface test.
  • Unchanged quattro reproduced the issue: the terminal moved from (12,38) to (12,12) and grew from 1256×750 to 1256×776 when the bar exited.
  • Disposable Omarchy 4.0.3 / Hyprland 0.56.2 / Quickshell 0.3.1 / Qt 6.11.2 VM with accelerated virtual graphics.
  • 30 graphical recovery scenarios across one monitor and two monitors at 100% / 125% scale: all four bar edges, deliberate outages, restart commands, SIGKILL, repeated restarts, hidden bars, and transparency. All 9,115 samples retained the tiled client's exact position and size and the compositor's reserved space.
  • Additional checks: fullscreen and keyboard focus, hiding/showing during an outage, monitor hotplug and removal while the shell is stopped, failure status, and fallback when the reservation host is killed. Screenshots and an 8-second recording inspected.
  • QML lint and shell syntax checks passed. Protocol tests cover malformed data, unsupported versions, partial/coalesced frames, bounded buffers, and detached scalar state. Live socket checks also rejected a duplicate owner without dropping the current reservation, and released an invalid owner’s old zone before fallback. Existing launcher/restart tests cover retry limits, duplicates, session environment, and secure-lock preservation.

Scope and tradeoffs

This protects the built-in bar and its hosted plugins. Full replacement bars keep their existing exclusive-zone behavior. The companion itself or the compositor dying can still cause a layout change; the main bar falls back to owning its own zone if the companion disappears. The extra Qt Quick process measured roughly 80 MiB PSS in this VM.

The companion survives main-shell restarts, so changes to its own QML take effect at the next session start. Architecture, lifecycle, and reproducible acceptance-test instructions are in docs/bar-reservation.md.

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.

1 participant