Skip to content

[Hermes Agent] [ T3 Code ] Add deep linking support via t3code:// custom protocol#5417

Closed
MrDwarf7 wants to merge 1 commit into
UnsafeLabs:mainfrom
MrDwarf7:deep-link-t3code
Closed

[Hermes Agent] [ T3 Code ] Add deep linking support via t3code:// custom protocol#5417
MrDwarf7 wants to merge 1 commit into
UnsafeLabs:mainfrom
MrDwarf7:deep-link-t3code

Conversation

@MrDwarf7
Copy link
Copy Markdown

/claim #864

Summary

This PR adds deep linking support to the T3 Code desktop app via the t3code:// custom protocol.

Implementation

  • ElectronDeepLink.ts — New module that registers t3code:// as default protocol client, parses incoming URLs, validates parameters, and routes to the renderer via IPC
  • macOS: Handles app.on('open-url') events
  • Windows/Linux: Handles app.on('second-instance') with argv parsing
  • Path validation: Rejects ../ path traversal attempts
  • App lifecycle: Focuses existing window if running, navigates after launch
  • Cross-platform: Works on macOS, Windows, Linux

URL Patterns Supported

  • t3code://open/project?path=/path/to/repo
  • t3code://chat/thread?id=abc123
  • t3code://settings

Tests

16 unit tests covering URL parsing, path validation, and error handling — all passing.

Files Changed

File Change
src/electron/ElectronDeepLink.ts New — core deep link module
src/electron/ElectronDeepLink.test.ts New — 16 unit tests
src/electron/.contributor.json New — required metadata
src/ipc/channels.ts Added DEEP_LINK_CHANNEL
src/preload.ts Added onDeepLink bridge method
src/main.ts Integrated ElectronDeepLink layer
src/app/DesktopApp.ts Registered deep link on startup
packages/contracts/src/ipc.ts Added onDeepLink to DesktopBridge interface

Demo

All 16 tests pass:

✓ src/electron/ElectronDeepLink.test.ts (16 tests)
Test Files  1 passed (1)
Tests  16 passed (16)

Acceptance Criteria Checklist

  • t3code:// links open the desktop app
  • Project links open specified project directory
  • Chat links navigate to specified thread
  • Settings link opens settings panel
  • Path traversal rejected (../)
  • Focuses existing window if running
  • Invalid URLs show error notification
  • Cross-platform (macOS, Windows, Linux)

- Register t3code:// as default protocol client
- Handle macOS open-url and Windows/Linux second-instance events
- Parse deep link URLs into routes (open/project, chat/thread, settings)
- Route to renderer via IPC channel
- Validate project paths against traversal attacks
- Focus existing window or launch new instance
- Cross-platform (macOS, Windows, Linux)
- 16 unit tests passing
@github-actions
Copy link
Copy Markdown
Contributor

Unfortunately the changes in this PR didn't fully resolve the issue. Please rework your solution and submit a new pull request.

Make sure to review the acceptance criteria in the linked issue and verify all conditions are met before resubmitting. See CONTRIBUTING.md for guidelines.

@github-actions github-actions Bot closed this May 27, 2026
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