-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Fix dev tools command invocation #544
base: v1.0
Are you sure you want to change the base?
Conversation
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
a30a992
to
d4c52c4
Compare
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
Desktop App for this PRThe following build is available for testing: The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder. This link is provided by nightly.link and will work even if you're not logged into GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we can avoid the cross-env command would probably be for the best given its status
@@ -36,6 +36,7 @@ | |||
"@typescript-eslint/parser": "^6.21.0", | |||
"@vitejs/plugin-react": "^4.3.3", | |||
"autoprefixer": "^10.4.20", | |||
"cross-env": "^7.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lily-de do we need this - as the repo has been archived or is no longer maintained
Purpose of the Changes
The goal of this PR was to fix a bug where the
Option+Cmd+I
shortcut always triggered DevTools in the Electron app, even when the app was not in focus. This created conflicts when using the same shortcut in other applications (e.g., Chrome or iTerm).The changes ensure:
Original Bug
Option+Cmd+I
opened DevTools in the Electron app even when other applications (e.g., Chrome or iTerm) were in focus.globalShortcut.register
) forOption+Cmd+I
, which triggered DevTools regardless of the app's focus.Summary of Code Changes
Replaced Global Shortcut with App-Focused Logic:
globalShortcut.register
forOption+Cmd+I
.before-input-event
listener to open DevTools only when the Electron app is in focus.Environment-Specific Behavior:
Cmd+Option+I
opens DevTools only when the Electron app is focused.Cmd+Option+I
does nothing, and any attempt to open DevTools is immediately blocked.Updated
package.json
Scripts:cross-env
to manageNODE_ENV
values for different environments.start-gui
now setsNODE_ENV=development
.make
setsNODE_ENV=production
for production builds.How the Changes Were Tested
Development Mode:
npm start
:Option+Cmd+I
opens DevTools only when the Electron app is focused.Option+Cmd+I
works normally in other apps (e.g., Chrome, iTerm).NODE_ENV=development
andisDev=true
.Simulated Production Mode:
npm run make
to test production behavior. This created a Goose binary inui/desktop/out/Goose-Darwin-arm-64
Option+Cmd+I
does nothing.Option+Cmd+I
continued to work in Chrome