Skip to content

Conversation

@matthewdiamant
Copy link
Contributor

Fixes #1534

When clicking a deep link, sometimes the window is closed. We open up a new window, and then wait until that window has loaded to send a message to the renderer to open an extension link.

The issue is that even though the window has loaded, React has not loaded, so it misses this message.

Instead, we need React to tell the main process that it is ready. So, create a reactReady call that does this. This might be useful later on for other needs as well (deep link or otherwise).

Then, when the main process gets a react-ready message, if there is a pendingDeepLink, it sends the message to the renderer to open the extension link.

@michaelneale
Copy link
Collaborator

.bundle

Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

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

conditionally approved - @matthewdiamant were you able to test it by building into .app - as I think deep links only work when packaged (in any case - a bundle should be available here shortly).

let firstOpenWindow: BrowserWindow;
let pendingDeepLink = null; // Store deep link if sent before React is ready
app.on('open-url', async (event, url) => {
event.preventDefault();
Copy link
Collaborator

Choose a reason for hiding this comment

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

it is ok to remove this? (actually never sure why it was there in the first place)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was able to test deep links without packaging the app, just the regular npm start dev mode environment.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OH WOW - @matthewdiamant I wish I had known this months ago!

@github-actions
Copy link
Contributor

macOS ARM64 Desktop App (Apple Silicon)

📱 Download macOS Desktop App (arm64, signed)

Instructions:
After downloading, unzip the file and drag the Goose.app to your Applications folder. The app is signed and notarized for macOS.

This link is provided by nightly.link and will work even if you're not logged into GitHub.

@lily-de lily-de merged commit 59c5a50 into main Mar 12, 2025
6 checks passed
@lily-de lily-de deleted the mdiamant/1534-deep-link-fix branch March 12, 2025 15:53
sheagcraig added a commit to sheagcraig/goose that referenced this pull request Mar 12, 2025
* upstream/main:
  feat(google_drive): move credentials into keychain, add optional fallback (block#1603)
  feat: add session list command in cli (block#1586)
  feat: google sheets support (in google drive builtin MCP server) (block#1601)
  fix: deep link opening when window is closed (block#1633)
  docs: edits to docker guide (block#1639)
  feat: ollama tool shim (block#1448)
  feat: add write approve mode (block#1628)
  ui: auto update card upon config (block#1610)
  fix: fix tool output expansion checks (block#1634)
  fix: remove conditional that breaks output display for tool calls (block#1631)
  docs: Persistent Command History (block#1627)
  change to make build work on windows, macos, linux (block#1618)
  chore(release): release version 1.0.13 (block#1623)
  fix: handle mac screenshots with the image tool (block#1622)
  feat: write eval results to eval dir (block#1620)
  [fix] fix model config logging to remove api key (block#1619)
  fix: ensure repeating benches return to initial run-dir (block#1617)
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

Clicking a deeplink when goose is not open just opens goose

4 participants