Skip to main content
The shell⇄feature route-token contract — the navigation provider, links, and resolution hooks.
A real anchor (so middle-click / open-in-new-tab keep working) that drives a client-side transition on plain left-click. Modified clicks (new tab/window, download) fall through to the browser’s default handling. Props Related: AppLinkProps

AppLinkProps

Properties Related: RouteSearch
How a token navigation enters session history. The default is a PUSH: a move the reader made, which Back must be able to undo. replace overwrites the current entry instead, and is for a transition the reader did NOT make — a page rewriting an unrenderable URL of its own accord. Pushing such a rewrite leaves the URL it rewrote sitting behind Back, where pressing Back rewrites it again and pushes again: a page no Back can leave. Properties
The runtime navigation surface the shell provides through NavigationProvider. navigate performs a client-side transition, by default pushing a history entry — see NavigateOptions for the third argument that replaces one instead. resolvePath produces the href a link should point at (so an AppLink is a real anchor — middle-click / open-in-new-tab work — while still driving a client-side transition on plain click). navigatePlugin/resolvePluginPath are the plugin-page twins: they target a runtime plugin path (/plugins/{pluginId}/{pagePath} plus an optional validated sub-path params and search), NOT a route token — routes.ts never learns plugin paths. Plugins reach these two via the usePluginNavigation hook. Properties Related: NavigateOptions, PluginNavigateOptions, PluginSearch, RouteSearch, RouteSearchByToken
A navigation guard’s decision function, run while armed before any SDK-controlled navigation commits (navigate, navigatePlugin, or a browser back/forward). Returns true to proceed, false to veto; a promise lets it await a confirm dialog. Guards compose — navigation proceeds only if every armed guard allows, and the first veto blocks (at most one dialog). A full-page unload can’t await, so it is covered by a beforeunload prompt independent of this handler.
Parameters Related: NavigationContextValue

PageProps

Props the shell passes to a feature’s page component: the route’s typed search parameters. Features type their exported page as PageProps<'tools'> and read search — they receive route state as data, never by importing the router. Properties Related: RouteSearch

PluginNavigateOptions

Per-navigation options for navigatePluginWithOptions. replace mirrors replace: overwrite the current history entry instead of pushing a new one (a page rewriting its own unrenderable URL). state is an opaque, per-history-ENTRY bag the host stores ON the destination history entry, namespaced to the navigating plugin, and hands the page back as entryState. It survives back/forward traversal AND a hard reload — the browser persists history.state across a document load, verified in a real browser against the router’s pinned major before this channel was built. Two hard rules bind the value:
  • JSON-ROUND-TRIP: it is serialized into history.state, so it must survive structured-clone / JSON semantics — plain data only, no functions, DOM nodes, or class instances. The page reads back a structural COPY, never the same reference it wrote.
  • SIZE: history.state is browser-bounded (Firefox caps a serialized entry at 16 MiB; others higher). Keep a slot SMALL — a soft cap of ~32 KB — and store only view state (a selection, a scroll anchor, a draft id), never bulk data. Oversized state risks a browser-thrown navigation; the host does not police the cap, so the discipline is the plugin’s.
Properties

PluginSearch

A plugin page’s deep-link search object. Plugin paths are RUNTIME contributions outside the compile-time RouteToken map, so their search is an open bag of serializable values (the page’s own PluginPageParamsSchema validates it); this is deliberately NOT a RouteSearch.

RouteSearch

The search parameters a given route token accepts. Related: RouteSearchByToken

RouteSearchByToken

Every top-level route the shell owns, mapped to its typed search parameters. A route with no parameters maps to the empty object. Detail views are driven by a search parameter (e.g. the selected tool / connection), keeping the route map flat — one entry per feature surface, matching the shell route map. Properties

RouteToken

An opaque, typed handle to a shell route. Related: RouteSearchByToken

SearchCommitParams

The inputs a page hands useSearchCommit: the route token the commit targets, the container whose delegated Enter/blur commits, the search input’s accessible name (the delegation keys the input on it), the committed value now in the URL, the live draft, the page’s composer of the full search object from the next query (undefined when the box is empty), and the loud message thrown if the container ref never attaches. Properties Related: RouteSearch

useAppNavigate

Imperative navigation to a shell route token with its typed search params. Related: NavigateOptions, RouteSearch, RouteSearchByToken

useNavigationGate

Consult the armed navigation guards before a transition the shell drives itself (a chrome link whose target is outside the route-token map). Resolves true when the navigation may proceed. Token and plugin navigations already run this gate inside NavigationProvider; this is the escape hatch for the shell’s own raw-path links, without which such a link would bypass every armed guard.

useNavigationGuard

Block navigation away from the current page while when is true. handler is consulted before any SDK-controlled navigation commits — a route-token navigate, a plugin navigate, or a browser back/forward — and the navigation proceeds only if it resolves true; a promise lets the handler drive a confirm dialog. A full-page unload (tab close / refresh) is additionally covered by a native beforeunload prompt that fires whenever any guard is armed. Guards compose against the provider’s shared registry: a feature and a plugin page may each arm one, and any veto blocks. Parameters Related: NavigationGuardHandler

usePluginEntryNavigation

Plugin-page navigation WITH the per-history-entry state channel: navigatePluginWithOptions navigates and writes a per-entry state slot, and updatePluginEntryState checkpoints the CURRENT entry’s slot in place (no navigation). Both require a host that provides the channel; on an OLDER host that predates it, this hook THROWS a loud, descriptive error rather than silently degrading — the plugin then knows to fall back or the deployment knows to update the host. A plugin that only navigates without carrying state should keep using usePluginNavigation, which every host supports. Related: PluginNavigateOptions, PluginSearch

usePluginNavigation

Plugin-page navigation: navigatePlugin drives a client-side transition to a runtime plugin path, resolvePluginPath yields its href. These are the ONLY navigation methods a plugin page uses to reach its own deep-linkable sub-paths — the token-typed useAppNavigate/useResolvePath address the shell’s compile-time routes and know nothing of plugin paths. Related: NavigationContextValue

useResolvePath

Resolve a token + search to the href the shell would route to. Related: RouteSearch, RouteSearchByToken

useSearchCommit

The shared commit behavior for a filter box that writes its text into a route-token search param. The SDK search input is controlled (value/onChange only), so the URL commit is delegated on the CONTAINER: Enter or an edited blur of the search box writes the URL. The listeners bind once — the latest draft and committed value are read from a ref, never re-bound per keystroke. A commit REPLACES the current history entry rather than pushing: a filter change refines the current view, not a place Back should step back through one keystroke-commit at a time. A cleared box commits undefined so the URL and box cannot drift. A redundant commit (the draft already the committed value, trimmed both sides, so a padded deep-link never self-commits without a real edit) writes nothing. Props Related: SearchCommitParams