Repository navigation
Add focus-stage extension - #33919
Conversation
- Icon: full-size window with a cool-grey outline - Extension icon fills its canvas edge to edge - Icon: pastel periwinkle tile - Icon: pastel sage tile - Icon: window centered on a neutral grey tile - Test the full-window icon; colour menu bar icons - Menu bar icons from the new icon; rename the extension icon - New icon: relieved face in a window, designed in Paper - Store screenshots: real sessions in Zed with a sample project - Keep the backdrop in place when the app reorders its windows; end on quit while starting - Hide the Dock during a session (on by default) - Rename label to "Focus Stage on", lead the description with what it does - Initial commit: Focus Stage
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
[Medium impact] No blocking issue remains within this follow-up review’s scope. SummaryAdds Focus Stage commands to center a window, cover other windows, and restore desktop settings when the session ends.
Reviews (11) · Last reviewed commit: "Update CHANGELOG.md and optimise images" · Reviewed by Greptile |
0xdhrv
left a comment
There was a problem hiding this comment.
Hey @mirkopoloni 👋
Thanks for Focus Stage, the recovery record behind Reset Focus Stage and the way you worked through the Greptile findings are really well thought out 🔥
Here's everything I found in this pass:
Should fix
-
src/focus-stage-menu-bar.tsx:24and:26:showFailureToastis called from the menu bar item'sonAction. Menu bar commands run in the background, where the Toast API isn't available, so when starting or ending a session fails, users would see an error instead of your message. Please useshowHUDfor these two messages. The toasts intoggle-focus-stage.tsandreset-focus-stage.tsare fine, since those are no-view commands.if (outcome.error) await showHUD(`Focus Stage didn't start: ${outcome.error}`);
Feel free to reach me here or on Slack if anything is unclear.
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
Focus Stage puts one window on stage: Toggle Focus Stage centers the focused window, covers everything else on every display with a plain backdrop (light or dark, optional grain, a soft accent-colored glow around the window, a small "Focus Stage on" label), auto-hides the menu bar and the Dock and, optionally, holds notification banners until the session ends. Running it again restores everything exactly as it was. Nothing is hidden or quit: the backdrop only covers other windows, so the desktop comes back unchanged.
Commands:
Full-screen windows are handled (their display is left alone, the others are covered), as are several displays and other apps in full screen on other displays.
How it's built
The extension uses Raycast's Swift support (
raycast/extensions-swift-tools); all native code is inswift/and compiled byray build, no prebuilt binaries. A session needs a process that stays alive (one borderless panel per display, Accessibility observers for the focused window), sotoggleStagestarts the same compiled Swift binary as a detached helper and talks to it through a state file inenvironment.supportPath. The helper exits when the session ends;SIGTERMmakes it restore everything first. It inherits Raycast as its responsible process, so it uses Raycast's Accessibility permission.Things I'd like your opinion on
SIGSTOPto the user's ownNotificationCenterprocess at the start andSIGCONTat the end. Notifications are still delivered and kept; the banners appear when the session ends. It's resumed on every new session and by Reset Focus Stage, and the README explains it and how to undo it by hand. I think it's an important part of the extension, but it pauses a system process, so please tell me if this is acceptable for the Store or if you'd prefer it removed._AXUIElementGetWindow(looked up withdlsym, with a fallback that matches window frames), the same function Rectangle, yabai and AltTab use.Screencast
No screencast; the screenshots in
metadata/show a session.Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder