From e0df5d5b58aa01accf4b722b9ce4450e6917cd5d Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 11 Feb 2026 18:08:16 -0800 Subject: [PATCH] Update status bar actions state --- apps/web/src/components/ChatView.tsx | 42 +--------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 2297703ad2649e9b2a95ab0abe62acb293d340d3..060aec0d8cb08e289781b58232f0464f65229be1 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1,6 +1,5 @@ import { PROVIDER_SEND_TURN_MAX_INPUT_CHARS, - type GitRunStackedActionResult, type GitStackedAction, type GitStatusResult, type ProviderApprovalDecision, @@ -137,35 +136,6 @@ function derivePendingApprovals(events: ProviderEvent[]): PendingApprovalCard[] return Array.from(pending.values()); } -function summarizeGitActionResult(result: GitRunStackedActionResult): string { - const parts: string[] = []; - - if (result.commit.status === "created") { - parts.push(`Committed: ${result.commit.subject ?? "changes saved"}.`); - } else { - parts.push("No local changes to commit."); - } - - if (result.push.status === "pushed") { - const upstream = result.push.upstreamBranch; - parts.push( - upstream ? `Pushed to ${upstream}.` : "Pushed to remote branch.", - ); - } else if (result.push.status === "skipped_up_to_date") { - parts.push("Push skipped: branch already up to date."); - } - - if (result.pr.status === "created") { - parts.push(result.pr.url ? `PR created: ${result.pr.url}` : "PR created."); - } else if (result.pr.status === "opened_existing") { - parts.push( - result.pr.url ? `Opened existing PR: ${result.pr.url}` : "Opened existing PR.", - ); - } - - return parts.join(" "); -} - export default function ChatView() { const { state, dispatch } = useStore(); const api = useMemo(() => readNativeApi(), []); @@ -177,7 +147,6 @@ export default function ChatView() { const [isGitMenuOpen, setIsGitMenuOpen] = useState(false); const [isGitActionRunning, setIsGitActionRunning] = useState(false); const [gitStatus, setGitStatus] = useState(null); - const [gitActionNotice, setGitActionNotice] = useState(null); const [gitActionError, setGitActionError] = useState(null); const [lastEditor, setLastEditor] = useState(() => { const stored = localStorage.getItem(LAST_EDITOR_KEY); @@ -391,13 +360,11 @@ export default function ChatView() { setIsGitMenuOpen(false); setIsGitActionRunning(true); setGitActionError(null); - setGitActionNotice(null); try { - const result = await api.git.runStackedAction({ + await api.git.runStackedAction({ cwd: actionCwd, action, }); - setGitActionNotice(summarizeGitActionResult(result)); } catch (error) { setGitActionError( error instanceof Error ? error.message : "Git action failed.", @@ -462,7 +429,6 @@ export default function ChatView() { const activeWorktreePath = activeThread?.worktreePath; useEffect(() => { - setGitActionNotice(null); setGitActionError(null); }, [activeProject?.id, activeWorktreePath]); @@ -933,12 +899,6 @@ export default function ChatView() { )} - {gitActionNotice && ( -
- {gitActionNotice} -
- )} - {pendingApprovals.length > 0 && (
{pendingApprovals.map((approval) => { -- 2.54.0