@devries-cameron20 / t3code-1 / commits / 5b89a53585
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

feat(pull-requests): manage GitHub maintainer edits (#25588)

Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Bilal Bakr committed Oct 29, 2026 at 01:34 UTC 5b89a53585622a3c082b5f5287ab991e88f570b1
23 files changed +635 -19
apps/mobile/src/components/ui/AndroidScreenHeader.tsx
+3 -1
@@ -21,6 +21,7 @@ export interface AndroidHeaderAction {
21 readonly disabled?: boolean;
22 readonly loading?: boolean;
23 readonly selected?: boolean;
24 + readonly subtitle?: string;
25 readonly destructive?: boolean;
26 readonly overflowOnly?: boolean;
27 }
@@ -178,10 +179,11 @@ export function AndroidScreenHeader(props: {
179 actions={overflowActions.map((action, index) => ({
180 id: String(index),
181 title: action.accessibilityLabel,
182 + subtitle: action.subtitle,
183 + state: action.selected ? "on" : undefined,
184 attributes: {
185 disabled: Boolean(action.disabled),
186 destructive: action.destructive,
184 - state: action.selected ? "on" : undefined,
187 },
188 }))}
189 onPressAction={({ nativeEvent }) =>
apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx
+30
@@ -111,6 +111,7 @@ import {
111 PullRequestReadStatus,
112 } from "./PullRequestPresentation";
113 import { usePullRequestFilesSection } from "./PullRequestFiles";
114 +import { usePullRequestMaintainerEdits } from "./usePullRequestMaintainerEdits";
115 import { PullRequestDescription } from "./PullRequestDescription";
116 import { PullRequestMediaVisibleContext } from "./PullRequestMedia";
117 import { PullRequestMarkdownRepository } from "./PullRequestMarkdown";
@@ -416,6 +417,11 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
417 const terminology = sourceControlClients.get(identity?.provider).changeRequest;
418 const permissions = usePullRequestPermissions(params, pr);
419 const action = usePullRequestAction(params, pr);
420 + const maintainerEdits = usePullRequestMaintainerEdits(
421 + params,
422 + pr,
423 + permissions.canEditMaintainerEdits,
424 + );
425 const showsDeleteBranch = pr !== null && canPerformPullRequestAction(pr, "delete-branch");
426 const confirmDeleteBranch = () =>
427 pr &&
@@ -517,6 +523,19 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
523 },
524 ]
525 : []),
526 + ...(maintainerEdits.visible
527 + ? [
528 + {
529 + accessibilityLabel: "Allow edits from maintainers",
530 + icon: "pencil" as const,
531 + selected: maintainerEdits.value,
532 + disabled: maintainerEdits.saving,
533 + subtitle: maintainerEdits.subtitle,
534 + overflowOnly: true,
535 + onPress: maintainerEdits.toggle,
536 + },
537 + ]
538 + : []),
539 ...(identity
540 ? [
541 {
@@ -597,6 +616,17 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
616 <Toolbar.Label>Edit description</Toolbar.Label>
617 </Toolbar.MenuAction>
618 ) : null}
619 + {maintainerEdits.visible ? (
620 + <Toolbar.MenuAction
621 + icon="pencil"
622 + isOn={maintainerEdits.value}
623 + disabled={maintainerEdits.saving}
624 + subtitle={maintainerEdits.subtitle}
625 + onPress={maintainerEdits.toggle}
626 + >
627 + <Toolbar.Label>Allow edits from maintainers</Toolbar.Label>
628 + </Toolbar.MenuAction>
629 + ) : null}
630 {identity ? (
631 <Toolbar.MenuAction
632 icon="arrow.up.right"
apps/mobile/src/features/pull-requests/usePullRequestMaintainerEdits.ts new
+63
@@ -0,0 +1,63 @@
1 +import { useAtomRefresh } from "@effect/atom-react";
2 +import {
3 + maintainerEditsChoiceInForce,
4 + type MaintainerEditsChoice,
5 +} from "@t3tools/client-runtime/pull-request-editing";
6 +import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
7 +import type { PullRequestDetail } from "@t3tools/contracts";
8 +import { AsyncResult } from "effect/reactivity";
9 +import { useRef, useState } from "react";
10 +import * as Dialog from "../../components/ui/Dialog";
11 +import { composerPullRequests } from "../../state/pull-requests";
12 +import { useAtomCommand } from "../../state/use-atom-command";
13 +import { pullRequestTarget, type PullRequestParams } from "./usePullRequestDiff";
14 +
15 +export function usePullRequestMaintainerEdits(
16 + params: PullRequestParams,
17 + pr: PullRequestDetail | null,
18 + canEdit: boolean,
19 +) {
20 + const target = pullRequestTarget(params);
21 + const update = useAtomCommand(composerPullRequests.update, { reportFailure: false });
22 + const refreshDetail = useAtomRefresh(composerPullRequests.detail(target));
23 + const pending = useRef(false);
24 + const [saving, setSaving] = useState(false);
25 + const [choice, setChoice] = useState<MaintainerEditsChoice | null>(null);
26 + const kept = maintainerEditsChoiceInForce(choice, pr?.url ?? "", pr?.observedAt, saving);
27 + if (kept !== choice) {
28 + setChoice(kept);
29 + }
30 + const value = kept?.value ?? pr?.maintainerCanModify === true;
31 + const save = async (next: boolean) => {
32 + if (pending.current || pr === null || !canEdit) return;
33 + pending.current = true;
34 + const previousChoice = choice;
35 + setSaving(true);
36 + setChoice({ key: pr.url, observedAt: pr.observedAt, value: next });
37 + const response = await update({
38 + ...target,
39 + input: { ...target.input, maintainerCanModify: next },
40 + });
41 + pending.current = false;
42 + setSaving(false);
43 + if (AsyncResult.isFailure(response)) {
44 + setChoice(previousChoice);
45 + const cause = squashAtomCommandFailure(response);
46 + Dialog.alert(
47 + "Could not save maintainer access",
48 + cause instanceof Error ? cause.message : "Try again.",
49 + );
50 + return;
51 + }
52 + refreshDetail();
53 + };
54 + return {
55 + visible: canEdit,
56 + value,
57 + saving,
58 + subtitle: saving
59 + ? "Saving…"
60 + : "Maintainers can push to this branch. If your fork has workflows, this can also give access to its secrets.",
61 + toggle: () => void save(!value),
62 + };
63 +}
apps/mobile/src/features/pull-requests/usePullRequestPermissions.ts
+3
@@ -2,6 +2,7 @@ import { useAtomValue } from "@effect/atom-react";
2 import {
3 canEditPullRequestChangeRequest,
4 canEditPullRequestComment,
5 + canEditPullRequestMaintainerEdits,
6 } from "@t3tools/client-runtime/pull-request-editing";
7 import type { PullRequestComment, PullRequestDetail } from "@t3tools/contracts";
8 import { usePullRequestConnected } from "./usePullRequestConnected";
@@ -49,6 +50,8 @@ export function usePullRequestPermissions(params: PullRequestParams, pr: PullReq
50 canWrite: connected && canWrite,
51 canEditChangeRequest:
52 connected && canUpdate && pr !== null && canEditPullRequestChangeRequest(pr),
53 + canEditMaintainerEdits:
54 + connected && canUpdate && pr !== null && canEditPullRequestMaintainerEdits(pr),
55 canEditComment: (comment: Pick<PullRequestComment, "author" | "canEdit" | "kind">) =>
56 connected && canUpdateComment && pr !== null && canEditPullRequestComment(pr, comment),
57 canReact: connected && canSetReaction && pr?.capabilities.reactions === true,
apps/server/src/pullRequest/PullRequestService.test.ts
+59
@@ -116,6 +116,65 @@ function hostedChangeRequest(body: string, additions = 1) {
116 };
117 }
118
119 +it.effect("reads maintainer edits and changes them through the update command", () =>
120 + Effect.gen(function* () {
121 + let enabled = true;
122 + const provider = fakePullRequestProvider(SourceControlProviderKind.make("github"), {
123 + getChangeRequest: () =>
124 + Effect.succeed({ ...hostedChangeRequest("Body"), maintainerCanModify: enabled }),
125 + updateChangeRequest: (input) =>
126 + Effect.sync(() => {
127 + assert.strictEqual(input.title, undefined);
128 + assert.strictEqual(input.body, undefined);
129 + enabled = input.maintainerCanModify!;
130 + }),
131 + });
132 + const service = yield* makeService({
133 + projects: [project({ id: "p1", title: "web", workspaceRoot: "/w", repository: "acme/web" })],
134 + providers: [
135 + {
136 + ...provider,
137 + capabilities: {
138 + ...provider.capabilities,
139 + edit: { changeRequest: true, comment: true, maintainerEdits: true },
140 + },
141 + },
142 + ],
143 + });
144 + const ref = { projectId: "p1" as ProjectId, repository: "acme/web", number: 1 };
145 + assert.strictEqual((yield* service.detail(ref)).maintainerCanModify, true);
146 + yield* service.update({ ...ref, maintainerCanModify: false });
147 + assert.strictEqual((yield* service.detail(ref)).maintainerCanModify, false);
148 + }),
149 +);
150 +
151 +it.effect("refuses maintainer edits on a host without the capability", () =>
152 + Effect.gen(function* () {
153 + let writes = 0;
154 + const service = yield* makeService({
155 + projects: [project({ id: "p1", title: "web", workspaceRoot: "/w", repository: "acme/web" })],
156 + providers: [
157 + fakePullRequestProvider(SourceControlProviderKind.make("github"), {
158 + updateChangeRequest: () =>
159 + Effect.sync(() => {
160 + writes += 1;
161 + }),
162 + }),
163 + ],
164 + });
165 + const result = yield* service
166 + .update({
167 + projectId: "p1" as ProjectId,
168 + repository: "acme/web",
169 + number: 1,
170 + maintainerCanModify: false,
171 + })
172 + .pipe(Effect.flip);
173 + assert.strictEqual(result._tag, "PullRequestOperationError");
174 + assert.strictEqual(writes, 0);
175 + }),
176 +);
177 +
178 it.effect("does not wait for an in-flight detail read to display a preview", () =>
179 Effect.gen(function* () {
180 const detailStarted = yield* Deferred.make<void>();
apps/server/src/pullRequest/PullRequestService.ts
+22 -1
@@ -1753,6 +1753,9 @@ export const make = Effect.gen(function* () {
1753 ...(changeRequest.autoMergeMethod === undefined
1754 ? {}
1755 : { autoMergeMethod: changeRequest.autoMergeMethod }),
1756 + ...(changeRequest.maintainerCanModify === undefined
1757 + ? {}
1758 + : { maintainerCanModify: changeRequest.maintainerCanModify }),
1759 ...(changeRequest.workflowApprovalsRequired === undefined
1760 ? {}
1761 : { workflowApprovalsRequired: changeRequest.workflowApprovalsRequired }),
@@ -2138,7 +2141,22 @@ export const make = Effect.gen(function* () {
2141 }),
2142 );
2143 }
2141 - if (input.title === undefined && input.body === undefined) {
2144 + if (
2145 + input.maintainerCanModify !== undefined &&
2146 + project.api.capabilities.edit?.maintainerEdits !== true
2147 + ) {
2148 + return Effect.fail(
2149 + new PullRequestOperationError({
2150 + operation: "update",
2151 + detail: "This host does not support maintainer edits.",
2152 + }),
2153 + );
2154 + }
2155 + if (
2156 + input.title === undefined &&
2157 + input.body === undefined &&
2158 + input.maintainerCanModify === undefined
2159 + ) {
2160 return Effect.fail(
2161 new PullRequestOperationError({
2162 operation: "update",
@@ -2151,6 +2169,9 @@ export const make = Effect.gen(function* () {
2169 repository: project.repository,
2170 host: project.host,
2171 number: input.number,
2172 + ...(input.maintainerCanModify === undefined
2173 + ? {}
2174 + : { maintainerCanModify: input.maintainerCanModify }),
2175 ...(input.title === undefined ? {} : { title: input.title }),
2176 ...(input.body === undefined ? {} : { body: input.body }),
2177 }).pipe(Effect.mapError(toPullRequestError("update")));
apps/web/src/components/pullRequest/PullRequestActionsMenu.browser.test.tsx new
+212
@@ -0,0 +1,212 @@
1 +import "~/index.css";
2 +import { EnvironmentId, ProjectId } from "@t3tools/contracts";
3 +import { sourceControlClients } from "@t3tools/client-runtime/source-control-clients";
4 +import { Cause } from "effect";
5 +import { expect, it, vi } from "vite-plus/test";
6 +import { page } from "vite-plus/test/browser";
7 +
8 +const mocks = vi.hoisted(() => ({
9 + update:
10 + vi.fn<(input: unknown) => Promise<{ _tag: "Success" } | { _tag: "Failure"; cause: unknown }>>(),
11 + notify: vi.fn(),
12 +}));
13 +vi.mock(
14 + import("~/state/pullRequests"),
15 + () => ({ pullRequestEnvironment: { update: {} } }) as never,
16 +);
17 +vi.mock(
18 + import("~/state/use-atom-command"),
19 + () => ({ useAtomCommand: () => mocks.update }) as never,
20 +);
21 +
22 +vi.mock(import("../ui/toast"), () => ({ toastManager: { add: mocks.notify } }) as never);
23 +vi.mock(import("~/state/server"), async () => {
24 + const { Atom } = await import("effect/reactivity");
25 + return { primaryServerKeybindingsAtom: Atom.make([]) } as never;
26 +});
27 +vi.mock(import("./PullRequestThreadLinks"), () => ({ PullRequestThreadLinks: () => null }));
28 +vi.mock(
29 + import("./PullRequestDetailActions"),
30 + () => ({ ActOnEnvironmentPicker: () => null }) as never,
31 +);
32 +
33 +import { render } from "../../../test/render";
34 +import { PullRequestActionsMenu } from "./PullRequestActionsMenu";
35 +
36 +const reference = { projectId: ProjectId.make("project"), repository: "owner/repo", number: 7 };
37 +const environmentId = EnvironmentId.make("environment");
38 +
39 +type Detail = Parameters<typeof PullRequestActionsMenu>[0]["detail"];
40 +
41 +const openDetail: Detail = {
42 + url: "https://github.com/owner/repo/pull/7",
43 + state: "open",
44 + isDraft: false,
45 + headBranch: "feature",
46 + maintainerCanModify: true,
47 + observedAt: 1,
48 + capabilities: {
49 + diff: true,
50 + comment: true,
51 + actions: [],
52 + mergeMethods: [],
53 + search: true,
54 + review: { inlineComment: true, reply: true, resolve: true, verdicts: [] },
55 + reviewers: { request: true, listCandidates: true },
56 + edit: { changeRequest: true, comment: true, maintainerEdits: true },
57 + },
58 + viewerPermissions: {
59 + actions: [],
60 + comment: true,
61 + resolve: true,
62 + verdicts: [],
63 + requestReviewers: true,
64 + maintainerEdits: true,
65 + },
66 +};
67 +
68 +function setup() {
69 + mocks.update.mockReset().mockResolvedValue({ _tag: "Success" });
70 + mocks.notify.mockReset();
71 + return (detail: Detail = openDetail) => (
72 + <PullRequestActionsMenu
73 + environmentId={environmentId}
74 + reference={reference}
75 + pullRequestKey="owner/repo/7"
76 + detail={detail}
77 + terminology={sourceControlClients.get("github").changeRequest}
78 + linkThreadRef={null}
79 + onThreadPickerOpenChange={() => {}}
80 + refreshing={false}
81 + refreshFromHost={async () => {}}
82 + handoff={null}
83 + attachesToComposer={false}
84 + askAboutPullRequest={() => {}}
85 + explainPullRequest={() => {}}
86 + canFixFindings={false}
87 + startFixFindings={() => {}}
88 + handoffLabels={{ fixFindings: "Fix review findings" }}
89 + canWriteGuide={false}
90 + guideRunning={false}
91 + guideWritten={false}
92 + writeGuide={() => {}}
93 + pickableEnvironments={[]}
94 + actingEnvironmentId={environmentId}
95 + onActingEnvironmentChange={() => {}}
96 + can={() => false}
97 + autoMergeArmed={false}
98 + showsDraftToggle={false}
99 + showsMergeNow={false}
100 + showsAutoMerge={false}
101 + showsMergeMethods={false}
102 + allowedMergeMethods={[]}
103 + selectedMergeMethod="squash"
104 + onSelectMergeMethod={() => {}}
105 + showsDeleteBranch={false}
106 + environmentConnected={true}
107 + canWriteSourceControl={true}
108 + onMaintainerEditsSaved={() => {}}
109 + confirmDeleteBranch={async () => {}}
110 + pendingAction={null}
111 + perform={async () => true}
112 + openOnHostText="Open on GitHub"
113 + copyReference={() => {}}
114 + />
115 + );
116 +}
117 +
118 +it("saves maintainer edits, locks while saving, and restores the saved value when a save fails", async () => {
119 + const control = setup();
120 + await using screen = await render(control());
121 + await screen.getByRole("button", { name: "More pull request actions" }).click();
122 + const checkbox = page.getByRole("menuitemcheckbox", { name: "Allow edits from maintainers" });
123 + await expect.element(checkbox).toBeChecked();
124 + await checkbox.click();
125 + await expect.element(page.getByRole("status")).not.toBeInTheDocument();
126 + expect(mocks.update).toHaveBeenCalledExactlyOnceWith({
127 + environmentId,
128 + input: { ...reference, maintainerCanModify: false },
129 + });
130 +
131 + let settle!: (value: { _tag: "Failure"; cause: unknown }) => void;
132 + mocks.update.mockReturnValueOnce(
133 + new Promise((resolve) => {
134 + settle = resolve;
135 + }),
136 + );
137 + await checkbox.click();
138 + await expect.element(checkbox).toBeChecked();
139 + await expect.element(checkbox).toBeDisabled();
140 + await expect.element(page.getByRole("status")).toHaveTextContent("Saving…");
141 + settle({
142 + _tag: "Failure",
143 + cause: Cause.fail(new Error("Resource not accessible by integration")),
144 + });
145 + await expect.element(checkbox).not.toBeChecked();
146 + expect(mocks.notify).toHaveBeenCalledExactlyOnceWith(
147 + expect.objectContaining({
148 + type: "error",
149 + title: "Could not save maintainer access",
150 + description: "Resource not accessible by integration",
151 + }),
152 + );
153 +});
154 +
155 +it("keeps a saved choice through a stale refresh, then follows the host", async () => {
156 + const control = setup();
157 + await using screen = await render(control());
158 + await screen.getByRole("button", { name: "More pull request actions" }).click();
159 + const checkbox = page.getByRole("menuitemcheckbox", { name: "Allow edits from maintainers" });
160 + let settle!: (value: { _tag: "Success" }) => void;
161 + mocks.update.mockReturnValueOnce(
162 + new Promise((resolve) => {
163 + settle = resolve;
164 + }),
165 + );
166 + await checkbox.click();
167 + await screen.rerender(control({ ...openDetail, observedAt: 2 }));
168 + settle({ _tag: "Success" });
169 + await expect.element(page.getByRole("status")).not.toBeInTheDocument();
170 + await screen.rerender(control({ ...openDetail, observedAt: 2 }));
171 + await expect.element(checkbox).not.toBeChecked();
172 + await screen.rerender(control({ ...openDetail, maintainerCanModify: false, observedAt: 3 }));
173 + await expect.element(checkbox).not.toBeChecked();
174 + await screen.rerender(control({ ...openDetail, maintainerCanModify: true, observedAt: 4 }));
175 + await expect.element(checkbox).toBeChecked();
176 +});
177 +
178 +it("follows the host's first reading after a save, even when it matches the old value", async () => {
179 + const control = setup();
180 + await using screen = await render(control());
181 + await screen.getByRole("button", { name: "More pull request actions" }).click();
182 + const checkbox = page.getByRole("menuitemcheckbox", { name: "Allow edits from maintainers" });
183 + await checkbox.click();
184 + await expect.element(page.getByRole("status")).not.toBeInTheDocument();
185 + await expect.element(checkbox).not.toBeChecked();
186 + await screen.rerender(control({ ...openDetail, observedAt: 2 }));
187 + await expect.element(checkbox).toBeChecked();
188 +});
189 +
190 +it.each<[string, Detail]>([
191 + ["closed", { ...openDetail, state: "closed" }],
192 + [
193 + "not authored by the viewer",
194 + {
195 + ...openDetail,
196 + viewerPermissions: { ...openDetail.viewerPermissions, maintainerEdits: false },
197 + },
198 + ],
199 + [
200 + "on a host without maintainer edits",
201 + {
202 + ...openDetail,
203 + capabilities: { ...openDetail.capabilities, edit: { changeRequest: true, comment: true } },
204 + },
205 + ],
206 +])("hides maintainer edits on a pull request that is %s", async (_, detail) => {
207 + const control = setup();
208 + await using screen = await render(control(detail));
209 + await screen.getByRole("button", { name: "More pull request actions" }).click();
210 + await expect.element(page.getByRole("menuitem", { name: "Open on GitHub" })).toBeVisible();
211 + expect(document.querySelector('[role="menuitemcheckbox"]')).toBeNull();
212 +});
apps/web/src/components/pullRequest/PullRequestActionsMenu.tsx
+95 -1
@@ -1,5 +1,11 @@
1 import { useAtomValue } from "@effect/atom-react";
2 +import {
3 + canEditPullRequestMaintainerEdits,
4 + maintainerEditsChoiceInForce,
5 + type MaintainerEditsChoice,
6 +} from "@t3tools/client-runtime/pull-request-editing";
7 import type { ChangeRequestTerminology } from "@t3tools/client-runtime/source-control-clients";
8 +import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
9 import type {
10 EnvironmentId,
11 PullRequestAction,
@@ -20,13 +26,17 @@ import {
26 SparklesIcon,
27 Trash2Icon,
28 } from "lucide-react";
29 +import { useId, useState } from "react";
30
31 import { shortcutLabelForCommand } from "~/keybindings";
32 import { readLocalApi } from "~/localApi";
33 +import { pullRequestEnvironment } from "~/state/pullRequests";
34 import { primaryServerKeybindingsAtom } from "~/state/server";
35 +import { useAtomCommand } from "~/state/use-atom-command";
36 import { Button } from "../ui/button";
37 import {
38 Menu,
39 + MenuCheckboxItem,
40 MenuItem,
41 MenuPopup,
42 MenuRadioGroup,
@@ -36,11 +46,13 @@ import {
46 MenuTrigger,
47 } from "../ui/menu";
48 import { RefreshIcon } from "../ui/refresh-icon";
49 +import { toastManager } from "../ui/toast";
50 import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
51 import { ActOnEnvironmentPicker, type PerformPullRequestAction } from "./PullRequestDetailActions";
52 import {
53 PULL_REQUEST_MERGE_METHOD_LABELS,
54 pullRequestActionMenuHasGroup,
55 + readableFailure,
56 } from "./pullRequestDetail.logic";
57 import { PullRequestGlyph } from "./pullRequestIcons";
58 import type { PickableEnvironment } from "./pullRequestProjectAssignment.logic";
@@ -83,6 +95,8 @@ export function PullRequestActionsMenu({
95 onSelectMergeMethod,
96 showsDeleteBranch,
97 environmentConnected,
98 + canWriteSourceControl,
99 + onMaintainerEditsSaved,
100 confirmDeleteBranch,
101 pendingAction,
102 perform,
@@ -92,7 +106,17 @@ export function PullRequestActionsMenu({
106 environmentId: EnvironmentId;
107 reference: PullRequestRef;
108 pullRequestKey: string;
95 - detail: Pick<PullRequestDetail, "url" | "state" | "isDraft" | "headBranch">;
109 + detail: Pick<
110 + PullRequestDetail,
111 + | "url"
112 + | "state"
113 + | "isDraft"
114 + | "headBranch"
115 + | "capabilities"
116 + | "viewerPermissions"
117 + | "maintainerCanModify"
118 + | "observedAt"
119 + >;
120 terminology: ChangeRequestTerminology;
121 linkThreadRef: ScopedThreadRef | null;
122 onThreadPickerOpenChange: (open: boolean) => void;
@@ -123,6 +147,8 @@ export function PullRequestActionsMenu({
147 onSelectMergeMethod: (method: PullRequestMergeMethod) => void;
148 showsDeleteBranch: boolean;
149 environmentConnected: boolean;
150 + canWriteSourceControl: boolean;
151 + onMaintainerEditsSaved: () => void;
152 confirmDeleteBranch: () => Promise<void>;
153 pendingAction: PullRequestAction | null;
154 perform: PerformPullRequestAction;
@@ -132,6 +158,47 @@ export function PullRequestActionsMenu({
158 const keybindings = useAtomValue(primaryServerKeybindingsAtom);
159 const inlineConfirm = useInlineActionConfirm(pullRequestKey);
160 const actionPending = pendingAction !== null;
161 + const maintainerEditsHintId = useId();
162 + const updatePullRequest = useAtomCommand(pullRequestEnvironment.update, {
163 + reportFailure: false,
164 + });
165 + const [maintainerEditsChoice, setMaintainerEditsChoice] = useState<MaintainerEditsChoice | null>(
166 + null,
167 + );
168 + const [maintainerEditsSaving, setMaintainerEditsSaving] = useState(false);
169 + const maintainerEditsChoiceKept = maintainerEditsChoiceInForce(
170 + maintainerEditsChoice,
171 + pullRequestKey,
172 + detail.observedAt,
173 + maintainerEditsSaving,
174 + );
175 + if (maintainerEditsChoiceKept !== maintainerEditsChoice) {
176 + setMaintainerEditsChoice(maintainerEditsChoiceKept);
177 + }
178 + const maintainerCanModify = maintainerEditsChoiceKept?.value ?? detail.maintainerCanModify;
179 + const canSaveMaintainerEdits =
180 + canWriteSourceControl && environmentConnected && !maintainerEditsSaving;
181 + const saveMaintainerEdits = async (value: boolean) => {
182 + if (!canSaveMaintainerEdits) return;
183 + const previousChoice = maintainerEditsChoice;
184 + setMaintainerEditsChoice({ key: pullRequestKey, observedAt: detail.observedAt, value });
185 + setMaintainerEditsSaving(true);
186 + const result = await updatePullRequest({
187 + environmentId,
188 + input: { ...reference, maintainerCanModify: value },
189 + });
190 + setMaintainerEditsSaving(false);
191 + if (result._tag === "Failure") {
192 + setMaintainerEditsChoice(previousChoice);
193 + toastManager.add({
194 + type: "error",
195 + title: "Could not save maintainer access",
196 + description: readableFailure(squashAtomCommandFailure(result), "Try again."),
197 + });
198 + return;
199 + }
200 + onMaintainerEditsSaved();
201 + };
202 return (
203 <Menu>
204 <Tooltip>
@@ -218,6 +285,33 @@ export function PullRequestActionsMenu({
285 />
286 ) : null}
287 <MenuSeparator />
288 + {canEditPullRequestMaintainerEdits(detail) ? (
289 + <>
290 + <MenuCheckboxItem
291 + variant="icon"
292 + checked={maintainerCanModify === true}
293 + disabled={!canSaveMaintainerEdits}
294 + closeOnClick={false}
295 + aria-label="Allow edits from maintainers"
296 + aria-describedby={maintainerEditsHintId}
297 + onCheckedChange={(value) => void saveMaintainerEdits(value)}
298 + >
299 + <span className="flex max-w-xs flex-col gap-0.5">
300 + <span>Allow edits from maintainers</span>
301 + <span id={maintainerEditsHintId} className="text-xs text-muted-foreground">
302 + Maintainers can push to this branch. If your fork has workflows, this can also
303 + give access to its secrets.
304 + </span>
305 + {maintainerEditsSaving ? (
306 + <span role="status" className="text-xs text-muted-foreground">
307 + Saving…
308 + </span>
309 + ) : null}
310 + </span>
311 + </MenuCheckboxItem>
312 + <MenuSeparator />
313 + </>
314 + ) : null}
315 {detail.state === "open" ? (
316 <>
317 {showsDraftToggle ? (
apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx
+2
@@ -1381,6 +1381,8 @@ export function PullRequestDetailPanel({
1381 onSelectMergeMethod={selectMergeMethod}
1382 showsDeleteBranch={showsDeleteBranch}
1383 environmentConnected={environmentConnected}
1384 + canWriteSourceControl={canWriteSourceControl}
1385 + onMaintainerEditsSaved={refreshDetail}
1386 confirmDeleteBranch={confirmDeleteBranch}
1387 pendingAction={pendingAction}
1388 perform={perform}
apps/web/src/components/ui/menu.tsx
+6 -2
@@ -163,7 +163,7 @@ function MenuCheckboxItem({
163 variant = "default",
164 ...props
165 }: MenuPrimitive.CheckboxItem.Props & {
166 - variant?: "default" | "switch";
166 + variant?: "default" | "icon" | "switch";
167 }) {
168 return (
169 <MenuPrimitive.CheckboxItem
@@ -173,6 +173,7 @@ function MenuCheckboxItem({
173 variant === "switch"
174 ? "grid-cols-[1fr_auto] gap-4 pe-1.5"
175 : "grid-cols-[1rem_minmax(0,1fr)] pe-4",
176 + variant === "icon" && "grid-cols-[0.625rem_minmax(0,1fr)]",
177 className,
178 )}
179 data-slot="menu-checkbox-item"
@@ -190,8 +191,11 @@ function MenuCheckboxItem({
191 </>
192 ) : (
193 <>
193 - <MenuPrimitive.CheckboxItemIndicator className="col-start-1">
194 + <MenuPrimitive.CheckboxItemIndicator
195 + className={cn("col-start-1", variant === "icon" && "-mx-0.5")}
196 + >
197 <svg
198 + className={variant === "icon" ? "size-3.5" : undefined}
199 fill="none"
200 height="24"
201 stroke="currentColor"
packages/client-runtime/src/pullRequestEditing.ts
+35
@@ -25,6 +25,41 @@ export function canEditPullRequestChangeRequest(detail: EditingSubject): boolean
25 );
26 }
27
28 +export function canEditPullRequestMaintainerEdits(
29 + detail: Pick<
30 + PullRequestDetail,
31 + "state" | "capabilities" | "viewerPermissions" | "maintainerCanModify"
32 + >,
33 +): boolean {
34 + return (
35 + detail.state === "open" &&
36 + detail.capabilities.edit?.maintainerEdits === true &&
37 + detail.viewerPermissions.maintainerEdits === true &&
38 + detail.maintainerCanModify !== undefined
39 + );
40 +}
41 +
42 +export interface MaintainerEditsChoice {
43 + readonly key: string;
44 + readonly observedAt: number | undefined;
45 + readonly value: boolean;
46 +}
47 +
48 +/**
49 + * A saved choice ends at the first host reading delivered after the save. Readers refresh once it
50 + * succeeds, which drops reads still in flight, so that reading started after the write.
51 + */
52 +export function maintainerEditsChoiceInForce(
53 + choice: MaintainerEditsChoice | null,
54 + key: string,
55 + observedAt: number | undefined,
56 + saving: boolean,
57 +): MaintainerEditsChoice | null {
58 + if (choice === null || choice.key !== key) return null;
59 + if (saving) return choice.observedAt === observedAt ? choice : { ...choice, observedAt };
60 + return observedAt !== undefined && choice.observedAt === observedAt ? choice : null;
61 +}
62 +
63 /** Hosts do not support rewriting review summaries through comment mutations. */
64 export function canEditPullRequestComment(
65 detail: EditingSubject,
packages/contracts/src/pullRequest.ts
+4
@@ -244,6 +244,7 @@ export type PullRequestReviewCapabilities = typeof PullRequestReviewCapabilities
244 export const PullRequestEditCapabilities = Schema.Struct({
245 changeRequest: Schema.Boolean,
246 comment: Schema.Boolean,
247 + maintainerEdits: Schema.optional(Schema.Boolean),
248 });
249 export type PullRequestEditCapabilities = typeof PullRequestEditCapabilities.Type;
250
@@ -295,6 +296,7 @@ export const PullRequestViewerPermissions = Schema.Struct({
296 updateMethods: Schema.optional(ForwardCompatibleArray(PullRequestUpdateMethod)),
297 labels: Schema.optional(Schema.Boolean),
298 editChangeRequest: Schema.optional(Schema.Boolean),
299 + maintainerEdits: Schema.optional(Schema.Boolean),
300 });
301 export type PullRequestViewerPermissions = typeof PullRequestViewerPermissions.Type;
302
@@ -589,6 +591,7 @@ export const PullRequestDetail = Schema.Struct({
591 autoMergeEnabled: Schema.optional(Schema.Boolean),
592 autoMergeMethod: Schema.optional(PullRequestMergeMethod),
593 workflowApprovalsRequired: Schema.optional(NonNegativeInt),
594 + maintainerCanModify: Schema.optional(Schema.Boolean),
595 });
596 export type PullRequestDetail = typeof PullRequestDetail.Type;
597
@@ -746,6 +749,7 @@ export const PullRequestUpdateInput = Schema.Struct({
749 ...PullRequestRef.fields,
750 title: Schema.optional(TrimmedNonEmptyString.check(Schema.isMaxLength(1024))),
751 body: Schema.optional(Schema.String.check(Schema.isMaxLength(65_536))),
752 + maintainerCanModify: Schema.optional(Schema.Boolean),
753 });
754 export type PullRequestUpdateInput = typeof PullRequestUpdateInput.Type;
755
packages/source-control-core/src/server/PullRequestProvider.ts
+2
@@ -182,6 +182,7 @@ export interface ProviderChangeRequestStat {
182 }
183
184 export interface ProviderChangeRequestDetail extends ProviderChangeRequest {
185 + readonly maintainerCanModify?: boolean;
186 readonly headSha?: string | null;
187 readonly body: string;
188 readonly changedFiles: number;
@@ -462,6 +463,7 @@ export interface PullRequestProviderApi {
463 /** Requires edit capability and at least one field. */
464 readonly updateChangeRequest?: (
465 input: ProviderRepositoryRef & {
466 + readonly maintainerCanModify?: boolean | undefined;
467 readonly number: number;
468 readonly title?: string | undefined;
469 readonly body?: string | undefined;
packages/source-control-github/src/server/GitHubPullRequestApi.test.ts
+20
@@ -68,6 +68,7 @@ const coreResponse = (pullRequest: Readonly<Record<string, unknown>> = {}) => ({
68 mergedAt: null,
69 closedAt: null,
70 isCrossRepository: false,
71 + maintainerCanModify: true,
72 headRepositoryOwner: null,
73 headRepository: null,
74 headRef: null,
@@ -710,6 +711,25 @@ it.effect(
711 );
712
713 layer("GitHubPullRequestApi.layer", (it) => {
714 + it.effect("turns maintainer edits off without rewriting the pull request's text", () =>
715 + Effect.gen(function* () {
716 + mockedExecute.mockImplementation((call) =>
717 + Effect.succeed(
718 + output(
719 + encodeJson(
720 + call.kind === "graphql" && matches(call, NODE_ID_QUERY) ? nodeIdAnswer("PR_7") : {},
721 + ),
722 + ),
723 + ),
724 + );
725 + const api = yield* GitHubPullRequestApi.GitHubPullRequestApi;
726 + yield* api.updatePullRequest({ ...pullRequestInput, maintainerCanModify: false });
727 + expect(variablesOf("mutation UpdatePullRequest")).toEqual([
728 + { pullRequestId: "PR_7", maintainerCanModify: false },
729 + ]);
730 + }),
731 + );
732 +
733 it.effect.each(["mixed", "merges", "unavailable"] as const)(
734 "reads stats only for displayed non-merge commits (%s)",
735 (kind) =>
packages/source-control-github/src/server/GitHubPullRequestApi.ts
+4
@@ -705,6 +705,7 @@ export class GitHubPullRequestApi extends Context.Service<
705 }) => Effect.Effect<void, GitHubPullRequestApiError>;
706
707 readonly updatePullRequest: (input: {
708 + readonly maintainerCanModify?: boolean | undefined;
709 readonly cwd: string;
710 readonly repository: string;
711 readonly host: string;
@@ -2740,6 +2741,9 @@ export const make = Effect.gen(function* () {
2741 client
2742 .UpdatePullRequest({
2743 pullRequestId,
2744 + ...(input.maintainerCanModify === undefined
2745 + ? {}
2746 + : { maintainerCanModify: input.maintainerCanModify }),
2747 ...(input.title === undefined ? {} : { title: input.title }),
2748 ...(input.body === undefined ? {} : { body: input.body }),
2749 })
packages/source-control-github/src/server/GitHubPullRequestProvider.test.ts
+3
@@ -16,6 +16,8 @@ import { gitHubViewerPermissions, loginAvatarUrl, make } from "./GitHubPullReque
16 import type { GitHubReviewThreadComments } from "./gitHubPullRequestJson.ts";
17
18 const coreFields = {
19 + maintainerCanModify: true,
20 + canEditMaintainerEdits: false,
21 reviewRequestTeams: [],
22 checksTruncated: false,
23 comparison: { behindBy: 0, viewerCanUpdate: true },
@@ -205,6 +207,7 @@ describe("gitHubViewerPermissions", () => {
207 });
208
209 expect(detail.viewerPermissions).toEqual({
210 + maintainerEdits: false,
211 actions: ["ready", "draft", "close", "reopen"],
212 comment: true,
213 resolve: false,
packages/source-control-github/src/server/GitHubPullRequestProvider.ts
+11 -5
@@ -49,7 +49,7 @@ const CAPABILITIES: PullRequestCapabilities = {
49 verdicts: ["comment", "approve", "request-changes"],
50 },
51 reviewers: { request: true, listCandidates: true },
52 - edit: { changeRequest: true, comment: true },
52 + edit: { changeRequest: true, comment: true, maintainerEdits: true },
53 stacks: true,
54 stackActions: true,
55 labels: true,
@@ -453,10 +453,13 @@ export const make = Effect.gen(function* () {
453 ...pullRequest.reviewRequestTeams,
454 ],
455 mergeCapabilities: pullRequest.viewerAccess.mergeCapabilities,
456 - viewerPermissions: gitHubViewerPermissions({
457 - ...pullRequest.viewerAccess,
458 - canUpdateBranch: pullRequest.comparison?.viewerCanUpdate === true,
459 - }),
456 + viewerPermissions: {
457 + ...gitHubViewerPermissions({
458 + ...pullRequest.viewerAccess,
459 + canUpdateBranch: pullRequest.comparison?.viewerCanUpdate === true,
460 + }),
461 + maintainerEdits: pullRequest.canEditMaintainerEdits,
462 + },
463 baseComparison:
464 pullRequest.comparison === null || pullRequest.comparison.behindBy === null
465 ? "unknown"
@@ -666,6 +669,9 @@ export const make = Effect.gen(function* () {
669 updateChangeRequest: (input) =>
670 cli
671 .updatePullRequest({
672 + ...(input.maintainerCanModify === undefined
673 + ? {}
674 + : { maintainerCanModify: input.maintainerCanModify }),
675 cwd: input.cwd,
676 repository: input.repository,
677 host: input.host,
packages/source-control-github/src/server/gitHubPullRequestJson.test.ts
+25
@@ -362,6 +362,7 @@ describe("pull request detail decoding", () => {
362 baseRefName: "main",
363 headRefOid: "abc123",
364 isCrossRepository: false,
365 + maintainerCanModify: true,
366 headRepositoryOwner: null,
367 headRepository: null,
368 headRef: null,
@@ -394,6 +395,30 @@ describe("pull request detail decoding", () => {
395 pullRequest?: Record<string, unknown>,
396 ) => expectSuccess(decodePullRequestCoreJson(coreJson(rollup, pullRequest)));
397
398 + it.each([
399 + [{}, true],
400 + [{ viewerDidAuthor: false }, false],
401 + [{ isCrossRepository: false }, false],
402 + [{ state: "CLOSED" }, false],
403 + [{ headRepositoryOwner: { __typename: "Organization", login: "team" } }, false],
404 + [{ headRepository: null }, false],
405 + ])(
406 + "reads maintainer edits and lets only the author of an open personal fork change them: %j",
407 + (overrides, allowed) => {
408 + const detail = detailOf([], {
409 + maintainerCanModify: false,
410 + isCrossRepository: true,
411 + viewerDidAuthor: true,
412 + headRepositoryOwner: { __typename: "User", login: "octocat" },
413 + headRepository: { nameWithOwner: "octocat/t3code", viewerPermission: "ADMIN" },
414 + headRef: { id: "REF_7" },
415 + ...overrides,
416 + });
417 + expect(detail.maintainerCanModify).toBe(false);
418 + expect(detail.canEditMaintainerEdits).toBe(allowed);
419 + },
420 + );
421 +
422 const detailJson = JSON.stringify({
423 comments: [{ id: "c1", body: "second", createdAt: "2026-07-04T00:00:00Z" }],
424 reviews: [
packages/source-control-github/src/server/gitHubPullRequestJson.ts
+10
@@ -978,6 +978,8 @@ export function toPullRequestWatchFingerprint(
978 }
979
980 export interface GitHubPullRequestCore extends GitHubPullRequestDetail {
981 + readonly maintainerCanModify: boolean;
982 + readonly canEditMaintainerEdits: boolean;
983 readonly reviewRequestTeams: ReadonlyArray<PullRequestActor>;
984 readonly viewerAccess: GitHubViewerAccess & GitHubRepositoryAccess;
985 readonly comparison: GitHubBaseComparison | null;
@@ -1023,6 +1025,14 @@ export function toPullRequestCore(result: PullRequestCore.Result): GitHubPullReq
1025 statusCheckRollup: toCheckContexts(nodesOf(contexts)),
1026 }),
1027 headRepositoryNameWithOwner: trimmed(pr.headRepository?.nameWithOwner),
1028 + maintainerCanModify: pr.maintainerCanModify,
1029 + canEditMaintainerEdits:
1030 + pr.state === "OPEN" &&
1031 + pr.isCrossRepository &&
1032 + pr.viewerDidAuthor &&
1033 + pr.headRepositoryOwner?.__typename === "User" &&
1034 + pr.headRepository !== null &&
1035 + pr.headRef !== null,
1036 viewerAccess: {
1037 canWrite: toCanWrite(repository.viewerPermission),
1038 canDeleteBranch: toCanWrite(pr.headRepository?.viewerPermission) && pr.headRef !== null,
packages/source-control-github/src/server/pullRequestMutations.graphql
+17 -5
@@ -41,11 +41,23 @@ mutation UnresolveReviewThread($threadId: ID!) {
41 }
42 }
43
44 -# Rewrites the pull request's own words. Both are nullable so that one document serves a change to
45 -# the title, to the description, or to the two together: a variable the request does not send puts
46 -# no entry in the input at all, which leaves that field as it was rather than clearing it.
47 -mutation UpdatePullRequest($pullRequestId: ID!, $title: String, $body: String) {
48 - updatePullRequest(input: { pullRequestId: $pullRequestId, title: $title, body: $body }) {
44 +# Rewrites the pull request's own words or its maintainer-edit setting. Every field is nullable so
45 +# that one document serves any combination: a variable the request does not send puts no entry in
46 +# the input at all, which leaves that field as it was rather than clearing it.
47 +mutation UpdatePullRequest(
48 + $pullRequestId: ID!
49 + $title: String
50 + $body: String
51 + $maintainerCanModify: Boolean
52 +) {
53 + updatePullRequest(
54 + input: {
55 + pullRequestId: $pullRequestId
56 + title: $title
57 + body: $body
58 + maintainerCanModify: $maintainerCanModify
59 + }
60 + ) {
61 pullRequest {
62 id
63 }
packages/source-control-github/src/server/pullRequestMutations.graphql.ts
+5 -3
@@ -205,17 +205,19 @@ export const UpdatePullRequest = GraphQL.mutation("UpdatePullRequest", {
205 variables: [
206 { name: "pullRequestId", body: "ID!" },
207 { name: "title", body: "String" },
208 - { name: "body", body: "String" }
208 + { name: "body", body: "String" },
209 + { name: "maintainerCanModify", body: "Boolean" }
210 ],
211 selections: [
211 - { name: "updatePullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", " title:$", "title", " body:$", "body", "}){pullRequest{id}}"] }
212 + { name: "updatePullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", " title:$", "title", " body:$", "body", " maintainerCanModify:$", "maintainerCanModify", "}){pullRequest{id}}"] }
213 ],
214 fragments: []
215 },
216 variables: {
217 pullRequestId: Shared.ID,
218 title: Schema.optional(Schema.NullOr(Schema.String)),
218 - body: Schema.optional(Schema.NullOr(Schema.String))
219 + body: Schema.optional(Schema.NullOr(Schema.String)),
220 + maintainerCanModify: Schema.optional(Schema.NullOr(Schema.Boolean))
221 },
222 result: Schema.Struct({
223 /** Update a pull request */
packages/source-control-github/src/server/pullRequestReads.graphql
+1
@@ -87,6 +87,7 @@ query PullRequestCore(
87 baseRefName
88 headRefOid
89 isCrossRepository
90 + maintainerCanModify
91 headRepositoryOwner {
92 login
93 }
packages/source-control-github/src/server/pullRequestReads.graphql.ts
+3 -1
@@ -395,6 +395,8 @@ export const PullRequestCoreRepositoryPullRequestPullRequest = Schema.Struct({
395 headRefOid: Shared.GitObjectID,
396 /** The head and base repositories are different. */
397 isCrossRepository: Schema.Boolean,
398 + /** Indicates whether maintainers can modify the pull request. */
399 + maintainerCanModify: Schema.Boolean,
400 /** The owner of the repository associated with this pull request's head Ref. */
401 headRepositoryOwner: Schema.NullOr(RepositoryOwner),
402 /** The repository associated with this pull request's head Ref. */
@@ -457,7 +459,7 @@ export const PullRequestCore = GraphQL.query("PullRequestCore", {
459 { name: "requestedReviewers", body: "Int!" }
460 ],
461 selections: [
460 - { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){mergeCommitAllowed squashMergeAllowed rebaseMergeAllowed autoMergeAllowed viewerPermission pullRequest(number:$", "number", "){number title url body state isDraft mergeable mergeStateStatus reviewDecision additions deletions changedFiles createdAt updatedAt mergedAt closedAt headRefName baseRefName headRefOid isCrossRepository headRepositoryOwner{__typename login}headRepository{nameWithOwner viewerPermission}headRef{id}author{__typename login avatarUrl...on User{id name}}autoMergeRequest{mergeMethod}viewerCanUpdate viewerDidAuthor viewerCanUpdateBranch baseRef{compare(headRef:$", "headRef", "){behindBy}}reviewRequests(first:$", "requestedReviewers", "){nodes{requestedReviewer{__typename...on User{login name}...on Bot{login}...on Team{slug combinedSlug teamName:name teamAvatarUrl:avatarUrl}}}}labels(first:100){nodes{name color}}commits(last:1){nodes{commit{statusCheckRollup{contexts(first:100){nodes{__typename...", "CheckContext", "}pageInfo{hasNextPage}}}}}}}}"] }
462 + { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){mergeCommitAllowed squashMergeAllowed rebaseMergeAllowed autoMergeAllowed viewerPermission pullRequest(number:$", "number", "){number title url body state isDraft mergeable mergeStateStatus reviewDecision additions deletions changedFiles createdAt updatedAt mergedAt closedAt headRefName baseRefName headRefOid isCrossRepository maintainerCanModify headRepositoryOwner{__typename login}headRepository{nameWithOwner viewerPermission}headRef{id}author{__typename login avatarUrl...on User{id name}}autoMergeRequest{mergeMethod}viewerCanUpdate viewerDidAuthor viewerCanUpdateBranch baseRef{compare(headRef:$", "headRef", "){behindBy}}reviewRequests(first:$", "requestedReviewers", "){nodes{requestedReviewer{__typename...on User{login name}...on Bot{login}...on Team{slug combinedSlug teamName:name teamAvatarUrl:avatarUrl}}}}labels(first:100){nodes{name color}}commits(last:1){nodes{commit{statusCheckRollup{contexts(first:100){nodes{__typename...", "CheckContext", "}pageInfo{hasNextPage}}}}}}}}"] }
463 ],
464 fragments: [
465 { name: "CheckContext", body: ["on StatusCheckRollupContext{__typename...on StatusContext{context state targetUrl createdAt description isRequired(pullRequestNumber:$", "number", ")@include(if:$", "required", ")}...on CheckRun{name status conclusion startedAt completedAt detailsUrl isRequired(pullRequestNumber:$", "number", ")@include(if:$", "required", ")checkSuite{workflowRun{workflow{name}}}}}"] }