Skip to content

docs: add design document about deep-links#1591

Closed
kantord wants to merge 1 commit intomainfrom
add-adp
Closed

docs: add design document about deep-links#1591
kantord wants to merge 1 commit intomainfrom
add-adp

Conversation

@kantord
Copy link
Copy Markdown
Member

@kantord kantord commented Feb 10, 2026

this removes references to a private document from the codebase. The full document (with all details, about 30 pages) will still probably be published later, but probably for the repo this is enough

@kantord kantord marked this pull request as ready for review February 10, 2026 15:07
Copilot AI review requested due to automatic review settings February 10, 2026 15:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an internal ADR for deep link behavior and updates documentation/code comments to reference it instead of a private external design document.

Changes:

  • Added ADR-001 documenting deep link schema, platform considerations, and handling approach.
  • Updated docs to link to ADR-001 instead of a private Google Doc.
  • Updated the deep link definitions file header comment to point at the ADR.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
docs/adr/001-deep-links.md Introduces ADR-001 describing the deep link design and operational considerations.
docs/README.md Replaces the private design doc link with a link to ADR-001.
common/deep-links.ts Updates the header comment to reference the ADR in-repo.


## Context

ToolHive Studio needs a way for external systems (browsers, CLI tools, enterprise dashboards) to open the app and navigate to a specific view — for example, opening an MCP server detail page by name. This is commonly solved with custom protocol handlers (deep links).
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The ADR title uses “ToolHive Desktop”, but this sentence refers to “ToolHive Studio”. Please pick one product name and use it consistently throughout the ADR (and ideally align with the name used elsewhere in the repo/config) to avoid confusion about what application the decision applies to.

Suggested change
ToolHive Studio needs a way for external systems (browsers, CLI tools, enterprise dashboards) to open the app and navigate to a specific view — for example, opening an MCP server detail page by name. This is commonly solved with custom protocol handlers (deep links).
ToolHive Desktop needs a way for external systems (browsers, CLI tools, enterprise dashboards) to open the app and navigate to a specific view — for example, opening an MCP server detail page by name. This is commonly solved with custom protocol handlers (deep links).

Copilot uses AI. Check for mistakes.

Example: `toolhive-gui://v1/open-registry-server-detail?serverName=fetch`

The URL is parsed using the standard `URL` constructor — the version maps to `url.host`, the intent to `url.pathname`, and parameters to `url.searchParams`.
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This description says the intent maps to url.pathname, but the implementation strips the leading slash (i.e., url.pathname.replace(/^\//, '')). Please update the ADR wording to match the actual parsing behavior so readers don’t accidentally treat the intent as starting with '/'.

Suggested change
The URL is parsed using the standard `URL` constructor — the version maps to `url.host`, the intent to `url.pathname`, and parameters to `url.searchParams`.
The URL is parsed using the standard `URL` constructor — the version maps to `url.host`, the intent to `url.pathname` with the leading `/` stripped (i.e. `url.pathname.replace(/^\//, '')`), and parameters to `url.searchParams`.

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +67
Deep link definitions are co-located as Zod schemas that declare the intent name, parameter schema (with sanitization via regex), and navigation handler. The `deepLinkSchema` is a discriminated union over all registered intents. Invalid or unknown deep links are rejected at parse time.

Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This claims invalid/unknown deep links are “rejected at parse time”, but the current flow parses/validates and then explicitly navigates to the not-found experience (via the show-not-found intent) when parsing/validation fails. Please clarify the behavior in the ADR (e.g., “validation fails and we route to notFound”) to keep the Decision and Error handling sections consistent with the implementation.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

@peppescg peppescg left a comment

Choose a reason for hiding this comment

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

Why a ADR inside the docs?

@kantord kantord self-assigned this Feb 10, 2026
@kantord kantord enabled auto-merge (squash) February 18, 2026 18:55
@kantord kantord closed this Mar 3, 2026
auto-merge was automatically disabled March 3, 2026 10:27

Pull request was closed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants