@devries-cameron20 / t3code-1 / commits / 05cc444a4a
Fork 0

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

fix(web): a failed commit keeps the commit message you typed (#35781)

Julius Marminge committed Nov 12, 2026 at 18:00 UTC 05cc444a4ab31f527dbf36abd5b9a31cbc49bd47
1 file changed +14 -7
apps/web/src/components/GitActionsControl.tsx
+14 -7
@@ -1238,7 +1238,7 @@ export default function GitActionsControl({
1238 !isLocalDraftThread &&
1239 !readEnvironmentScope(activeEnvironmentId, AuthOrchestrationOperateScope))
1240 )
1241 - return;
1241 + return false;
1242 const actionStatus = statusOverride ?? gitStatusForActions;
1243 const actionBranch = actionStatus?.refName ?? null;
1244 const actionIsDefaultBranch = featureBranch ? false : isDefaultRef;
@@ -1258,7 +1258,7 @@ export default function GitActionsControl({
1258 action !== "commit_push" &&
1259 action !== "commit_push_pr"
1260 ) {
1261 - return;
1261 + return false;
1262 }
1263 setPendingDefaultBranchAction({
1264 action,
@@ -1268,7 +1268,7 @@ export default function GitActionsControl({
1268 ...(onConfirmed ? { onConfirmed } : {}),
1269 ...(filePaths ? { filePaths } : {}),
1270 });
1271 - return;
1271 + return false;
1272 }
1273 onConfirmed?.();
1274 setInlineSuccess(null);
@@ -1288,7 +1288,7 @@ export default function GitActionsControl({
1288
1289 if (result._tag === "Failure") {
1290 if (isAtomCommandInterrupted(result)) {
1291 - return;
1291 + return false;
1292 }
1293
1294 const error = squashAtomCommandFailure(result);
@@ -1302,7 +1302,7 @@ export default function GitActionsControl({
1302 ...(scopedToastData !== undefined ? { data: scopedToastData } : {}),
1303 }),
1304 );
1305 - return;
1305 + return false;
1306 }
1307
1308 const actionResult = result.value;
@@ -1316,6 +1316,7 @@ export default function GitActionsControl({
1316 scopeKey: successScopeKey,
1317 expiresAtMs: inlineSuccessExpiresAt(),
1318 });
1319 + return true;
1320 }
1321
1322 const continuePendingDefaultBranchAction = (featureBranch: boolean) => {
@@ -1334,6 +1335,12 @@ export default function GitActionsControl({
1335 });
1336 };
1337
1338 + // Keep a typed message for the retry unless the user already started a new one.
1339 + const restoreDialogCommitMessageOnFailure = (commitMessage: string) => (committed: boolean) => {
1340 + if (committed || !commitMessage) return;
1341 + setDialogCommitMessage((current) => current || commitMessage);
1342 + };
1343 +
1344 const runDialogActionOnNewBranch = () => {
1345 if (!isCommitDialogOpen) return;
1346 const commitMessage = dialogCommitMessage.trim();
@@ -1349,7 +1356,7 @@ export default function GitActionsControl({
1356 ...(!allSelected ? { filePaths: selectedFiles.map((f) => f.path) } : {}),
1357 featureBranch: true,
1358 skipDefaultBranchPrompt: true,
1352 - });
1359 + }).then(restoreDialogCommitMessageOnFailure(commitMessage));
1360 };
1361
1362 const runQuickAction = () => {
@@ -1434,7 +1441,7 @@ export default function GitActionsControl({
1441 action: "commit",
1442 ...(commitMessage ? { commitMessage } : {}),
1443 ...(!allSelected ? { filePaths: selectedFiles.map((f) => f.path) } : {}),
1437 - });
1444 + }).then(restoreDialogCommitMessageOnFailure(commitMessage));
1445 };
1446
1447 const openChangedFileInEditor = (filePath: string) => {