authorgravatar for dbalders@gmail.comDavid Balderston <dbalders@gmail.com> 2026-03-11 14:05:17-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-03-11 14:05:17-07:00
logff6a66dcabfcfcf28c8c8feb126a7b90842d6368
tree225885b9a77907377861759da1fdd313434c127b
parent2ac735657e2ecf8b227c5e7685d2606063f055cf
signature Signed by PGP key B5690EEEBB952194

Use live thread activities for sidebar status pills (#919)


1 files changed, 2 insertions(+), 16 deletions(-)

apps/web/src/components/Sidebar.tsx+2-16
......@@ -310,20 +310,6 @@ export default function Sidebar() {
310310 const setSelectionAnchor = useThreadSelectionStore((s) => s.setAnchor);
311311 const shouldBrowseForProjectImmediately = isElectron;
312312 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]);
327313 const projectCwdById = useMemo(
328314 () => new Map(projects.map((project) => [project.id, project.cwd] as const)),
329315 [projects],
......@@ -1509,9 +1495,9 @@ export default function Sidebar() {
15091495 const threadStatus = resolveThreadStatusPill({
15101496 thread,
15111497 hasPendingApprovals:
1512 pendingApprovalByThreadId.get(thread.id) === true,
1498 derivePendingApprovals(thread.activities).length > 0,
15131499 hasPendingUserInput:
1514 pendingUserInputByThreadId.get(thread.id) === true,
1500 derivePendingUserInputs(thread.activities).length > 0,
15151501 });
15161502 const prStatus = prStatusIndicator(
15171503 prByThreadId.get(thread.id) ?? null,