Commit e378806
committed
fix: keep timeline ordered and complete after submitting reviews and comments
Submitting a review inserted its event at the front of the ascending
timeline, rendering it at the top of the conversation until the next
refetch moved it into place, and the eventual-consistency fallback
dropped the reviewer's previous review. Refetches after adding a
comment, replying to a thread, editing/deleting, or deleting/restoring
the branch could serve the stale cached timeline, silently dropping
just-created items.
Reviews are now inserted at the end (their real chronological spot)
using the review identity returned by the submit mutation, and every
refetch that must observe fresh data invalidates the cache first.1 parent da904a8 commit e378806
4 files changed
Lines changed: 51 additions & 47 deletions
File tree
- src/browser
- components
- contexts
- pr-review
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
377 | 380 | | |
378 | 381 | | |
379 | 382 | | |
| |||
990 | 993 | | |
991 | 994 | | |
992 | 995 | | |
| 996 | + | |
| 997 | + | |
993 | 998 | | |
994 | 999 | | |
995 | 1000 | | |
| |||
1059 | 1064 | | |
1060 | 1065 | | |
1061 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
1062 | 1069 | | |
1063 | 1070 | | |
1064 | 1071 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2267 | 2267 | | |
2268 | 2268 | | |
2269 | 2269 | | |
2270 | | - | |
| 2270 | + | |
2271 | 2271 | | |
2272 | | - | |
2273 | | - | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
2274 | 2281 | | |
2275 | 2282 | | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
2276 | 2286 | | |
2277 | 2287 | | |
2278 | 2288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3982 | 3982 | | |
3983 | 3983 | | |
3984 | 3984 | | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
3985 | 3988 | | |
3986 | 3989 | | |
3987 | 3990 | | |
| |||
4012 | 4015 | | |
4013 | 4016 | | |
4014 | 4017 | | |
| 4018 | + | |
| 4019 | + | |
| 4020 | + | |
4015 | 4021 | | |
4016 | 4022 | | |
4017 | 4023 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
42 | 61 | | |
43 | 62 | | |
44 | 63 | | |
| |||
96 | 115 | | |
97 | 116 | | |
98 | 117 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 118 | + | |
108 | 119 | | |
109 | | - | |
110 | | - | |
| 120 | + | |
| 121 | + | |
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
114 | | - | |
| 125 | + | |
115 | 126 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | 127 | | |
147 | 128 | | |
148 | 129 | | |
| |||
0 commit comments