Sync from client@v0.20.0 - #125
Merged
Merged
Conversation
adnaan
added a commit
to livetemplate/livetemplate
that referenced
this pull request
Jul 20, 2026
…#514) * docs(uploads): document lvt-upload-with in the source, not the mirror The lvt-upload-with docs were written into livetemplate/docs directly, but content/reference/uploads.md and client-attributes.md there are generated mirrors of these files — their own frontmatter says so: source_repo: https://github.com/livetemplate/livetemplate source_path: docs/references/uploads.md So the next sync reverts them. Caught by livetemplate/docs#125, the auto-sync from v0.20.0, which showed uploads.md at +7/-66: every line of the new documentation, deleted. Add it here, where it survives. Content matches what is currently live on the docs site, plus a note that the warning needs client v0.20.0. Refs #452, #508 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ui2cwpeGkrUfRt8rh2FgGG * docs(upload): bring the UploadStreamer godoc in line with the opt-in contract Review catch, and a fair one: this PR exists because docs drifted from behaviour, so leaving a third source of truth telling the old story would repeat the mistake it fixes. UploadStreamer's godoc still described fields as "the form fields parsed before this file part", with no mention that a field must be marked lvt-upload-with to be sent at all. Someone reading `go doc` or their editor tooltip — the most likely way an OnUpload implementer meets this — got the pre-#452 contract. Rewritten around the marking, with the ordering and data-envelope caveats kept as rules that apply on top of it rather than as the whole story, and the example now shows the marked input alongside the handler. Also fixed the same stale claim in the uploads.md code sample. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ui2cwpeGkrUfRt8rh2FgGG * fix(client-assets): pin ClientVersion to 0.20.0 ClientVersion sat at 0.18.2 while the client shipped 0.19.1 and 0.20.0. Its own godoc says maintainers must bump it in the same release that adopts a new client — I released both without doing so. This is not cosmetic. ClientScriptURL is built from this constant, so every application following the documented integration path (<script src="{{ .ClientScriptURL }}">) was being served 0.18.2 — the build that still serializes the whole enclosing form into a Proxied upload, minus password fields. The opt-in fix for that (#452) has been on npm since 0.19.1 and was reaching nobody through the library's own path. It also made this PR's own claim false: the docs say the transport warning requires client v0.20.0, while the pinned default served a build without it. Verified the pinned URL resolves and carries the fix: $ curl -sI .../client@0.20.0/dist/livetemplate-client.browser.js HTTP/2 200 $ curl -s ... | grep -c lvt-upload-with 1 Caught in review of the docs change, which is the only reason the mismatch surfaced at all — nothing tests that the pin tracks the client's released version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ui2cwpeGkrUfRt8rh2FgGG * docs(client-attributes): update the walkthrough upload table too client-attributes.md carries two "Upload Attributes" tables — one in the narrative walkthrough (~line 913), one in the quick reference (~line 1041). Only the quick reference got the lvt-upload-with row, so a reader following the walkthrough, which is where lvt-upload is introduced, would never learn the attribute exists. Exactly the mistake this PR exists to fix, one level down: content updated in one copy while another copy kept the old story. The walkthrough also claimed files "are automatically uploaded when the form is submitted". They fire on file selection, which is the entire premise of the opt-in design — there is no submit for the user to review what leaves the page. Corrected, with a pointer to the marking section rather than restating it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ui2cwpeGkrUfRt8rh2FgGG --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated sync from
https://github.com/livetemplate/clientat refv0.20.0.See content/_meta/source-of-truth.yaml for the page mapping that drives this sync. Bring concerns about a specific change to the source repo, not this PR — edits made directly here will be overwritten on the next sync.