mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-28 00:02:42 +00:00
* feat: open a session edit in the preview panel from the edits list * refactor: move the deploy-kind preview mapping next to its siblings * feat: make preview the primary action in the session edits list Clicking a row in the Edits popover now opens the item in the session preview panel; kinds the panel cannot host fall back to their diff. Each row gains an explicit Diff button for that item, and a pinned footer row opens Review & deploy for the whole set. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * refactor: fold the open-and-flash rule into SessionPreviewTabs The rule for when a preview open should flash the tab was written out at three call sites, one of them with a looser condition. Move it onto the tab owner as openAndPulse so the three agree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat: preview data-pipeline edits from the edits list A pipeline bundle is stored at `f/<folder>/data_pipeline` while its editor is the folder's pipeline view, so the deploy-kind mapping has to route on the folder. Without it the one remaining previewable kind fell through to the drawer. Also pin the open-and-flash rule with tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * refactor: state the pipeline bundle path layout once `f/<folder>/data_pipeline` was parsed independently in the compare page, the home list and the session preview mapping — two of them disagreeing on whether the trailing segment is checked — and built by hand in the editor. Route all four through $lib/pipelinePaths. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * refactor: route the pipeline page through the shared bundle path The route built the bundle path by hand and passed the draft kind as a literal, the two halves of the editor disagreeing on where the layout is stated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: name a pipeline edit by its folder in the edits list The bundle path is an implementation detail and the row's click lands on the folder's editor, so showing `f/<folder>/data_pipeline` named something the click doesn't open. Also derive the bundle regex from the draft-kind const it has to agree with. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(cli): drop unrelated package-lock.json change The lockfile diff was an incidental regeneration from an older manifest (it downgraded the locked svelte range below what cli/package.json requires) and had nothing to do with this PR. Reset to main's version. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
18 lines
813 B
TypeScript
18 lines
813 B
TypeScript
// A folder's data-pipeline drafts all live in ONE bundle stored at
|
|
// `f/<folder>/data_pipeline`, while the editor for it is the folder's pipeline
|
|
// view. Every surface that routes between the two — the drafts compare page,
|
|
// the home list, the session preview panel — needs that layout, so it is stated
|
|
// here once rather than re-parsed per call site.
|
|
export const PIPELINE_DRAFT_KIND = 'data_pipeline' as const
|
|
|
|
export function pipelineBundlePath(folder: string): string {
|
|
return `f/${folder}/${PIPELINE_DRAFT_KIND}`
|
|
}
|
|
|
|
const BUNDLE_PATH_RE = new RegExp(`^f/([^/]+)/${PIPELINE_DRAFT_KIND}$`)
|
|
|
|
/** The folder a pipeline bundle belongs to, or `undefined` if the path isn't one. */
|
|
export function pipelineFolderFromBundlePath(path: string): string | undefined {
|
|
return path.match(BUNDLE_PATH_RE)?.[1]
|
|
}
|