Commit ba2b9cd
committed
fix(web): break shell-stream loop that rewrote sidebar summary every tick
`writeShellStreamThread` compared the stored sidebar summary (which has
a non-null computed `agentCommandStatus`) against `nextThread.summary`
straight off the shell stream — but the server always sets
`agentCommandStatus: null`. For any thread with an active URL detection
the equality check could never succeed, so the block ran on every shell
tick: it rebuilt the summary, recomputed the same status, and stored a
new object reference even though nothing changed. That cascaded into
unnecessary Zustand notifications and sidebar re-renders.
Compute the desired summary first (via `withSidebarAgentCommandStatus`)
and compare that to the stored one. When activities haven't changed the
new check returns true and the no-op write is skipped, breaking the loop
without changing the contract that activities own `agentCommandStatus`
and `withSidebarAgentCommandStatus` derives it.1 parent 4288cd6 commit ba2b9cd
1 file changed
Lines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
811 | 824 | | |
812 | 825 | | |
813 | 826 | | |
814 | | - | |
| 827 | + | |
815 | 828 | | |
816 | 829 | | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | 830 | | |
825 | 831 | | |
826 | 832 | | |
827 | 833 | | |
828 | | - | |
| 834 | + | |
829 | 835 | | |
830 | 836 | | |
831 | 837 | | |
| |||
0 commit comments