diff --git a/backend/windmill-api/src/mcp/core.rs b/backend/windmill-api/src/mcp/core.rs index c817d314f3..25507b4119 100644 --- a/backend/windmill-api/src/mcp/core.rs +++ b/backend/windmill-api/src/mcp/core.rs @@ -71,7 +71,9 @@ pub struct WindmillBackend { /// `DisableDirectDeployment` holds a session to reading and running deployed items for /// everyone, admins and bypassers included: that workspace takes changes from its dev workspace /// or a fork, where drafts can go somewhere. Unreadable rules (`None`) hold it too. The in-app -/// chat applies the same rule (`protects` in `chat/global/sessionAccess.ts`): change both. +/// chat applies the same rule (`protects` in `chat/global/sessionAccess.ts`): change both. The +/// chat alone lets a bypasser opt one session into working there directly, behind a confirmation +/// an MCP client has no equivalent of, so a token stays held. fn workspace_access(access: SessionAccess, rules: Option<&[ProtectionRuleset]>) -> SessionAccess { let locked = rules.map_or(true, |rules| { rules diff --git a/frontend/src/lib/components/WorkspaceScopeTrigger.svelte b/frontend/src/lib/components/WorkspaceScopeTrigger.svelte index 37a27f3812..6b0caf0a4c 100644 --- a/frontend/src/lib/components/WorkspaceScopeTrigger.svelte +++ b/frontend/src/lib/components/WorkspaceScopeTrigger.svelte @@ -25,6 +25,9 @@ menuItems = undefined, disableTitle = false, forkableWorkspaces, + onClick = undefined, + compact = false, + stagedDev = undefined, class: className = '' }: { workspaceId?: string @@ -61,6 +64,12 @@ // resolves its name/family for a workspace absent from `$userWorkspaces`. // Omitted consumers fall back to the member-only list. forkableWorkspaces?: UserWorkspace[] + // For a chip that is not a dropdown's trigger, such as Home's staged fork. + onClick?: () => void + // Fork icon, fork name and chevron only: no parent segment, "(new)" or the base's dev badge. + compact?: boolean + // A staged fork that will be created as a dev workspace: the compact chip shows its badge. + stagedDev?: { label?: string } class?: string } = $props() @@ -76,7 +85,7 @@ ) // The parent segment only appears for a fork of a fork — forking off the // root is the default and doesn't need spelling out. - const shownParent = $derived(parentId !== root?.id ? parentName : undefined) + const shownParent = $derived(!compact && parentId !== root?.id ? parentName : undefined) // A fork with a workspace color re-themes the whole chip: forkAccentStyle // derives light/dark bg+text at that hue (matching the default blue's @@ -115,6 +124,7 @@