Skip to content

Keep dashboard hide and show in the native F menu - #15

Merged
fdussert merged 5 commits into
fdussert:mainfrom
FlorianBruniaux:codex/native-dashboard-visibility
Oct 15, 2026
Merged

fdussert merged 5 commits into
fdussert:mainfrom
FlorianBruniaux:codex/native-dashboard-visibility

Conversation

@FlorianBruniaux

@FlorianBruniaux FlorianBruniaux commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Adds “Masquer le dashboard / Afficher le dashboard” (English: “Hide the dashboard / Show the dashboard”) to the native F menu. Hiding lends the XENEON display to windows behind the dashboard without quitting Fremkit. Touch and data collection continue. The explicit hidden state survives display rearrangement and Cmd-H, but is held only in memory: restarting the helper shows the dashboard again.

The same visibility decision now drives every registered fence callback. The existing mouse fence pauses while the dashboard is hidden and resumes when it returns, including after a display reconnect. PR #7's WindowFence is still held and is not included here. When it lands, its constructor can register a start/stop callback in fenceUpdates; that makes its two-second window sweep follow the identical hide/show rule. Until that integration lands, this PR does not claim to control the window sweep.

Verification

  • pnpm helper:test: 79 passed.
  • pnpm helper:build, pnpm typecheck, pnpm test: pass (1,368 server and 385 UI tests).
  • The isolated helper build was not installed on the XENEON. The existing local integrated helper was previously tested with real touch and both menu actions; this branch's new fence callback has only compile and test coverage.

@fdussert fdussert left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this, Florian! Being able to get the Edge back for a moment without quitting the helper is a real gap, and the change is small and easy to follow. Keeping the user's choice in a separate DashboardVisibility value, so that setEdgeFrame cannot bring a hidden dashboard back after a display rearrangement, sleep/wake or an Edge reconnect, is exactly the right shape. The menu item is disabled while the Edge is gone, the shim registry is updated, and scripts/test-helper.sh and scripts/build-helper.sh both pass cleanly here.

A few things before this can go in:

  1. Showing the dashboard steals keyboard focus. showDashboard() calls NSApp.activate(ignoringOtherApps: true) and makeKeyAndOrderFront, while every other path in KioskWindow uses orderFrontRegardless() without activating the app. After "Show", the kiosk becomes the key window, so whatever the user types goes to a touch strip with no keyboard. Could you use orderFrontRegardless() (plus NSApp.unhide(nil) only when NSApp.isHidden) and leave activation alone?

  2. Cmd-H in the admin. The "existing hide/show buttons" in the comment on applicationDidHide/applicationDidUnhide are really the admin's "Hide Fremkit" (Cmd-H) menu item. Because of point 1, unhiding the app from the Dock while the admin is open now makes the kiosk key over the admin. Once point 1 is fixed this mostly goes away, but please reword the comment. The || NSApp.isHidden checks are then redundant, since applicationDidHide already sets hiddenByUser.

  3. What touch and the mouse do while hidden. Touches still map onto the Edge, so they land on whatever is underneath, which is often the Finder desktop (taps, drags, and a long press turns into a right-click). The mouse fence is on by default and still keeps the pointer off the Edge, so the windows behind can only be reached by touch and can't be dragged off.

  4. Please have a look at #7. #7 (WindowFence, by @mcouzinet) tackles the same pain automatically: every two seconds, any window that lands on the Edge is moved back to the main display, under the same fence switch. Once it lands, with the fence on there is nothing left behind the kiosk, so "Hide" would mostly reveal the wallpaper. The two fit together well if Hide becomes "borrow the Edge as a normal display": pause both fences (pointer and window sweep) while the dashboard is hidden, and resume them on Show. That also solves point 3. Could you rebase on top of #7, or coordinate with @mcouzinet? They don't conflict textually, so it's really about the behaviour.

  5. Labels. "Hide" and "Show" ("Masquer" and "Réafficher") have no object, while the items around them say "Reload the dashboard". How about "Hide the dashboard" / "Show the dashboard" and "Masquer le dashboard" / "Afficher le dashboard"? README.md line 218 lists the menu items and should mention the new one.

  6. CHANGELOG. ## Unreleased already has an ### Added section; please add the line there instead of opening a new heading at the top. Please also use the project's wording ("the Edge" rather than "XENEON", "the helper's menu" rather than "native F menu") and the bold lead sentence the other entries use.

  7. Tests (minor). testMenuLabelsAreWrittenInBothLanguages pins the exact copy and duplicates L10nTests.testEveryKeyIsWrittenInBothLanguages; I'd drop it. The two state tests are fine.

  8. Nit. In KioskWindow, the new members sit between url and the doc comment of retryWork. A // MARK: - Visibility section after Geometry, with a line of doc on hideDashboard/showDashboard, would match the rest of the file.

A note on persistence: not keeping the hidden state across a helper restart looks right to me (a dashboard that stays dark after a reboot would look broken), so no change needed there, just worth a word in the description.

Thanks again, this is close!

@fdussert

Copy link
Copy Markdown
Owner

Thanks for the quick turnaround, Florian! Everything from the first review is in: no more focus stealing, the separate application-hidden state is a neat way to handle Cmd-H, the mouse fence now pauses while the Edge is borrowed (including across a reconnect), and the labels, README, CHANGELOG and tests all look right. Helper tests (79/79) and the build pass here.

One thing left, and it's the #7 point: the branch doesn't build on #7 yet, and git merge-tree against #7 now conflicts in AppDelegate.swift, README.md and CHANGELOG.md. More importantly, once WindowFence lands, its two-second sweep will keep moving every window off the Edge while the dashboard is hidden, which defeats "Hide". Could you coordinate with @mcouzinet on #7 and have syncMouseFence pause and resume the window sweep as well (perhaps renamed syncFences)? We're holding #7 for now, so the simplest path is probably to make the pause hook generic enough that whichever lands second only has to add one line. A word in the PR description about the hidden state not surviving a restart, and the updated labels, would round it off.

Thanks again, this is very close!

FlorianBruniaux and others added 5 commits October 15, 2026 17:41
Let the user hide and show the XENEON window without quitting the helper. Preserve that choice through display rearrangements while touch and server state continue to run.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Keep one activation rule for the mouse fence and any additional fence registered by the helper. WindowFence can register its start/stop callback without duplicating hide and reconnect handling.

Co-Authored-By: Claude <noreply@anthropic.com>
@FlorianBruniaux
FlorianBruniaux force-pushed the codex/native-dashboard-visibility branch from 368510b to 965175a Compare October 15, 2026 15:43

@fdussert fdussert left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Florian — the generic fence hook is exactly what we needed: #7 can plug into it with one line. Helper tests (79/79) and the build pass here. Merging as a squash.

@fdussert
fdussert merged commit 8019e92 into fdussert:main Oct 15, 2026
1 check passed
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.

2 participants