a plugin owns the routing under its mount

Reverts the manifest route table. Declaring a plugin's URLs to the platform put
the platform in the middle of a decision that is not its own, and it was more
code than what it replaced.

One splat where there were two routes. A splat matches zero segments, so the
bare route still works, and the plugin reads its own position off the location.
The platform owns where a plugin starts and nothing after it — the same line
mountPrefix already draws around its API.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-01 07:17:33 +01:00
co-authored by Claude Opus 5
parent 1fe767ea77
commit 898209725a
5 changed files with 24 additions and 201 deletions
@@ -21,7 +21,6 @@ export function PluginScreen({
screenId,
panels,
layout,
layoutKey,
}: {
/**
* This SCREEN's id, not the plugin's — `caldav/calendar`, not `caldav`.
@@ -33,14 +32,6 @@ export function PluginScreen({
screenId: string;
panels: AppRegistryMeta[];
layout: LayoutNode;
/**
* What to persist sizes under, when this route's arrangement is not the screen's default.
*
* A plugin with a route table can give one route a different layout, and two arrangements sharing one
* key would each remember the other's dividers — which reads as a layout that will not stay put. The
* route's own path pattern is the suffix, so it is stable across every URL that matches it.
*/
layoutKey?: string;
}) {
// Per-user and per-plugin, so two plugins never share a layout and a user's arrangement is their own.
//
@@ -48,7 +39,7 @@ export function PluginScreen({
// `layout` on every render, while only the sizes are the user's and persisted. That is what lets a plugin
// ship a new layout and have it reach people who have already opened the screen — and it is what stops
// the `appTypes` repair below from being written back as though the user had chosen it. See the hook.
const workspace = useAuthoredLayout(`screens/plugin/${layoutKey ?? screenId}`, layout);
const workspace = useAuthoredLayout(`screens/plugin/${screenId}`, layout);
const allowed = panels.map((panel) => panel.key);
return (