Skip to content

feat(data-inspector): deep link to a data source - #152

Merged
antfu merged 1 commit into
mainfrom
feat/deep-linking
Jul 31, 2026
Merged

feat(data-inspector): deep link to a data source#152
antfu merged 1 commit into
mainfrom
feat/deep-linking

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

What

Make deep-linking to a specific data source first-class in the Data Inspector, and document deep linking as a cross-devframe pattern.

Data Inspector

  • Shareable state moves to the URL hash. Source, query, filters, and the auto-rerun setting now live in #source=…&query=… instead of the query string, so a copied link reproduces an exact result while leaving the query string free for the server handshake token (?devframe_auth_token=, scrubbed on read).
  • Live reaction. A hashchange listener re-applies the full state on back/forward and manual address-bar edits; writes stay on replaceState so keystrokes never stack history entries.
  • In-hub focus. The SPA subscribes to the devframe:docks:active shared-state slot and selects the source named in an activation's params.sourceId, converging once it registers — mirroring how the terminals dock focuses a session. Inert outside a hub.

Docs

  • New docs/guide/deep-linking.md (registered in the Guide sidebar) — leads with in-hub dock activation, then standalone URL-hash links, with one mermaid diagram; cites Terminals and Data Inspector as the reference examples.
  • A "Deep linking" section on the Data Inspector plugin page.
  • A "Deep linking" note on the Terminals plugin page documenting its previously-undocumented #id=<sessionId> hash link.

Verification

pnpm build, pnpm typecheck, pnpm lint, and pnpm docs:build all pass (VitePress dead-link checking included).


This PR was created with the help of an agent.

Carry the shareable workbench state in the URL hash instead of the query
string, and add a live hashchange listener so back/forward and manual edits
re-apply source, query, filters, and auto-rerun. Keeps a copied link
reproducing an exact result while leaving the query string free for the
server handshake token.

Focus a source when mounted in a hub: subscribe to the devframe:docks:active
slot and select the source named in an activation's params.sourceId,
converging once it registers — mirroring how the terminals dock focuses a
session.

Document deep linking as a cross-devframe pattern: a new guide page leading
with in-hub dock activation and covering standalone URL-hash links, plus
sections on the Data Inspector and Terminals plugin pages.
@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit 9872c0f
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a6c37ed052ff80008449cba
😎 Deploy Preview https://deploy-preview-152--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu
antfu merged commit 228802b into main Jul 31, 2026
10 of 12 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.

2 participants