Skip to content

feat: add copy and download actions for generated README output - #222

Merged
naheel0 merged 1 commit into
mainfrom
feat/161-copy-download-actions
Aug 8, 2026
Merged

feat: add copy and download actions for generated README output#222
naheel0 merged 1 commit into
mainfrom
feat/161-copy-download-actions

Conversation

@naheel0

@naheel0 naheel0 commented Aug 8, 2026

Copy link
Copy Markdown
Member

Closes #161

Adds a Download button next to the existing Copy action in the generated README output card.

Changes

  • New \Download\ button in \MarkdownPreview\ header that exports the generated markdown as \README.md.
  • Works in both Preview and Code output states (exports raw markdown).
  • Existing Copy action and Preview/Code toggle unchanged.

@naheel0
naheel0 requested a review from adithyanmkd as a code owner August 8, 2026 16:27
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
readme-gen-ai Ready Ready Preview Aug 8, 2026 4:27pm

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a00329d6-adc0-4c64-9e28-d35da786beef

📥 Commits

Reviewing files that changed from the base of the PR and between b610cd7 and fd9cfd6.

📒 Files selected for processing (1)
  • src/components/Generator/MarkdownPreview.tsx

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added a Download button to Markdown previews.
    • Users can now save the current Markdown content as a README.md file.
    • Retained the existing Copy functionality alongside the new download option.

Walkthrough

MarkdownPreview adds a Download button that saves the current Markdown content as README.md. The component creates and cleans up a temporary object URL while retaining the existing Copy action.

Changes

Markdown download

Layer / File(s) Summary
Download action and UI wiring
src/components/Generator/MarkdownPreview.tsx
The component imports the Download icon, creates a UTF-8 Markdown Blob, triggers a README.md download, revokes the temporary object URL, and renders the Download button beside Copy.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant MarkdownPreview
  participant BrowserDownloadAPI
  User->>MarkdownPreview: Click Download
  MarkdownPreview->>BrowserDownloadAPI: Create Blob from current content
  MarkdownPreview->>BrowserDownloadAPI: Trigger README.md download
  MarkdownPreview->>BrowserDownloadAPI: Revoke temporary object URL
Loading

Possibly related PRs

Suggested labels: area: frontend

Suggested reviewers: adithyanmkd

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the addition of copy and download actions for generated README output.
Description check ✅ Passed The description directly explains the Download button, README.md export, supported output states, and preserved actions.
Linked Issues check ✅ Passed The changes satisfy issue #161 by adding README.md download support while preserving Copy and supporting Preview and Code states.
Out of Scope Changes check ✅ Passed The changes are limited to the requested Markdown download action and related UI updates in MarkdownPreview.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/161-copy-download-actions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@naheel0

naheel0 commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@naheel0
naheel0 merged commit ca997ce into main Aug 8, 2026
7 checks passed
@naheel0
naheel0 deleted the feat/161-copy-download-actions branch August 8, 2026 16: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.

Add copy and download actions for generated README output

1 participant