diff --git a/backend/windmill-api/src/mcp/oauth_server.rs b/backend/windmill-api/src/mcp/oauth_server.rs index ce3e37caeb..9598ca907b 100644 --- a/backend/windmill-api/src/mcp/oauth_server.rs +++ b/backend/windmill-api/src/mcp/oauth_server.rs @@ -1085,6 +1085,14 @@ pub async fn gateway_oauth_approve( if workspace_ids.is_empty() { workspace_ids.extend(form.workspace_id); } + // A selection of scripts and flows names paths, which only mean something in one workspace. + if !scope.split_whitespace().any(|s| s == "mcp:all") + && (form.all_workspaces || workspace_ids.len() > 1) + { + return Err(Error::BadRequest( + "Selected scripts and flows come from one workspace: pick one".to_string(), + )); + } let workspace_id = if form.all_workspaces { None } else { diff --git a/backend/windmill-api/src/mcp/session/card.html b/backend/windmill-api/src/mcp/session/card.html index 3052e89701..1e916d39cb 100644 --- a/backend/windmill-api/src/mcp/session/card.html +++ b/backend/windmill-api/src/mcp/session/card.html @@ -155,6 +155,9 @@ /* An empty slot takes no gap in the card's rhythm. */ #result-more:empty, #result-table:empty, #body:empty, #result-slot:not(:has(:not([hidden]))), .actions:not(:has(> :not([hidden]))) { display: none; } .section-title { font-size: var(--t-sm); font-weight: var(--w-semibold); color: var(--fg-em); } + /* A finished run's result is headed, with links to its fullscreen Logs and Inputs tabs. */ + .result-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: -4px; } + .result-head .section-title { flex: 1; } /* Windmill sets titles in its sans, semibold; a path never goes bold. */ .path { font: var(--w-semibold) var(--t-md)/1.3 var(--sans); color: var(--fg-em); overflow-wrap: anywhere; text-align: left; } button.path { border: 0; padding: 0; min-height: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; } @@ -324,6 +327,7 @@
- Selected scripts and flows come from one workspace: pick one. -
- {/if} - {/if} {#if !mcpOnly}