* feat(sessions): show an item's deployed page in the preview panel
The preview panel showed an item's editor and nothing else. It now shows the
deployed page too, as a tab of its own.
**Two sides, two tabs.** The editor and the deployed page are different things
to look at, so `isItemTabFor` keys on the side rather than the item: asking for
a side already open focuses it, asking for the other opens it alongside. Two
editors for one item still cannot coexist — they would race its single
(kind, path) cell — but an editor beside a viewer is safe, since the viewer
reads the deployed version over the API and holds no cell. The tab breadcrumb
keeps re-pointing in place; `Exit & see details` and the detail page's `Edit`
open the other side instead of consuming the one you are on. A tab's label
carries `(edit)` when it is the editor side.
**The detail pages moved out of their routes.** `/scripts/get` and `/flows/get`
are now thin wrappers over `ScriptDetail` and `FlowDetail`, which the panel
renders too. Everything they reach — drawers, triggers, saved inputs — is scoped
to the viewer's workspace through `setOperatingWorkspace`, and every navigation
they attempt is caught by `interceptNav` and turned into a move inside the
panel, so nothing takes the browser out of the session. A plain click is
intercepted; ⌘-click and middle-click still open a real tab, which is why the
pages keep their `href`s.
**The picker opens what exists.** A row opens the deployed page, or the editor
when nothing is deployed there, and carries a Draft / Draft only badge in the
review dock's words. `WorkspaceItem` gained `draftOnly` and `hasDraft` from the
listers, which already returned both; deploys now invalidate the picker cache
through `itemDeployed`, so a just-deployed item stops reading as a draft. Rows
also carry a hover Edit action, reachable from the keyboard with the pick
modifier.
`open_preview` gained a `mode`, narrowed out of the advertised schema for a
session that cannot write drafts and re-checked per path in the handler, where
a refusal reports "couldn't check" apart from "denied". The mode is resolved
before those checks, so a call that omits it is gated as the editor it will
become.
Alongside, the workspace a detail page acts on is now the one it is showing
rather than the one the browser is navigated to: `MoveDrawer`,
`toggleWorkspaceErrorHandler` and the pages' own permission gates read the
operating workspace and its acting user, and `RunForm` mints a password
argument's ephemeral variable there too — in a fork session all of these
previously answered for the parent. `InWorkspaceAppViewer` hands the app's
`ctx` user down as a prop instead of writing the global `userStore`, which from
a session tab was re-pointing every permission check on the page.
Fixes found on the way: `DetailPageLayout` claimed `h-screen` inside a panel
that is not the viewport; Edit on a historical script version dropped the
version from the intercepted click; the Run button stayed spinning after a run
that left the page mounted; and the window-level run shortcut fired from a
collapsed panel and from keys another handler had already claimed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(sessions): historical edits, stale not-found, shared edit rights, tab labels
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): keep deployed-page links and workspace reads in the session
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): scope detail hrefs to the session, re-point the viewer's own tab
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): keep a previewed raw app's route out of the session URL
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): resolve edit-in-fork against the session workspace
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): read advanced run tags from the session workspace
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): fork from the session workspace, star only navigation items
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): mount only the side a preview tab shows
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): address CI review round 1 findings
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): route links in a deployed page's drawers through the panel
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): tell the chat which deployed page the panel shows
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): only a 404 reads as an undeployed raw app
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): scope the unparseable-JSON run gate to the form
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): a flow deleted from the panel stays in its tab
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): the picker's edit shortcut works on the current row
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): load-error toasts say what failed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(sessions): keep an oversized invalid JSON editor in its form's run gate
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* revert: keep main's draft_only description in openapi.yaml
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Remove $$props.field usage
* Rename slots to ensure no hyphen
* _props
* _trigger
* OnSelectedIteration type correct capitalization
* rename _content
* Remove afterUpdate
* Migrate everything to svelte 5
* array bind
* Fix popover
* type never
* nit fixes
* Fixed many trivial errors
* onClick
* Fix errors
* use let:
* nit typing
* fix: wrap state_referenced_locally vars with untrack()
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add untrack import
* Fix all syntax errors due to untrack migration
* Fix undefined errors
* Fix more undefined errors
* untrack(() => initialOpen)
* svelte-ignore
* Fix state_descriptors_fixed error in Chart.svelte
Use $state.snapshot() to pass plain copies of data/options to Chart.js
instead of $state proxies. Chart.js's listenArrayEvents tries to define
property descriptors on data arrays, which Svelte 5 proxies reject.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* nit typing
* Merge issue
* Fix "path is not set" error in resource picker / editor
* Fix InputTransformForm error when rerunning some flows
* fix npm run check
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow depolying frontend in a sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Expose base path from $lib/navigation
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow deploying frontend in sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow deploying frontend in sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow deploying frontend in sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow deploying frontend in sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix: Allow deploying frontend in sub directory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* update
* update
---------
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>