Skip to content

Open server project outputs on this Mac (#305) - #306

Merged
Dkm0315 merged 3 commits into
mainfrom
claude/server-outputs-open
Oct 5, 2026
Merged

Dkm0315 merged 3 commits into
mainfrom
claude/server-outputs-open

Conversation

@Dkm0315

@Dkm0315 Dkm0315 commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

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 path and the project had a local folder. Server projects have neither, so nothing opened.

What a server output is

/companies/:id/artifacts returns 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 a resourceRef on /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 on Content-Length and while streaming). It returns cached (path, MIME), local (the same file in the project's Work locally folder, found from the project-relative path, no symlink or .. escape) or link. paperclip.output.preview reads only from that cache.
  • Every server output row is a link to a new read-only viewer (text and images inline; Reveal / Open with for the rest), with a spinner while loading and the server's refusal in words (403 "will not let you open this output", 404 "no longer on the server", over the cap).
  • Row actions: Download… (main process shows the save dialog and writes the file, command paperclip.output.save) and Open on server.
  • Pull requests, links and local projects are untouched. Muster Server (RPC) outputs have no content route yet and say so.

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.
  • Live check against an isolated Paperclip (port 3271): document and attachment-backed work product fetched, cached 0700/0600; screenshots of the Outputs tab taken.

🤖 Generated with Claude Code

Dkm0315 and others added 3 commits October 5, 2026 19:16
…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>
@Dkm0315
Dkm0315 merged commit 8ba5eba into main Oct 5, 2026
4 checks passed
@Dkm0315
Dkm0315 deleted the claude/server-outputs-open branch October 5, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outputs of a server project can't be opened on this Mac

1 participant