feat(web): window-wide wallpaper driven by the active pane's scope#57
Merged
Conversation
Move the wallpaper from a per-terminal-pane background to a single window-wide layer behind the whole app, resolved from the active (focused) pane's scope (host+channel cascade). Since one active host scopes the window, this is unambiguous and follows tab/pane/host focus. useActiveWallpaper resolves active tab -> focused pane channel -> host -> the existing cascade profile -> useWallpaper styles; useResolvedProfile is now reactive to host/channel ref changes (guards stale responses). App.vue renders one wallpaper layer (z-index 0) behind a transparent .app-layout (z-index 1); .app-root owns the --nt-bg fallback. TerminalPane no longer renders its own wallpaper; its background stays glass (rgba(--nt-bg-rgb, --nt-terminal-alpha)) so the window wallpaper shows through. All 4 region opacity sliders now act as glass over the one wallpaper. Per-scope config + sliders unchanged.
f646c76 to
8b7d445
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Move the wallpaper from a per-terminal-pane background to a single window-wide layer behind the whole
app, resolved from the active (focused) pane's scope (host+channel cascade). Since one active host
scopes the window, this is unambiguous and follows tab/pane/host focus. All 4 region opacity sliders
(terminal/sidebar/hostRail/tabBar) now act as "glass" over the one wallpaper, so they all become
meaningful — previously only the terminal had a backdrop.
How
useActiveWallpaper: active tab → focused pane channel → its host → the existing per-scope cascadeprofile (
useResolvedProfile) → the existinguseWallpaperstyles (backgroundImage + blur + dim).App.vue: one wallpaper layer atz-index: 0behind a transparent.app-layout(z-index: 1);.app-rootowns the--nt-bgfallback.TerminalPane.vue: removed its ownwallpaper-bg/wallpaper-dim+useWallpaper; the terminalbackground stays glass (
rgba(var(--nt-bg-rgb), var(--nt-terminal-alpha))) so the window wallpaper showsthrough it. Per-scope wallpaper config + the opacity sliders are unchanged.
Correctness (caught by the orthogonal gate, all fixed before merge)
useResolvedProfileis now app-lifetime + reactive, which surfaced several state-correctness issues:Bearer nullbefore pairing / Tauri tokenload); watch the token and reload when it becomes available / rotates.
channelsStore.activeHostIdfor an unmapped active channel(could merge another host's profile after restoring persisted tabs before the channel→host map is
rebuilt) — resolve host-less (global cascade) until the mapping is known, then correct reactively.
DEFAULT_PROFILE+resolvedFor=nullon token loss and on a context changebefore reload (same-context refresh doesn't flash); commit a fetched profile only if request seq + token
or session's profile/wallpaper.
Verification
vitest packages/clients/web→ 778 passed / 0 failed;vue-tscclean;biome checkclean (93 files).New tests: active-wallpaper resolution + unmapped-channel host omission; useResolvedProfile token-gating,
reload-on-token, stale-clear on context/token change.
Gate
Orthogonal pre-PR gate: codex = CLEAN (after fixing its findings across 2 rounds); copilot exogenously
unavailable. Degraded GATE_OK.