Fix PWA WCO sidebar tab icon visibility and complete dock safe-area insets #141
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Installed Chromium desktop PWAs can hide the native title bar via Window Controls Overlay (WCO) and draw app chrome edge-to-edge. A series of fixes landed for theme color, unified chrome background, platform safe areas, collapsed title-bar geometry, and top-tab layout — but sidebar dock tab icons (left and right) are still not visible in WCO mode, and the chrome bottom border is missing while the overlay is active. This issue tracks the remaining fix and documents what already shipped.
Problem
After enabling WCO in the installed PWA:
tabs-sidebar.svelte→.sidebar-workspace-tab-header-container) do not render in a usable way. Center top tabs were fixed for collapsed/expanded title-bar geometry, but the sidebar dock headers were not fully corrected.data-pwa-titlebar-hiddenis absent, but WCO always setsdata-pwa-titlebar-hidden="true".Users on macOS Chrome PWAs (and Windows/Linux where WCO is supported) see broken top chrome in the sidebar docks even though center tabs may look correct.
Background — fixes already applied
The following PWA header / title-bar work is already merged (2026-05-29,
@lapis-notes/web+ shared workspace shell CSS):Host theme and manifest
host-theme-color.ts— dynamic<meta name="theme-color">synced to--workspace-chrome-background(not static brand blue).index.html— light/dark bootstrap theme-color metas.vite.config.ts— manifesttheme_color/background_coloraligned to shell tokens (#f6f6f6light baseline);display_override: ["window-controls-overlay", "standalone"].PWA host document and runtime markers
pwa-host-document.ts— earlydata-pwa-host="true",data-runtime="web-pwa",data-os, installed-PWA detection before workspace mount.Window Controls Overlay geometry
pwa-window-controls.ts— tracks display mode, setsdata-pwa-titlebar-hidden="true"in WCO, listens togeometrychange, mirrors overlay rect into CSS custom properties.pwa-window-controls-core.ts— pure inset helpers:getTitlebarAreaRect().height === 0with known width, top inset clears to 0 so negative-margin tab headers are not clipped off-screen (initial all-zero rect still uses platform default).packages/web/src/pwa-window-controls.test.ts(7 cases).Unified chrome background
workspace-shell.css—--workspace-chrome-background: var(--sidebar)wired to--tab-container-background,--titlebar-background,--ribbon-background.host-theme-color.tsand popout theme mirroring resolve--workspace-chrome-backgroundfirst.WCO layout CSS (shared workspace shell)
Under
@media (display-mode: window-controls-overlay)andhtml[data-pwa-host="true"]:--workspace-safe-area-top,--workspace-safe-area-left,--workspace-safe-area-right.::beforeon:rootfills the top safe-area strip with chrome background (z-index: 1000).margin-top+padding-topon--workspace-safe-area-top, withz-index: 1001.mod-top-left-space,mod-popout-left-safe-area) and chrome header row first child.::before; macOS ribbonpadding-left(likely incorrect — pushes icons out of the ~48px column; cleanup planned).Visible title-bar border (partial)
:not([data-pwa-titlebar-hidden="true")]).Collapsed title bar regression fix + tests
packages/workspace/e2e/pwa-title-bar.spec.ts(collapsed 0px vs expanded 38px top-tab layout).Spec updates
packages/web/spec.mdspec/src/20-packages/web/index.mdRelevant commits (jj, 2026-05-29)
Goal
Make installed PWA WCO chrome fully usable for both sidebar docks:
--workspace-sidebar-header-border.Scope
A. Sidebar tab header flex / height under WCO (left and right docks)
Both docks use
tabs-sidebar.svelte. The header bar has inlineflex: 0 0 var(--header-height)and fixedh-[var(--header-height)], which conflicts with WCOpadding-top: var(--workspace-safe-area-top).In
workspace-shell.cssWCO block:.workspace-shell__tabs--sidebar > .workspace-shell__tab-header-barflex basis tocalc(var(--header-height) + var(--workspace-safe-area-top))..sidebar-workspace-tab-header-containerheight under WCO:height: auto; min-height: var(--header-height); align-items: center.B. Split-scoped safe-area insets
.workspace-shell__split--left .sidebar-workspace-tab-header-container→padding-left: calc(var(--size-4-2) + var(--desktop-titlebar-left-split-gap))(mirror Electron rule; uses traffic-light gap minus ribbon width)..workspace-shell__split--right .sidebar-workspace-tab-header-container→padding-right: calc(var(--size-4-2) + var(--workspace-safe-area-right)).padding-righton sidebar outer header bars — keep center top tabs on outer bar; move sidebar dock insets to inner container via split-scoped rules to avoid double padding on the left dock.C. WCO chrome bottom border
Add border rule for
data-pwa-titlebar-hidden="true"on top-tab, sidebar-tab, and chrome-header-row surfaces inside the WCO media block.D. Cleanup
Remove incorrect macOS full
--workspace-safe-area-leftpadding on the narrow ribbon column (~48px wide).Non-goals
Acceptance Criteria
[role='radio']in.workspace-shell__split--left .sidebar-workspace-tab-header-container) have non-zero visible size in both collapsed (0px top inset) and expanded (~38px top inset) title-bar states..sidebar-workspace-tab-header-containerreceivespadding-rightthat includes--workspace-safe-area-right..sidebar-workspace-tab-header-containerreceives left-split-gap padding (not full traffic-light width on the ribbon).--workspace-sidebar-header-border) in WCO mode.packages/workspace/e2e/pwa-title-bar.spec.tsfor sidebar icons, right inset, and border.pnpm --filter @lapis-notes/web checkand workspace Playwright spec pass.make spec-lintpasses when spec is touched.Root-cause notes (investigation)
Border rule at
workspace-shell.csslines ~202–210 excludesdata-pwa-titlebar-hidden="true", which WCO always sets.Suggested Files or Specs To Inspect
packages/workspace/src/lib/styles/workspace-shell.css— WCO block (~lines 190–340)packages/workspace/src/lib/components/tabs/tabs-sidebar.svelte— sidebar tab header markuppackages/workspace/src/lib/components/sidebar/sidebar-left.sveltepackages/workspace/src/lib/components/sidebar/sidebar-right.sveltepackages/web/src/pwa-window-controls.tspackages/web/src/pwa-window-controls-core.tspackages/workspace/e2e/pwa-title-bar.spec.tspackages/web/spec.mdspec/src/20-packages/web/index.mdValidation Commands
Manual verification requires reinstalling/relaunching the PWA after manifest changes for WCO to activate.
Follow-up Tasks
padding-leftinteraction with macOS traffic lights separately from dock tab icons.Implementation Summary
Explicitly colored WCO sidebar tab icons and tightened the PWA regression to assert painted icon contrast.
Reopen Reason
Sidebar dock icons still respond but are not visibly painted in PWA WCO mode; investigate rendering/color and tighten regression coverage.