Skip to content

fix(app): open project deep links in new layout#35223

Open
anduimagui wants to merge 2 commits into
anomalyco:devfrom
anduimagui:desktop-deeplink
Open

fix(app): open project deep links in new layout#35223
anduimagui wants to merge 2 commits into
anomalyco:devfrom
anduimagui:desktop-deeplink

Conversation

@anduimagui

@anduimagui anduimagui commented Jul 3, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #35225

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Desktop opencode://open-project?directory=... and opencode://new-session?directory=... links reached Electron, but the redesigned app layout did not consume them because the deep-link listener lived inside the legacy layout. In dev, where the redesigned layout is enabled by default, links could be logged by the main process without showing the requested project or opening the new-session composer.

This adds a small shared useDeepLinkListener hook for the common drain/subscribe plumbing, keeps URL parsing in layout/deep-links.ts, and lets each layout keep its own behavior. The legacy layout still opens/navigates to project sessions; the redesigned layout now opens and selects projects on the home view, handles optional open-project session links, and creates draft tabs for new-session links.

How did you verify your code works?

  • bun typecheck from packages/app
  • bun test --preload ./happydom.ts ./src/pages/layout/helpers.test.ts from packages/app
  • Pre-push hook: bun turbo typecheck
  • Live desktop dev check with open 'opencode://open-project?directory=%2FUsers%2Fandrewmagu%2Fsrc%2Fpible'; confirmed the renderer main view showed pible via Electron CDP
  • Live desktop dev check with open 'opencode://new-session?directory=%2FUsers%2Fandrewmagu%2Fsrc%2Fpible'; confirmed the renderer showed the new-session composer scoped to pible via Electron CDP

Screenshots / recordings

Not included. Verified the UI behavior live in the desktop dev app.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

bug(app): open-project deep links do not select project in new layout

1 participant