Repository navigation
Commit a4afe8c
committed
fix: extract stable identity pairs for prewarm effect to avoid re-runs on thread summary changes
The prewarmedSidebarThreads memo depended on sidebarThreadByKey, which is
recreated whenever any sidebar thread summary changes. Since the useEffect
only needs environmentId and threadId (stable identities), this caused
unnecessary cleanup/re-setup cycles for all prewarm subscriptions on every
thread status update.
Replace the thread-object lookup with parseScopedThreadKey to extract
identity pairs directly from the already-stable prewarmedSidebarThreadKeys,
breaking the dependency on the frequently-changing sidebarThreadByKey map.
Applied via @cursor push command1 parent 9284b86 commit a4afe8c
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
2884 | 2885 | | |
2885 | 2886 | | |
2886 | 2887 | | |
2887 | | - | |
| 2888 | + | |
2888 | 2889 | | |
2889 | 2890 | | |
2890 | | - | |
2891 | | - | |
| 2891 | + | |
| 2892 | + | |
2892 | 2893 | | |
2893 | | - | |
| 2894 | + | |
2894 | 2895 | | |
2895 | 2896 | | |
2896 | 2897 | | |
2897 | | - | |
2898 | | - | |
| 2898 | + | |
| 2899 | + | |
2899 | 2900 | | |
2900 | 2901 | | |
2901 | 2902 | | |
2902 | 2903 | | |
2903 | 2904 | | |
2904 | 2905 | | |
2905 | 2906 | | |
2906 | | - | |
| 2907 | + | |
2907 | 2908 | | |
2908 | 2909 | | |
2909 | 2910 | | |
| |||
0 commit comments