Repository navigation
π dashboard: kiosk mode renders dark by default - #15623
Conversation
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
The change reads correctly: boot.js:18-19 set window.HIVE_KIOSK / hiveKioskMode before the theme block at boot.js:26-31, and the generated index.html:6708-6721 mirrors that order, so the override is applied before first paint; getLayout() in layout.js:230 applies the same rule for later reads, and the toggle is hidden in kiosk anyway.
One suggestion, not a defect: TestKioskModeWiring (src/pkg/dashboard/kiosk_mode_test.go:14-25) pins every other piece of kiosk wiring by asserting the exact line is present in index.html, but neither the new boot override nor the getLayout override is in its wants list. Adding the two lines there would make this behaviour fail-without-test like the rest of the kiosk mode.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Looks correct to me. Verified at 4fc8a08:
window.HIVE_KIOSKandwindow.hiveKioskModeare assigned atboot.js:18-19, in the same IIFE and before the theme read atboot.js:26-32, so the first-paint override sees the flag. ThegetLayout()override atlayout.js:230runs after boot, so both thelight-modebody class and latergetLayout()callers agree.- The override only reads
localStorageand the URL; the kiosk never-writes-localStorage invariant from the header comment atboot.js:8-14still holds (thesetLayoutcalls atlayout.js:231-232are reached only for legacyopenclaw/classicstored values, which the override replaces before they are tested). static/index.htmlis in sync withstatic-src/:go run ./pkg/dashboard/webstatic/gen -src pkg/dashboard/static-src -out pkg/dashboard/static/index.html -checkexits 0 on this head.- Non-kiosk behaviour is unchanged: both guards are behind the kiosk flag, and the
!m β 'light'default is preserved for normal sessions.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
The headless streamer (#15594) starts from an empty Chromium profile, and the layout default when
hive-layout-modeis unset is light β so the Twitch stream came up in light mode. In kiosk mode the theme is forced to dark (&theme=lightopts out) both at first paint in boot.js and ingetLayout(); kiosk never writes localStorage. Docs + changelog.