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, 16:00 UTC
Show pending approvals in sidebar thread status
- derive pending approvals from thread activities and label status as "Pending Approval" - remove `isolate` class from chat `SidebarInset` containers
Julius Marminge committed
Feb 27, 2026 at 14:49 UTC
bbcf9ba9db15ad02d98c417e3f5566ff2dedf4b7
2 files changed
+12
-5
apps/web/src/components/Sidebar.tsx
+10
-3
@@ -15,6 +15,7 @@ import { newCommandId, newProjectId, newThreadId } from "../lib/utils";
15
import { useStore } from "../store";
16
import { isChatNewLocalShortcut, isChatNewShortcut } from "../keybindings";
17
import { type Thread } from "../types";
18
+import { derivePendingApprovals } from "../session-logic";
19
import { gitRemoveWorktreeMutationOptions } from "../lib/gitReactQuery";
20
import { serverConfigQueryOptions } from "../lib/serverReactQuery";
21
import { readNativeApi } from "../nativeApi";
@@ -50,7 +51,7 @@ function formatRelativeTime(iso: string): string {
51
}
52
53
interface ThreadStatusPill {
53
- label: "Working" | "Connecting" | "Completed" | "Awaiting response";
54
+ label: "Working" | "Connecting" | "Completed" | "Pending Approval";
55
colorClass: string;
56
dotClass: string;
57
pulse: boolean;
@@ -76,7 +77,7 @@ function hasUnseenCompletion(thread: Thread): boolean {
77
function threadStatusPill(thread: Thread, hasPendingApprovals: boolean): ThreadStatusPill | null {
78
if (hasPendingApprovals) {
79
return {
79
- label: "Awaiting response",
80
+ label: "Pending Approval",
81
colorClass: "text-amber-600 dark:text-amber-300/90",
82
dotClass: "bg-amber-500 dark:bg-amber-300/90",
83
pulse: false,
@@ -158,7 +159,13 @@ export default function Sidebar() {
159
const [newCwd, setNewCwd] = useState("");
160
const [isPickingFolder, setIsPickingFolder] = useState(false);
161
const [isAddingProject, setIsAddingProject] = useState(false);
161
- const pendingApprovalByThreadId = useMemo(() => new Map<ThreadId, boolean>(), []);
162
+ const pendingApprovalByThreadId = useMemo(() => {
163
+ const map = new Map<ThreadId, boolean>();
164
+ for (const thread of state.threads) {
165
+ map.set(thread.id, derivePendingApprovals(thread.activities).length > 0);
166
+ }
167
+ return map;
168
+ }, [state.threads]);
169
170
const handleNewThread = useCallback(
171
(
apps/web/src/routes/_chat.$threadId.tsx
+2
-2
@@ -179,7 +179,7 @@ function ChatThreadRouteView() {
179
if (!shouldUseDiffSheet) {
180
return (
181
<>
182
- <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground isolate">
182
+ <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
183
<ChatView threadId={threadId} />
184
</SidebarInset>
185
<DiffPanelInlineSidebar diffOpen={diffOpen} onCloseDiff={closeDiff} onOpenDiff={openDiff} />
@@ -189,7 +189,7 @@ function ChatThreadRouteView() {
189
190
return (
191
<>
192
- <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground isolate">
192
+ <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
193
<ChatView threadId={threadId} />
194
</SidebarInset>
195
<DiffPanelSheet diffOpen={diffOpen} onCloseDiff={closeDiff}>