@devries-cameron20 / t3code-1 / commits / 4414f922fe
Fork 0

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

Clear VCS presentation state on finish (#3764)

Julius Marminge committed Jul 7, 2026 at 08:54 UTC 4414f922fe4c83b819f9c1585a85d42f7b295ef6
2 files changed +41 -3
packages/client-runtime/src/state/vcsAction.test.ts
+40
@@ -155,6 +155,46 @@ describe("vcsActionState", () => {
155 });
156 });
157
158 + it("clears running presentation state once the action finishes", () => {
159 + const initial = beginVcsActionState({
160 + operation: "run_change_request",
161 + label: "Running source control action",
162 + actionId,
163 + });
164 + const pushing = applyVcsActionProgressEvent(
165 + initial,
166 + progress({
167 + actionId,
168 + action,
169 + cwd,
170 + kind: "phase_started",
171 + phase: "push",
172 + label: "Pushing...",
173 + }),
174 + );
175 + const finished = applyVcsActionProgressEvent(
176 + pushing,
177 + progress({
178 + actionId,
179 + action,
180 + cwd,
181 + kind: "action_finished",
182 + result,
183 + }),
184 + );
185 +
186 + expect(finished).toMatchObject({
187 + isRunning: false,
188 + operation: "run_change_request",
189 + actionId,
190 + action,
191 + currentLabel: null,
192 + currentPhaseLabel: null,
193 + lastOutputLine: null,
194 + error: null,
195 + });
196 + });
197 +
198 it("retains a terminal action error for presentation", () => {
199 const initial = beginVcsActionState({
200 operation: "run_change_request",
packages/client-runtime/src/state/vcsAction.ts
+1 -3
@@ -386,12 +386,10 @@ export function applyVcsActionProgressEvent(
386 };
387 case "action_finished":
388 return {
389 - ...current,
390 - isRunning: false,
389 + ...EMPTY_VCS_ACTION_STATE,
390 actionId: event.actionId,
391 action: event.action,
392 operation: "run_change_request",
394 - error: null,
393 };
394 case "action_failed":
395 return {