feat(overlay): transparent floating overlay surfaces for the Deck starter - #5
Merged
Conversation
…n handoff (spike-first sequence)
…lay) Add a reusable always-on-top overlay primitive to the starter, gated behind --features overlay (macOS real window; Linux compile-only no-op). Two small, genuinely-transparent surfaces render together: a top-right frosted rail (generic job-status icons that pulse while running + 3 clickable hover/press buttons) and a bottom-center recording pill (record button toggled by click, or by `space` while Deck is focused, with a red pulse). Each window returns its view entity directly -- no gpui-component `Root` wrapper, which painted an opaque theme background (the old "dark box") -- so the window stays transparent; an objc2 bridge hardens the NSPanel so clicks don't steal another app's focus (the only 2 `unsafe` blocks, in harden.rs). Reuses the existing macOS objc2 stack and surfaces raw-window-handle (already in the tree via gpui -- no new compiled crate). justfile + CI gain the overlay clippy/test matrix (default/tray/overlay/tray,overlay); docs/overlay.md carries the full design. `DECK_OVERLAY=0|1` master-toggles it; `overlay_enabled` defaults true.
…l recipe Redesign the bottom-center recording pill per maintainer feedback: drop the blinking pulse for a steady solid red dot, and show a subtle light circular button + an inline label (muted 'Start' -> bold 'Recording'). The whole pill is the click target; the `space` toggle stays. Fix the "double border": gpui keeps a macOS window shadow on transparent windows (rounded *rectangle*, window-sized), which framed the `rounded_full` pill. Add a `hide_shadow` flag to `harden_panel` and call `NSWindow::setHasShadow(false)` for the pill window so it floats frameless on its own `shadow_lg`; the rail keeps its window shadow (its `rounded_xl` matches the window rect). No new `unsafe` (reuses the existing NSPanel bridge); count stays 2. Document the whole pattern in docs/LEARNINGS.md \xc2\xa718 (transparent PopUp, no Root wrapper, the setHasShadow knob, setBecomesKeyOnlyIfNeeded) so forks have the recipe.
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.
Adds a reusable floating-overlay primitive to the Deck starter behind
--features overlay(macOS real window; Linux compile-only no-op): two small, genuinely-transparent always-on-top surfaces render together — a top-right frosted rail (generic job-status icons that pulse while running + three clickable hover/press buttons) and a bottom-center recording pill (record button toggled by click, or byspacewhile Deck is focused, with a red pulse).Each overlay window returns its view entity directly instead of wrapping it in gpui-component
Root— which painted an opaque theme background (the old "dark box") — so the window stays transparent; a small objc2 bridge hardens the NSPanel so a click doesn't steal another app's keyboard focus (the only twounsafeblocks, both inharden.rs).It reuses the existing macOS objc2 stack and surfaces
raw-window-handle(already in the tree via gpui — no new compiled crate), extends the justfile + CI to the default/tray/overlay/tray,overlay clippy + test matrix, and lands the design docs (docs/overlay.md,docs/background-jobs.md).just ciis green across the full matrix (clippy on all four feature configs; 6 default + 15 overlay tests); the on-screen transparency/placement and the over-other-apps focus behavior still want a manual macOS GUI run.