@@ -1340,7 +1423,7 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions
- {isEditingFiles && allFiles.length > 0 && (
+ {activeDialogIncludesCommit && isEditingFiles && allFiles.length > 0 && (
)}
Files
- {!allSelected && !isEditingFiles && (
+ {activeDialogIncludesCommit && !allSelected && !isEditingFiles && (
({selectedFiles.length} of {allFiles.length})
)}
- {allFiles.length > 0 && (
+ {activeDialogIncludesCommit && allFiles.length > 0 && (
-
-
Commit message (optional)
-
+ {activeDialogIncludesCommit ? (
+
+
Commit message (optional)
+
+ ) : null}
+ {activeDialogIncludesCommit ? (
+
+ ) : null}
-
diff --git a/apps/web/src/components/Sidebar.logic.test.ts b/apps/web/src/components/Sidebar.logic.test.ts
index 8793d78f5..9c53cb0cf 100644
--- a/apps/web/src/components/Sidebar.logic.test.ts
+++ b/apps/web/src/components/Sidebar.logic.test.ts
@@ -128,7 +128,11 @@ describe("resolveThreadStatusPill", () => {
resolveThreadStatusPill({
thread: {
...baseThread,
- error: "Socket disconnected",
+ session: {
+ ...baseThread.session,
+ status: "error",
+ orchestrationStatus: "error",
+ },
},
hasPendingApprovals: true,
hasPendingUserInput: true,
@@ -136,6 +140,24 @@ describe("resolveThreadStatusPill", () => {
).toMatchObject({ label: "Error", pulse: false });
});
+ it("ignores historical error text when the session is no longer errored", () => {
+ expect(
+ resolveThreadStatusPill({
+ thread: {
+ ...baseThread,
+ error: "Socket disconnected",
+ session: {
+ ...baseThread.session,
+ status: "ready",
+ orchestrationStatus: "ready",
+ },
+ },
+ hasPendingApprovals: false,
+ hasPendingUserInput: false,
+ }),
+ ).not.toMatchObject({ label: "Error" });
+ });
+
it("shows awaiting input when plan mode is blocked on user answers", () => {
expect(
resolveThreadStatusPill({
diff --git a/apps/web/src/components/Sidebar.logic.ts b/apps/web/src/components/Sidebar.logic.ts
index 372604e02..3c39832cf 100644
--- a/apps/web/src/components/Sidebar.logic.ts
+++ b/apps/web/src/components/Sidebar.logic.ts
@@ -119,7 +119,7 @@ export function resolveThreadStatusPill(input: {
}): ThreadStatusPill | null {
const { hasPendingApprovals, hasPendingUserInput, thread } = input;
- if (thread.error || thread.session?.status === "error") {
+ if (thread.session?.status === "error") {
return {
label: "Error",
colorClass: "text-rose-600 dark:text-rose-300/90",
diff --git a/apps/web/src/store.ts b/apps/web/src/store.ts
index 381925529..ea1051421 100644
--- a/apps/web/src/store.ts
+++ b/apps/web/src/store.ts
@@ -300,7 +300,7 @@ export function syncServerReadModel(state: AppState, readModel: OrchestrationRea
createdAt: proposedPlan.createdAt,
updatedAt: proposedPlan.updatedAt,
})),
- error: thread.session?.lastError ?? null,
+ error: thread.session?.status === "error" ? (thread.session.lastError ?? null) : null,
createdAt: thread.createdAt,
updatedAt: thread.updatedAt,
latestTurn: thread.latestTurn,