feat(craft): make output/ files downloadable from Artifacts tab#8721
Merged
rohoswagger merged 6 commits intomainfrom Feb 24, 2026
Merged
feat(craft): make output/ files downloadable from Artifacts tab#8721rohoswagger merged 6 commits intomainfrom
rohoswagger merged 6 commits intomainfrom
Conversation
Show top-level items from outputs/ in the Artifacts tab with download buttons. Files download directly; folders are zipped server-side first. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Preview Deployment
|
Contributor
Greptile SummaryThis PR extends the Artifacts tab to make all files and folders in the Key changes:
Issues found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ArtifactsTab
participant API
participant SessionManager
participant SandboxManager
Note over User,SandboxManager: Listing Outputs Directory
User->>ArtifactsTab: View Artifacts Tab
ArtifactsTab->>API: GET /sessions/{id}/files?path=outputs
API->>SessionManager: list_directory(outputs)
SessionManager->>SandboxManager: list_directory(outputs)
SandboxManager-->>SessionManager: Directory entries
SessionManager-->>API: Directory listing
API-->>ArtifactsTab: Output files & folders
ArtifactsTab->>User: Display files/folders with download buttons
Note over User,SandboxManager: Downloading a File
User->>ArtifactsTab: Click download (file)
ArtifactsTab->>API: GET /sessions/{id}/artifacts/{path}
API->>SessionManager: download_artifact(path)
SessionManager->>SandboxManager: read_file(path)
SandboxManager-->>SessionManager: File content
SessionManager-->>API: File content + metadata
API-->>User: Download file
Note over User,SandboxManager: Downloading a Directory
User->>ArtifactsTab: Click download (folder)
ArtifactsTab->>API: GET /sessions/{id}/download-directory/{path}
API->>SessionManager: download_directory(path)
SessionManager->>SandboxManager: list_directory (recursive)
loop For each file
SessionManager->>SandboxManager: read_file(file_path)
SandboxManager-->>SessionManager: File content
SessionManager->>SessionManager: Add to zip
end
SessionManager-->>API: Zip file bytes
API-->>User: Download .zip file
Last reviewed commit: 26d7461 |
Contributor
🖼️ Visual Regression Report
|
…rectory replace() is fragile — slicing the prefix is explicit and correct by construction regardless of path contents. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ctor Admin users see all cc_pairs (bypassing user filters), so the first CRAFT_FILE cc_pair found could belong to a different user. Documents linked to the wrong cc_pair become invisible in /tree which filters by creator_id. Now reuses the shared connector but creates per-user cc_pairs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- list_directory now returns empty listing instead of 404 when the directory doesn't exist (e.g., session workspace not yet loaded) - get_or_create_empty_session now checks session_workspace_exists before reusing a cached session, preventing stale sessions with missing workspaces from being returned Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ts tab - Directories in the Artifacts tab are now expandable/collapsible, showing their contents inline with download buttons on each item - Empty directories are filtered out from the top-level listing - Subfolder files can be downloaded individually or whole folders can be downloaded as zip Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="web/src/app/craft/components/output-panel/ArtifactsTab.tsx">
<violation number="1" location="web/src/app/craft/components/output-panel/ArtifactsTab.tsx:72">
P2: Handle per-directory listing failures; otherwise a single fetch error rejects the entire Promise.all call and prevents any output entries from rendering.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
wenxi-onyx
approved these changes
Feb 24, 2026
Danelegend
pushed a commit
that referenced
this pull request
Feb 25, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Danelegend
pushed a commit
that referenced
this pull request
Feb 25, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.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.
Description
Makes all output files in the
outputs/directory downloadable from the Artifacts tab in Onyx Craft. Previously, only webapp artifacts had download buttons. Now, every top-level file and folder insideoutputs/appears in the Artifacts tab with a download button:download-directoryendpoint and downloaded as.zipfilesoutputs/webdirectory is excluded since it's already shown as a webapp artifact with its own downloadChanges:
download_directorymethod toSessionManagerandGET /sessions/{id}/download-directory/{path}API endpointdownloadArtifactFileanddownloadDirectoryhelpers toapiServices.tsArtifactsTabto fetchoutputs/directory listing and render each entry with a download buttonAlso addresses a tiny file upload connector bug for non-admin users.
How Has This Been Tested?
Additional Options
Summary by cubic
Make all files and folders in outputs/ downloadable from the Artifacts tab, with expandable folders to browse and download nested files or zip whole directories. Also hardens session reuse and fixes cross-user library connector mix-ups.
New Features
Bug Fixes
Written for commit e0a0db5. Summary will update on new commits.