c356cf96a1
The Artifact tool writes a page into the session's own Claude Code scratchpad by default (<tmp>/claude-<uid>/<project>/<session>/scratchpad), but pageCopy took the file only from the workspace folder, so such a page got no copy and Preview said "the file ... is gone" while it was still there. pageCopy now also accepts that ONE scratchpad, named from the publishing session's id, its cwd and the workspace account's uid; before reading, each of its four folders must be a real directory of that account, and each file is realpath-confined, opened O_NOFOLLOW and must be a regular file of that uid. Supporting files come only from the page's own root. The older- page backfill (POST /api/artifacts/:id/copy) uses the session's cwd too. The noCopy message now says the file may also lie outside both.
109 KiB
109 KiB