Repository navigation
fix(photos): print usable URLs for saved image markup - #100
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
|
@rudycelekli is attempting to deploy a commit to the Together AI Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Summary
Make the HTML printed by
photos --save assetsusable from a page served at the project root. The command downloads an image correctly but puts its absolute filesystem path in the ready-to-copy<img>, which becomes a missing URL when served over HTTP.Convert only the printed HTML source to a working-directory-relative URL, encoding each path segment and normalizing separators. JSON retains its absolute filesystem path; failed downloads and unsaved remote images keep their existing fallback. The documentation states the static project-root scope; this does not infer framework public-folder mappings.
Validation
Actual CLI plus local HTTP proof, using a real public Wikimedia thumbnail: the original emitted image URL returns 404 while the actual asset returns 200. With this patch the emitted URL returns 200 and identical 135,385 image bytes. No model or paid service was used.
The same maintained process regression has three expected failures and three passes on unchanged main, then six passes with the fix. It controls only the download Response boundary for deterministic CI; real selection, CLI, file writes and HTML formatting run normally. Controls cover relative/absolute output directories, Unicode/space/hash URL segments, unchanged absolute JSON paths, failed-download fallback, and unsaved remote output.
Required local reference checks (101 files), all 50 theme validations, index regeneration without a diff and whitespace checks pass. The regression is added to the existing Node 20 verify workflow. Local runtime was Node 22; hosted checks are pending. Vercel deployment authorization is a separate team gate.
Checked all 68 historical/current PRs and full file lists for earlier broad photo/theme work, including #79 which introduced the current expression. Prepared with AI assistance under the account owner's direction and independently reviewed. Maintainer review and merge remain pending.