Skip to content

Fix Instagram carousel media ordering - #45

Merged
mkaand merged 3 commits into
mainfrom
fix/instagram-carousel-media-order
Oct 5, 2026
Merged

mkaand merged 3 commits into
mainfrom
fix/instagram-carousel-media-order

Conversation

@mkaand

@mkaand mkaand commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Changes

Preserve every extractable Instagram sidecar entry in source order, including legitimate repeated media URLs, with each item's own preview and download association.

Fix direct image Share / Save when the CDN serves different representations for Range and full GET requests. The previous frontend compared the full image against the probe's size and returned to idle before Tap Again. Validate against the full response's Content-Length when present; otherwise count streamed bytes under the existing 100 MiB limit. Keep strict image MIME checks, reject empty/incomplete responses, and cancel oversized transfers.

Evidence

Physical acceptance exposed the mixed-carousel image failure. Revision 2 unknown-size handling was insufficient: read-only proxy reproduction measured Image 1 Range total 644,078 bytes versus a complete full JPEG of 539,811 bytes, while the working single-image example matched at 337,218 bytes. Revision 3 corrects that cross-request size comparison.

Scope and validation

Revision 3 changes only mobile-share.js and its tests. The parser ordering fix remains intact; video OPFS, share-session, backend, provider security rules, and UI layout are unchanged. Tests verify ready state and trusted second activation, correct full-response length validation, unknown-length progress, MIME/status rejection, empty bodies, and bounded stream cancellation. Existing five-item mixed-carousel and duplicate-preservation coverage remains.

Local JS: 102 passing; Python: 330 passing, 3 existing skips; PHP: 198 tests completed with isolated missing-.env warnings. Build, lint and dependency audits passed. Physical iPhone acceptance remains pending; do not merge.

mkaand and others added 3 commits October 5, 2026 20:59
Validate direct image bytes against the full response length rather than a separate Range representation. Preserve bounded unknown-length loading and reject empty or invalid image responses.

Co-Authored-By: codex <[email protected]>
@mkaand
mkaand merged commit d79a622 into main Oct 5, 2026
7 of 8 checks passed
@mkaand
mkaand deleted the fix/instagram-carousel-media-order branch October 5, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant