Commit 04d82ec
fix(timeline): bound the loaded window with far-edge eviction
The all-repos windowed hook documents itself as keeping "ONE window", but
extendOlder / extendNewer appended / prepended without ever evicting — a
long uninterrupted scroll accumulated the whole walked history in React
state, against the unbounded-scale mandate.
The window is now capped at MAX_WINDOW rows. Extending past the cap drops
the rows now far from the viewport — extendOlder evicts the top and bumps
baseIndex, extendNewer evicts the bottom — recomputing the edge cursor
from the new edge row (a cursor is reconstructable straight from a
CommitSummary now that it is keyed on repo_path). The count-tall scroll
track keeps evicted rows at their true global positions, so scrolling
back simply re-loads them.
tsc + vite build clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 618d895 commit 04d82ec
1 file changed
Lines changed: 39 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
48 | 59 | | |
49 | 60 | | |
50 | 61 | | |
| |||
206 | 217 | | |
207 | 218 | | |
208 | 219 | | |
209 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
210 | 230 | | |
211 | 231 | | |
212 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
213 | 235 | | |
214 | 236 | | |
215 | | - | |
| 237 | + | |
| 238 | + | |
216 | 239 | | |
217 | 240 | | |
218 | 241 | | |
| |||
232 | 255 | | |
233 | 256 | | |
234 | 257 | | |
235 | | - | |
236 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
237 | 266 | | |
238 | 267 | | |
239 | | - | |
240 | | - | |
| 268 | + | |
| 269 | + | |
241 | 270 | | |
| 271 | + | |
242 | 272 | | |
243 | | - | |
244 | | - | |
| 273 | + | |
| 274 | + | |
245 | 275 | | |
246 | 276 | | |
247 | 277 | | |
| |||
0 commit comments