feat(bar): notch bar appearance option (LAC-3037) - #483
Open
lacymorrow wants to merge 2 commits into
Open
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
lacymorrow
force-pushed
the
LAC-3037/notch-bar-appearance
branch
from
July 23, 2026 22:12
ab1d83f to
9b15713
Compare
Owner
Author
|
Review + hardening pass (6f66368). The red `claude-review` check is infrastructure, not a review verdict — the workflow's `CLAUDE_CODE_OAUTH_TOKEN` secret doesn't exist yet (tracked as LAC-3035), so the action fails env validation on every PR. As a substitute, a local code-reviewer agent pass ran over the full diff; fixes applied:
Verified: `cargo clippy` clean, 7/7 `notch_layout` unit tests pass (incl. new `frame_matches` test), frontend typecheck/build green in CI. |
Adds 'notch' as a 7th bar_appearance that docks the floating bar top-flush over the MacBook notch, above the menu bar: - notch_layout module (pure math, 6 unit tests): geometry from NSScreen safeAreaInsets + auxiliaryTop*Area, fixed canvas sizing, top-flush centered frame - notch module (macOS): enter/exit via run_on_main round-trip, window level NSMainMenuWindowLevel+3, collection behavior re-asserted on every mode entry; non-macOS no-op stubs - get_notch_geometry command so the frontend draws a silhouette aligned with the hardware cutout - NotchBar component: CSS-only state transitions inside the fixed canvas (window never resized per state), no drag/resize hooks; centered pill fallback on notch-less displays - applied at startup when the saved appearance is 'notch', restored to the default floating frame on switch-away Co-Authored-By: Paperclip <noreply@paperclip.ing>
- enter/exit_notch_mode return Result so window-apply failures reach the ui_set_bar_config caller instead of being logged and swallowed - re-anchor the notch bar on floating-bar Moved/ScaleFactorChanged run events (display plug/unplug, scaling changes); loop-safe via a frame_matches guard that skips setFrame when already in place - serialize appearance transitions with a static mutex so overlapping ui_set_bar_config calls cannot leave the window contradicting the stored config Co-Authored-By: Paperclip <noreply@paperclip.ing>
lacymorrow
force-pushed
the
LAC-3037/notch-bar-appearance
branch
from
July 23, 2026 23:04
6f66368 to
d94c30a
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.
Summary
Implements the
notchbar appearance from the LAC-3030 investigation (plan:docs/plans/notch-bar-appearance-option.md). Paperclip issue: LAC-3037.The floating bar can now dock top-flush over the MacBook notch, above the menu bar — a Dynamic-Island-style home for Juno's status/input UI.
Backend (Rust)
notch_layoutmodule (platform/macos.rs) — pure, platform-independent layout math: notch geometry fromsafeAreaInsets/auxiliaryTopLeftArea/auxiliaryTopRightArea, fixed canvas sizing, top-flush centered frame. 6 unit tests.notchmodule —enter_notch_mode/exit_notch_modeon the main thread viarun_on_main_threadround-trips; window levelNSMainMenuWindowLevel+3(27); overlay collection behavior re-asserted on every mode entry (macOS silently dropsCanJoinAllSpaceson re-order). Non-macOS stubs keep the option selectable elsewhere.get_notch_geometrycommand — frontend reads the silhouette dimensions from the backend (single source of truth).NSFloatingWindowLevel.Frontend (TS)
NotchBarcomponent — black silhouette welded to the bezel. All state transitions (idle → hover peek → input → working/listening/error) are CSS-only inside a fixed window canvas; the window is never resized per state, so the shape never detaches from the bezel mid-animation.Out of scope (per plan, file separately)
Non-activating-panel typing, click-through cursor poll, SkyLight space pinning.
Verification
cargo checkclean;cargo clippy0 warningscargo test notch_layout: 6/6 passnpx tsc --noEmitcleannpm test notch-bar.test.tsx: 5/5 pass (silhouette sizing, pill fallback, CSS expansion, input submit, idle click)constants.generated.tsregenerated viascripts/generate-ts-constants.js— reproduces the committed diff exactlyPrototype finding
A plain borderless NSWindow at level 27 positioned programmatically is not clamped by
constrainFrameRect:toScreen:, so notauri-nspaneldependency or dynamic ObjC subclass was needed for Phase 1.