Repository navigation
fix(cli): label SVG contact sheet thumbnails by file name on Windows - #6732
jrusso1020 merged 1 commit into
Conversation
…name collision, Windows contact-sheet labels) publishProject seeds usedArchivePaths from fileContents.keys(), so external files no longer overwrite existing _ext/ names; contactSheet uses node:path basename for Windows paths. Both match the upstream PR diffs line for line; DECISIONS records the adoption. Executed from the roadmap's near-term table; the finished row is removed in the same commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: SanHsien <34234698+SanHsien@users.noreply.github.com>
jrusso1020
left a comment
There was a problem hiding this comment.
Reviewed at a07b25ea9214f89ab2f6ce566d63257feaa5509d.
I checked the whole contact-sheet function. Node basename handles native Windows separators and leaves the existing thumbnail labels and pagination intact. No introduced blocker found.
I ran the exact-head contactSheet suite: 4 tests passed with borrowed dependencies. This was Linux, not a native Windows run. The commit is unsigned and needs author re-signing before queueing.
Need: yes · Size: ok · Reuse: existing implementation and tests · Simpler: already bounded · Structure: fine
Risk: low - bounded change; validation limits are stated above.
Verdict: APPROVE
Reasoning: I checked the whole contact-sheet function. Node basename handles native Windows separators and leaves the existing thumbnail labels and pagination intact. No introduced blocker found.
createSvgContactSheet built each path with path.join and then took the
label with split("/"), so on Windows the label was the whole path and
the 60-character cell limit cut the file name off. Use basename, as the
scroll and snapshot sheets in the same file already do.
a07b25e to
b10fd34
Compare
|
Re-signed the commit, no content changes. |
…ve more; advance watermark Twelve commits, PRs 7453-7468, issues 7457-7465 and eleven pin moves are recorded with their evidence in the continued ledger, DECISIONS and UPSTREAM. Adopted: heygen-com#7338, heygen-com#7459, heygen-com#7463, heygen-com#7454, heygen-com#7456 and the heygen-com#7439 docs; heygen-com#6732 was already ported. Deferred: heygen-com#7455, heygen-com#7437. Not applicable: heygen-com#7453, heygen-com#7269, heygen-com#7464. The watermark moves to 9e346f9, PR heygen-com#7468, issue heygen-com#7465; four new PRs are pinned and the eleven moved pins re-pinned at their current heads. FORK.md records the fork-only differences in the heygen-com#7338 port; the roadmap tracks the standalone scripts that keep a bare mkdtemp and issue heygen-com#7458. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
What
The SVG contact sheet from
capturelabels every thumbnail with the full path to the SVG on Windows, and the 60-character cell limit cuts it off before you get to the file name:With the names gone agents can't tell which thumbnail is which file.
Why
createSvgContactSheetbuilds each path withjoin(dir, f)and then gets the label withp.split("/").pop().joinuses\on Windows, so there's no/to split on and you just get the whole path back. The scroll and snapshot sheets in the same file already usebasename.Related work
Refs #5301, the last change to this function (raster formats in contact sheets).
How
Swapped
p.split("/").pop()!forbasename(p), which the file already imports.Test plan
labels each SVG thumbnail with its file namespies oncompositeon the same sharp instance the code loads and checks the label reads1. logo-mark. Fails on main on Windows and passes with the change. Linux and macOS pass either way.bun run --cwd packages/cli test src/capture/contactSheet.test.tson Windows 11, 17 passed.oxlint, oxfmt,
check-comment-citationsandcomment-ratchetare clean. Thepackages/clitypecheck has the same 20 errors as main, none in these files.