| ... | ... | @@ -310,20 +310,6 @@ export default function Sidebar() { |
| 310 | 310 | const setSelectionAnchor = useThreadSelectionStore((s) => s.setAnchor); |
| 311 | 311 | const shouldBrowseForProjectImmediately = isElectron; |
| 312 | 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]); |
| 327 | 313 | const projectCwdById = useMemo( |
| 328 | 314 | () => new Map(projects.map((project) => [project.id, project.cwd] as const)), |
| 329 | 315 | [projects], |
| ... | ... | @@ -1509,9 +1495,9 @@ export default function Sidebar() { |
| 1509 | 1495 | const threadStatus = resolveThreadStatusPill({ |
| 1510 | 1496 | thread, |
| 1511 | 1497 | hasPendingApprovals: |
| 1512 | | pendingApprovalByThreadId.get(thread.id) === true, |
| 1498 | derivePendingApprovals(thread.activities).length > 0, |
| 1513 | 1499 | hasPendingUserInput: |
| 1514 | | pendingUserInputByThreadId.get(thread.id) === true, |
| 1500 | derivePendingUserInputs(thread.activities).length > 0, |
| 1515 | 1501 | }); |
| 1516 | 1502 | const prStatus = prStatusIndicator( |
| 1517 | 1503 | prByThreadId.get(thread.id) ?? null, |