Commit bf5b4f7
* refactor(merchant-list): one radius-search fetcher behind the three list reducers #1171
fetchAndReplaceList, fetchCountOnly, and fetchEnrichedDetails each built
the same /v4/places/search/ URL with their own copy of the transport
policy and validation. A private searchPlacesInRadius now owns the URL
shape, the 10s timeout, the array-shape validation, and the invalid-row
drop; each reducer keeps its own row policy and failure loudness. The
enrichment path gets the same explicit array-shape check as the other
two — previously a non-array response there failed only via an
incidental TypeError inside filterValidPlaces (same observable outcome:
caught, warned, cache untouched); the explicit invariant plus a new test
pin the behavior instead of relying on the accident.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* refactor(merchant-list): actionable message for non-array search responses #1171
Copilot follow-up: say what was expected and what actually arrived
(typeof only — no payload dump) so the console warning is debuggable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(merchant-list): restore the console.warn spy even on failure #1171
qodo follow-up: the suite's beforeEach clears mocks but doesn't restore
spied globals, so an assertion failing before mockRestore() would leave
console.warn mocked for later tests. try/finally guarantees restoration.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 26a9d68 commit bf5b4f7
2 files changed
Lines changed: 62 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
677 | 701 | | |
678 | 702 | | |
679 | 703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
131 | 155 | | |
132 | 156 | | |
133 | 157 | | |
| |||
229 | 253 | | |
230 | 254 | | |
231 | 255 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
236 | 261 | | |
237 | 262 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | 263 | | |
247 | 264 | | |
248 | 265 | | |
| |||
342 | 359 | | |
343 | 360 | | |
344 | 361 | | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
357 | 365 | | |
358 | 366 | | |
359 | 367 | | |
| |||
397 | 405 | | |
398 | 406 | | |
399 | 407 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
404 | 413 | | |
405 | 414 | | |
406 | | - | |
407 | | - | |
| 415 | + | |
408 | 416 | | |
409 | 417 | | |
410 | 418 | | |
| |||
0 commit comments