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