Skip to content

feat: add download button to FileViewer header#347

Merged
allison-truhlar merged 1 commit intomainfrom
mkitti-download-button
Apr 9, 2026
Merged

feat: add download button to FileViewer header#347
allison-truhlar merged 1 commit intomainfrom
mkitti-download-button

Conversation

@mkitti
Copy link
Copy Markdown
Contributor

@mkitti mkitti commented Apr 7, 2026

Summary

Adds a download icon button to the FileViewer header for all files. Clicking it triggers a browser download with the correct filename via the HTML download attribute.

  • Uses getFileURL(fspName, file.path) to construct the content URL
  • Uses HiOutlineDownload from react-icons/hi for the icon
  • Wraps the existing JSON format toggle and new download button in a shared flex container so they align consistently

Test plan

  • Open any file in the file browser and confirm the download button appears in the header
  • Click the download button and confirm the file downloads with the correct filename
  • Confirm the JSON format toggle still appears for JSON files alongside the download button
  • pixi run node-check — no TypeScript errors
  • pixi run node-eslint-check — no ESLint errors

🤖 Generated with Claude Code

Adds a download icon button (HiOutlineDownload) to the FileViewer header
for all files. Uses getFileURL to construct the content URL and the HTML
download attribute to trigger a browser download with the correct filename.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@allison-truhlar allison-truhlar merged commit e0bca63 into main Apr 9, 2026
3 checks passed
@allison-truhlar allison-truhlar deleted the mkitti-download-button branch April 9, 2026 20:39
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.

2 participants