DEV-1545: document Fliplet.Media.capture() without naming an encoding#288
Conversation
capture() is documented and live on developers.fliplet.com (PR #286, merged Jul 8) but was never merged into fliplet-api master — so it does not exist in production. The V3 AI builder reads this doc, learns capture() exists, and generates apps that call a missing platform method. That is unfixable from app code, which is why the AI "couldn't fix it in 10 tries" on the QA report. DEV-1545 is back in To Do and being redesigned (WebKit has no canvas WebP encoder, so the client can never guarantee WebP on Apple; the WebP guarantee is moving server-side), so the gap would otherwise stay open indefinitely. Rather than just delete the guidance — which would leave the builder to hand-roll navigator.camera.getPicture(), the original failure mode — this replaces it with the pattern that actually works in production today: a standard <input type="file" accept="image/*"> (plus the capture attribute to hint the camera), then Files.upload(). Everything documented here now exists. Regenerated the derived bundles with `npm run check:docs` (203 docs, 46 V3 libraries, strict). 163/163 doc unit tests pass. Reverted an unrelated native-framework changelog sync the regeneration picked up (pre-existing staleness in master's bundle) to keep this diff media-only. Co-Authored-By: Claude <noreply@anthropic.com>
Supersedes the unpublish approach on this branch. Unpublishing was right while capture() was reset and not shipping, but it IS shipping — fliplet-api feature/DEV-1545-webp-on-ingest — so removing it from the docs would have hidden a method we are about to deploy, and the AI builder would never generate it. The original bug was the doc promising 'an optimized WebP File'. WebKit has no canvas WebP encoder, so on iOS that promise could never be kept, and the mismatch is what got the feature reverted. The doc now names no encoding at all: the client downscales, the server decides what is stored. Nothing to break. Co-Authored-By: Claude <noreply@anthropic.com>
Deploying fliplet-cli with
|
| Latest commit: |
cb6d473
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d7e600fd.fliplet-cli.pages.dev |
| Branch Preview URL: | https://fix-dev-1545-unpublish-captu.fliplet-cli.pages.dev |
|
docs/.well-known/llms-full.txt:40951 — the regenerated catalog drops capture() from the Media description, contradicting the PR's whole purpose -- This is leftover state from commit 42db45d (the unpublish commit) that commit 63baec5 reverted in media.md but not in the generated bundle. Fix: re-run the generator from a clean tree at 63baec5 so llms-full.txt:40951 matches capabilities.md:43, and re-run npm run check:docs. |
galisufyan-327 caught that llms-full.txt's Fliplet.Media catalog line still
carried the unpublish-era description ("Upload files and display...") while
media.md's frontmatter, llms.txt, llms-v3-libraries.json and v3/capabilities.md
all describe capture(). The bundle the builder reads was out of sync with its
own source — my consolidation commit (63baec5) regenerated the other surfaces
but left this one stale.
Re-ran `npm run check:docs` from a clean tree; all five surfaces now agree on
the capture() description. 163/163 unit tests pass, strict check clean.
This time I did NOT hand-revert the unrelated native-framework changelog sync
(6.4.4→6.4.7) that the regen also picks up: manually surgical-editing a
generated file is exactly what produced the mismatch being fixed here. The
changelog line is llms-full.txt catching up to its own source doc, not drift
from this PR. Keeping generated output as the generator produces it.
Co-Authored-By: Claude <noreply@anthropic.com>
|
Good catch — you're right, and it's my consolidation error. Fixed in cb6d473.
163/163 unit tests pass, strict check clean. And to be precise on your other point: One deliberate note: the clean regen also syncs an unrelated native-framework changelog line (6.4.4→6.4.7) that master's bundle is stale on. I've left it in rather than hand-revert it — surgically editing a generated file is exactly what produced the mismatch you flagged. It's |
JIRA Issue
https://weboo.atlassian.net/browse/DEV-1545
Summary
Rewrites the V3 media doc so
Fliplet.Media.capture()is documented without naming an encoding.The original bug was this doc promising "an optimized WebP
File". WebKit has no canvas WebP encoder — MDN browser-compat-data recordsversion_added: falseforsafari/safari_ioson bothtoBlobandtoDataURL, and per the HTML spec an unsupported type is silently serialized as PNG. So on every Apple device the promise could never be kept, and that mismatch is what got the feature reverted.The doc now says the client downscales and hands the result to
Files.upload()— nothing about the format. The server decides what is stored (WebP, enforced on ingest: fliplet-api#8394). No promise, nothing to break.Note on this PR's history
It originally unpublished
capture(), because the method was live in the docs but had never been merged tofliplet-apimaster — so the AI builder generated calls to a method production didn't have. That was the right call whilecapture()was reset. It is shipping again now, so unpublishing would hide a method we're about to deploy. Same branch, corrected approach — hence the branch name no longer matching the content.Changes
docs/API/v3/media.md—capture()documented with no encoding named;options.qualityis "image quality", not "WebP quality"..well-known/*+v3/capabilities.md— regenerated from source.Verification
npm run test:unit— 163/163 passnpm run check:docs(strict) — 203 docs, 46 V3 libraries, no catalog uniqueness violationscapture photo, take photo, camera, …— what the builder matches onDeploy order
Merge after fliplet-api#8394 deploys. Docs must not advertise
capture()before the API serves it — that ordering is exactly what caused this ticket's original failure.🤖 Generated with Claude Code