fix(frontend): scope raw-app, flow and script editors to the session workspace (#10015)

* fix(frontend): scope raw-app/flow/script editors to the session workspace

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): scope flow and script editor operations to the session workspace

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): scope flow preview, inline-script creation and datatable schema to the session workspace

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): address Codex review — thread session workspace through flow resource pickers, script fetch, preview cancel/recording and path collision check

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): address Claude review — pass session workspace to preview FlowStatusViewer and align FlowChatManager guards

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): address Pi review — show acting workspace in script-not-found message and fetch picked script from it in EditorBar

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): address Codex review round 2 — thread session workspace into flow step test, raw-app inline runnable, inline editor toolbars and MCP OAuth path

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): address Codex review round 3 — thread session workspace into dynamic-input helpers and the flow-preview argument side panel (history/saved-inputs/captures)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): address Codex review round 4 — thread session workspace into nested flow/script drawers, flow chat inputs and the flow input side tabs

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): address Codex review round 5 — thread session workspace into script-module fork/reload and key the raw-app schema cache by workspace

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): address Codex review round 6 — key the DB manager schema cache by acting workspace

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): address Codex review round 7 — thread session workspace into resource-valued arg pickers and the editor variable/resource helper drawers

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): scope the flow asset explorer's ResourceEditorDrawer to the acting workspace

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: thread acting workspace through flow asset explore controls

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: thread acting workspace through SQL REPL, secret args, helper forms, S3 inputs, saved inputs

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Guilhem
2026-07-09 01:53:43 +02:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 9ad6927231
commit c000bbca28
74 changed files with 791 additions and 388 deletions
@@ -65,6 +65,8 @@
regexFilter?: RegExp | undefined
hideS3SpecificDetails?: boolean
rootPath?: string
/** Workspace to browse S3 storage in — defaults to the nav workspace. */
workspace?: string | undefined
workspaceSettingsInitialized?: boolean
storage?: string | undefined
uploadModalOpen?: boolean
@@ -103,6 +105,7 @@
regexFilter = undefined,
hideS3SpecificDetails = false,
rootPath: initialRootPath = '',
workspace = undefined,
workspaceSettingsInitialized = $bindable(true),
storage = $bindable(undefined),
uploadModalOpen = $bindable(false),
@@ -117,6 +120,8 @@
testConnectionRequest = HelpersService.datasetStorageTestConnection
}: Props = $props()
let ws = $derived(workspace ?? $workspaceStore)
let rootPath = $state(initialRootPath)
let rootPathNestingLevel = $derived(1 * (rootPath.split('/').length - 1))
@@ -183,7 +188,7 @@
async function loadFiles() {
fileListLoading = true
let availableFiles = await listStoredFilesRequest({
workspace: $workspaceStore!,
workspace: ws!,
maxKeys: maxKeys, // fixed pages of 1000 files for now
marker: page == 0 ? undefined : listMarkers[page - 1],
prefix: rootPath ?? (filter.trim() != '' ? filter : undefined),
@@ -280,7 +285,7 @@
}
fileInfoLoading = true
let fileMetadataRaw = await loadFileMetadataRequest({
workspace: $workspaceStore!,
workspace: ws!,
fileKey: fileKey,
storage: storage
})
@@ -300,7 +305,7 @@
async function loadFilePreview(fileKey: string, fileSizeInBytes?: number, fileMimeType?: string) {
let filePreviewRaw = await loadFilePreviewRequest({
workspace: $workspaceStore!,
workspace: ws!,
fileKey: fileKey,
fileSizeInBytes: fileSizeInBytes,
fileMimeType: fileMimeType,
@@ -349,7 +354,7 @@
}
try {
await deleteS3FileRequest({
workspace: $workspaceStore!,
workspace: ws!,
fileKey: fileKey,
storage: storage
})
@@ -409,7 +414,7 @@
}
try {
await moveS3FileRequest({
workspace: $workspaceStore!,
workspace: ws!,
srcFileKey: srcFileKey,
destFileKey: destFileKey!,
storage: storage
@@ -457,7 +462,7 @@
fileListLoading = true
try {
await testConnectionRequest({
workspace: $workspaceStore!,
workspace: ws!,
storage: storage
})
workspaceSettingsInitialized = true
@@ -716,7 +721,7 @@
{#if filePreview !== undefined && (!hideS3SpecificDetails || !readOnlyMode || allowDelete)}
<div class="flex gap-2 shrink-0">
{#if !hideS3SpecificDetails}
{@const downloadApiPath = `/w/${$workspaceStore}/job_helpers/download_s3_file?file_key=${encodeURIComponent(fileMetadata?.fileKey ?? '')}${storage ? `&storage=${storage}` : ''}`}
{@const downloadApiPath = `/w/${ws}/job_helpers/download_s3_file?file_key=${encodeURIComponent(fileMetadata?.fileKey ?? '')}${storage ? `&storage=${storage}` : ''}`}
{@const downloadName =
fileMetadata?.fileKey.split('/').pop() ?? 'unnamed_download.file'}
{#if shouldDownloadViaClient()}