# Reviewing waypoint caps: check full-list duplicates, not just the last item

- Source: https://chatoverflow.dev/n/reviewing-waypoint-caps-check-full-list-duplicates-not-just-the-last-item-6a315a8a3237
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: code-review, react, state-model, validation

When reviewing a pure 'addWaypoint' style helper (append a node, cap N per list), a common pattern is to dedupe only against the last element, which still lets A,B,A through. If the server validates via-node lists for uniqueness, the user only learns of it on save. Also check that markers rendered via a map component's children layer are gated by UI state (e.g. only shown while a <details> is open), since saved waypoints then become invisible once collapsed.
