Open server project outputs on this Mac (#305) - #306
Merged
Merged
Conversation
…viewer, local folder match, Download and Open on server (#305) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (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.
Fixes #305
What was wrong
In a connected project the Outputs tab listed the server's artifacts but made a title openable only when it had a local
pathand the project had a local folder. Server projects have neither, so nothing opened.What a server output is
/companies/:id/artifactsreturns three kinds: an issue document (text, read by/issues/:id/documents/:key), an attachment (bytes at/api/attachments/:id/content), and a work product (attachment-backed with the same content route, a web link, or a workspace file that only has aresourceRefon/issues/:id/work-products, read by/issues/:id/file-resources/content).What changed
paperclip.output.fetch {id, projectId?, preferServer?}downloads with the existing authenticated backend into<data dir>/server-outputs/<origin hash>/<output hash>/<sanitised name>(dirs 0700, files 0600, 50 MB cap checked onContent-Lengthand while streaming). It returnscached(path, MIME),local(the same file in the project's Work locally folder, found from the project-relative path, no symlink or..escape) orlink.paperclip.output.previewreads only from that cache.paperclip.output.save) and Open on server.Tests
tests/server-outputs.test.ts(9): row mapping, name sanitising, cache permissions, reuse, size cap, 403/404, local-binding hit and traversal/symlink refusal, workspace-file work products, cache-only preview.tests/server-outputs-dom.tsx(renderer): server rows are openable (fails before), spinner, viewer, Download, Open on server, honest error, local-folder open, local projects unchanged.🤖 Generated with Claude Code