Commit 412b605
fix(checkin): remove redundant selectedIds prune effect (render loop)
The prune useEffect depended on presentIdSet, which is recreated every
render while state != ok (sessions = data?.sessions ?? [] makes a fresh
[] each render), so the effect ran every render and setSelectedIds
(ids.filter always returns a new array) re-rendered forever — "Maximum
update depth exceeded" on the loading screen.
The effect was also redundant: selectedPresentIds already filters
selectedIds by presentIdSet at use-time, and every consumer (count,
checkbox state, checkout) reads the present-filtered value, so stale
stored selections are inert. Deleting the effect fixes the loop with no
behavioral change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent cc4f9c6 commit 412b605
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
181 | 180 | | |
182 | 181 | | |
183 | 182 | | |
| |||
0 commit comments