Commit 9986e4b
fix: invalidate lazy-loaded older history when the live window reshapes
Address review (PR pingdotgg#3510, Cursor Bugbot):
- Reconnect / checkpoint revert can re-snapshot or filter the live activity
window, but the prepended `olderActivities` weren't invalidated — leaving gaps
or showing reverted history. Reset the lazy-load state when the live window's
oldest activity id changes (it's stable while activities only append, so this
doesn't fire during a normal turn), in addition to on thread switch. Web + mobile.
- Web only deduped a new older page against already-loaded older pages, not the
live window (mobile already did both). Dedup against both so a boundary overlap
can't produce duplicate ids / React keys.
Not changed — the "unsequenced cursor hides sequenced history" finding is a false
positive: NULL-sequence (legacy) rows always sort oldest in the window/cursor
ordering, so the oldest-loaded row is only unsequenced once every sequenced row
is already loaded; the unsequenced cursor can never strand sequenced rows.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 18af243 commit 9986e4b
2 files changed
Lines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
116 | 123 | | |
117 | 124 | | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 128 | + | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1997 | 1997 | | |
1998 | 1998 | | |
1999 | 1999 | | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
2000 | 2006 | | |
2001 | 2007 | | |
2002 | 2008 | | |
2003 | 2009 | | |
2004 | 2010 | | |
2005 | | - | |
| 2011 | + | |
2006 | 2012 | | |
2007 | | - | |
2008 | 2013 | | |
2009 | 2014 | | |
2010 | 2015 | | |
| |||
2053 | 2058 | | |
2054 | 2059 | | |
2055 | 2060 | | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
2056 | 2064 | | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
2057 | 2068 | | |
2058 | 2069 | | |
2059 | 2070 | | |
| |||
2073 | 2084 | | |
2074 | 2085 | | |
2075 | 2086 | | |
| 2087 | + | |
2076 | 2088 | | |
2077 | 2089 | | |
2078 | 2090 | | |
| |||
0 commit comments