Skip to content

feat: void:// deep-link navigation for canvas panels#18

Merged
190km merged 8 commits intomainfrom
feat/deeplink-navigation
Mar 29, 2026
Merged

feat: void:// deep-link navigation for canvas panels#18
190km merged 8 commits intomainfrom
feat/deeplink-navigation

Conversation

@190km
Copy link
Copy Markdown
Owner

@190km 190km commented Mar 29, 2026

Summary

Resolves #17 — URL-based navigation to any part of the infinite canvas.

  • void:// URL scheme: void://open/<workspace_id>/<panel_id> navigates to a panel, void://open/<ws>/@x,y,zoom navigates to canvas coordinates
  • Single-instance IPC: When Void is already running, a second void.exe "void://open/..." sends the URL to the running instance via TCP loopback and exits
  • Persistent panel IDs: Panel UUIDs now survive app restarts (backward-compatible — old layout.json files work fine)
  • "Copy Link" context menu: Right-click any terminal panel → Copy Link → pastes a void:// URL to clipboard
  • Toast notifications: Navigation errors (workspace/panel not found) show a transient overlay
  • Protocol handler registration: Windows NSIS installer registers void:// in the registry; Linux .desktop file with x-scheme-handler/void

URL format

void://open/<workspace-uuid>                       → switch to workspace
void://open/<workspace-uuid>/<panel-uuid>          → focus panel + center viewport
void://open/<workspace-uuid>/@100,200,1.5          → navigate to canvas position (zoom optional)

New files

File Purpose
src/deeplink/mod.rs URL parser with 11 unit tests
src/deeplink/ipc.rs TCP loopback IPC server + client with lockfile discovery
src/deeplink/toast.rs Lightweight toast overlay with fade-out
assets/void.desktop Linux desktop entry with URL handler

Test plan

  • cargo check — compiles clean
  • cargo test --locked — 28 tests pass (11 new deeplink parser tests)
  • cargo clippy --locked --all-targets --all-features -- -D warnings — no warnings
  • cargo fmt --check — formatted
  • Manual: cargo run -- "void://open/<ws-id>/<panel-id>" navigates on startup
  • Manual: Right-click → Copy Link → paste confirms valid void:// URL
  • Manual: With app running, second instance with URL sends to first via IPC

🤖 Generated with Claude Code

190km added 2 commits March 29, 2026 21:55
Enable URL-based navigation to any workspace, panel, or canvas position.
Users can right-click a panel to "Copy Link" and share void:// URLs that
navigate directly to that panel, even across app restarts.

Key changes:
- void:// URL scheme (open/<workspace_id>/<panel_id> or @x,y,zoom)
- Single-instance IPC via TCP loopback so URLs reach the running app
- Panel UUIDs now persist in layout.json for stable deep-link targets
- "Copy Link" in terminal context menu copies void:// URL to clipboard
- Toast notifications for navigation feedback
- Windows void:// protocol handler in NSIS installer
- Linux .desktop file with x-scheme-handler/void

Closes #17
Right-clicking on the empty canvas now shows "Copy Link to Position"
which copies a void:// URL with the exact canvas coordinates and
current zoom level (e.g. void://open/<ws>/@500,300,0.75).
@190km 190km force-pushed the feat/deeplink-navigation branch from fdb1ec8 to 1f44f07 Compare March 29, 2026 19:55
190km added 6 commits March 29, 2026 21:58
Add CFBundleURLTypes to both Info.plist templates (aarch64 + x86_64)
so macOS recognizes void:// links and opens Void.app directly.

Completes cross-platform protocol handler support (Windows, Linux, macOS).
The context menu was on the background area (Order::Background) but the
content layer (Order::Middle) intercepted right-clicks first. Moved to
the content layer's background rect with Sense::click() so right-click
on empty canvas now correctly shows "Copy Link to Position".
…rl+Shift+L)

- Ctrl+L opens a dialog to paste a void:// URL and navigate to it
- Ctrl+Shift+L copies link to focused panel (or viewport position)
- Both commands also available in the command palette (Ctrl+Shift+P)
- Shortcuts filtered from terminal input to avoid PTY interference
The app now silently registers itself as the void:// URL handler each
time it launches, so updates and dev builds work without manual setup.

- Windows: writes HKCU registry keys via reg.exe (no admin needed)
- Linux: writes .desktop file + runs xdg-mime default
- macOS: runs lsregister on the .app bundle to refresh LaunchServices
Check for existing registration before writing anything:
- Windows: query registry key first
- Linux: check if .desktop file exists
- macOS: check LaunchServices for existing handler
The /f flag was at the wrong position in the reg add args, causing the
named value "URL Protocol" to never be created. Chrome/Brave require
this value to recognize custom protocol handlers.
@190km 190km merged commit 29b0d78 into main Mar 29, 2026
8 checks passed
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.

[FEAT] URL Access to each window

1 participant