fix(workspaces): share routine branch variable name

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-04-20 10:00:15 -05:00
1 parent 71f22e6270
commit 67cf147677
5 files changed
+13 -4

No files matched your search

+2
View File
@@ -68,6 +68,8 @@ export const AGENT_ROLE_LABELS: Record<AgentRole, string> = {
export const AGENT_DEFAULT_MAX_CONCURRENT_RUNS = 5;
export const WORKSPACE_BRANCH_ROUTINE_VARIABLE = "workspaceBranch";
export const AGENT_ICON_NAMES = [
"bot",
"cpu",
+1
View File
@@ -10,6 +10,7 @@ export {
AGENT_ROLES,
AGENT_ROLE_LABELS,
AGENT_DEFAULT_MAX_CONCURRENT_RUNS,
WORKSPACE_BRANCH_ROUTINE_VARIABLE,
AGENT_ICON_NAMES,
ISSUE_STATUSES,
INBOX_MINE_ISSUE_STATUSES,
+1 -1
View File
@@ -28,6 +28,7 @@ import type {
UpdateRoutineTrigger,
} from "@paperclipai/shared";
import {
WORKSPACE_BRANCH_ROUTINE_VARIABLE,
getBuiltinRoutineVariableValues,
extractRoutineVariableNames,
interpolateRoutineTemplate,
@@ -49,7 +50,6 @@ const OPEN_ISSUE_STATUSES = ["backlog", "todo", "in_progress", "in_review", "blo
const LIVE_HEARTBEAT_RUN_STATUSES = ["queued", "running"];
const TERMINAL_ISSUE_STATUSES = new Set(["done", "cancelled"]);
const MAX_CATCH_UP_RUNS = 25;
const WORKSPACE_BRANCH_ROUTINE_VARIABLE = "workspaceBranch";
const WEEKDAY_INDEX: Record<string, number> = {
Sun: 0,
Mon: 1,
+2
View File
@@ -2272,6 +2272,8 @@ export function buildWorkspaceRuntimeDesiredStatePatch(input: {
const nextState: WorkspaceRuntimeDesiredState = input.action === "stop" ? "stopped" : "running";
const applyActionState = (index: number) => {
const key = String(index);
// Manual services are intentionally left under operator control even when
// an API action targets that individual service.
if (nextServiceStates[key] === "manual") return;
nextServiceStates[key] = nextState;
};
@@ -1,5 +1,11 @@
import { useCallback, useEffect, useMemo, useState } from "react";
import type { Agent, IssueExecutionWorkspaceSettings, Project, RoutineVariable } from "@paperclipai/shared";
import {
WORKSPACE_BRANCH_ROUTINE_VARIABLE,
type Agent,
type IssueExecutionWorkspaceSettings,
type Project,
type RoutineVariable,
} from "@paperclipai/shared";
import { useQuery } from "@tanstack/react-query";
import { instanceSettingsApi } from "../api/instanceSettings";
import { queryKeys } from "../lib/queryKeys";
@@ -28,8 +34,6 @@ import {
} from "@/components/ui/select";
import { Textarea } from "@/components/ui/textarea";
const WORKSPACE_BRANCH_ROUTINE_VARIABLE = "workspaceBranch";
function buildInitialValues(variables: RoutineVariable[]) {
return Object.fromEntries(variables.map((variable) => [variable.name, variable.defaultValue ?? ""]));
}