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, 08:45 UTC
Use live thread activities for sidebar status pills (#919)
David Balderston committed
Mar 11, 2026 at 14:05 UTC
ff6a66dcabfcfcf28c8c8feb126a7b90842d6368
1 file changed
+2
-16
apps/web/src/components/Sidebar.tsx
+2
-16
@@ -310,20 +310,6 @@ export default function Sidebar() {
310
const setSelectionAnchor = useThreadSelectionStore((s) => s.setAnchor);
311
const shouldBrowseForProjectImmediately = isElectron;
312
const shouldShowProjectPathEntry = addingProject && !shouldBrowseForProjectImmediately;
313
- const pendingApprovalByThreadId = useMemo(() => {
314
- const map = new Map<ThreadId, boolean>();
315
- for (const thread of threads) {
316
- map.set(thread.id, derivePendingApprovals(thread.activities).length > 0);
317
- }
318
- return map;
319
- }, [threads]);
320
- const pendingUserInputByThreadId = useMemo(() => {
321
- const map = new Map<ThreadId, boolean>();
322
- for (const thread of threads) {
323
- map.set(thread.id, derivePendingUserInputs(thread.activities).length > 0);
324
- }
325
- return map;
326
- }, [threads]);
313
const projectCwdById = useMemo(
314
() => new Map(projects.map((project) => [project.id, project.cwd] as const)),
315
[projects],
@@ -1509,9 +1495,9 @@ export default function Sidebar() {
1495
const threadStatus = resolveThreadStatusPill({
1496
thread,
1497
hasPendingApprovals:
1512
- pendingApprovalByThreadId.get(thread.id) === true,
1498
+ derivePendingApprovals(thread.activities).length > 0,
1499
hasPendingUserInput:
1514
- pendingUserInputByThreadId.get(thread.id) === true,
1500
+ derivePendingUserInputs(thread.activities).length > 0,
1501
});
1502
const prStatus = prStatusIndicator(
1503
prByThreadId.get(thread.id) ?? null,