Skip to content

fix(desktop): keep cold-start deep links - #45332

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
electron-audit-9
Open

fix(desktop): keep cold-start deep links#45332
opencode-agent[bot] wants to merge 1 commit into
v2from
electron-audit-9

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • collect opencode:// URLs from the initial process arguments on Windows and Linux
  • reuse one argument parser for cold starts and second-instance launches
  • cover one and multiple deep-link arguments

Why

Electron delivers a cold-start protocol launch through process.argv on Windows and Linux. Desktop only inspected second-instance arguments, so clicking an opencode:// link while the app was closed launched OpenCode but discarded the destination.

Checks

  • bun typecheck (packages/desktop)
  • bun test src/main/lifecycle/deep-links.test.ts (2 pass)
  • bun x prettier --check src/main/lifecycle/deep-links.ts src/main/lifecycle/deep-links.test.ts src/main/lifecycle/index.ts
  • git diff --check
  • full desktop bun test: 82 pass; host Node 18 lacks node:sqlite for drafts.test.ts

Requested by: @Hona (Hona via Slack)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant