The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 19:45 UTC
Update status bar actions state
Julius Marminge committed
Feb 11, 2026 at 18:08 UTC
e0df5d5b58aa01accf4b722b9ce4450e6917cd5d
1 file changed
+1
-41
apps/web/src/components/ChatView.tsx
+1
-41
@@ -1,6 +1,5 @@
1
import {
2
PROVIDER_SEND_TURN_MAX_INPUT_CHARS,
3
- type GitRunStackedActionResult,
3
type GitStackedAction,
4
type GitStatusResult,
5
type ProviderApprovalDecision,
@@ -137,35 +136,6 @@ function derivePendingApprovals(events: ProviderEvent[]): PendingApprovalCard[]
136
return Array.from(pending.values());
137
}
138
140
-function summarizeGitActionResult(result: GitRunStackedActionResult): string {
141
- const parts: string[] = [];
142
-
143
- if (result.commit.status === "created") {
144
- parts.push(`Committed: ${result.commit.subject ?? "changes saved"}.`);
145
- } else {
146
- parts.push("No local changes to commit.");
147
- }
148
-
149
- if (result.push.status === "pushed") {
150
- const upstream = result.push.upstreamBranch;
151
- parts.push(
152
- upstream ? `Pushed to ${upstream}.` : "Pushed to remote branch.",
153
- );
154
- } else if (result.push.status === "skipped_up_to_date") {
155
- parts.push("Push skipped: branch already up to date.");
156
- }
157
-
158
- if (result.pr.status === "created") {
159
- parts.push(result.pr.url ? `PR created: ${result.pr.url}` : "PR created.");
160
- } else if (result.pr.status === "opened_existing") {
161
- parts.push(
162
- result.pr.url ? `Opened existing PR: ${result.pr.url}` : "Opened existing PR.",
163
- );
164
- }
165
-
166
- return parts.join(" ");
167
-}
168
-
139
export default function ChatView() {
140
const { state, dispatch } = useStore();
141
const api = useMemo(() => readNativeApi(), []);
@@ -177,7 +147,6 @@ export default function ChatView() {
147
const [isGitMenuOpen, setIsGitMenuOpen] = useState(false);
148
const [isGitActionRunning, setIsGitActionRunning] = useState(false);
149
const [gitStatus, setGitStatus] = useState<GitStatusResult | null>(null);
180
- const [gitActionNotice, setGitActionNotice] = useState<string | null>(null);
150
const [gitActionError, setGitActionError] = useState<string | null>(null);
151
const [lastEditor, setLastEditor] = useState<EditorId>(() => {
152
const stored = localStorage.getItem(LAST_EDITOR_KEY);
@@ -391,13 +360,11 @@ export default function ChatView() {
360
setIsGitMenuOpen(false);
361
setIsGitActionRunning(true);
362
setGitActionError(null);
394
- setGitActionNotice(null);
363
try {
396
- const result = await api.git.runStackedAction({
364
+ await api.git.runStackedAction({
365
cwd: actionCwd,
366
action,
367
});
400
- setGitActionNotice(summarizeGitActionResult(result));
368
} catch (error) {
369
setGitActionError(
370
error instanceof Error ? error.message : "Git action failed.",
@@ -462,7 +429,6 @@ export default function ChatView() {
429
const activeWorktreePath = activeThread?.worktreePath;
430
431
useEffect(() => {
465
- setGitActionNotice(null);
432
setGitActionError(null);
433
}, [activeProject?.id, activeWorktreePath]);
434
@@ -933,12 +899,6 @@ export default function ChatView() {
899
</div>
900
)}
901
936
- {gitActionNotice && (
937
- <div className="mx-4 mt-3 rounded-lg border border-emerald-200 bg-emerald-50 px-3 py-2 text-xs text-emerald-800 dark:border-emerald-400/20 dark:bg-emerald-500/[0.08] dark:text-emerald-100">
938
- {gitActionNotice}
939
- </div>
940
- )}
941
-
902
{pendingApprovals.length > 0 && (
903
<div className="mx-4 mt-3 space-y-2">
904
{pendingApprovals.map((approval) => {