On the first page the mobile window was currentPage ± 1, i.e. {0, 1, 2}.
The 0 clamped away leaving only page 2 before a jump straight to the
last page, so page 1 of 8 rendered as "1 2 ... 8" with no bridging
number (and the last page had the same issue mirrored).
Nudge the window inward by one when the current page is the very first
or last page so these render "1 2 3 ... 8" / "1 ... 6 7 8" instead.