Skip to content

feat(prompts): added csv export button in all prompts tab - #54

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
sourabh-31:feat/prompts-csv-export
May 20, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
sourabh-31:feat/prompts-csv-export

Conversation

@sourabh-31

Copy link
Copy Markdown
Contributor

What Changed and Why

  • Added CSV export support to the Prompts dashboard.
  • The export action was added only to the All Prompts tab, not the Insights tab, because the CSV output is based on the prompt list and its related table data.
  • Reused the shared CSV serializer in csv.ts (line 9) to keep export formatting consistent.
  • Kept the export handler inside prompts/page.tsx (line 452) since the exported columns, row mapping, and filename are specific to the Prompts page.
  • Disabled the export action when there is no prompt data to avoid empty downloads.

How to Test the Change

  1. Open the Prompts dashboard for a brand with prompt data.
  2. Go to the All Prompts tab and confirm the Export CSV action is visible and enabled.
  3. Click Export CSV and verify a file downloads with a name like ansvisor_prompts.csv.
  4. Open the downloaded file and confirm the headers and rows match the data shown in the All Prompts table.
  5. Switch to the Insights tab and confirm the CSV export action is not shown there.
  6. Check a brand with no prompts and confirm the export action is disabled or unavailable as expected.
  7. Spot-check rows with empty optional fields or comma-separated values to confirm the CSV formatting is valid.

Screenshots

image

This closes issue #41

@sourabh-31 sourabh-31 changed the title feat: added csv export button in all prompts tab feat(prompts): added csv export button in all prompts tab May 19, 2026
@gkhngyk
gkhngyk merged commit 2c505f7 into ansvisor:main May 20, 2026
1 check passed
@gkhngyk

gkhngyk commented May 20, 2026

Copy link
Copy Markdown
Contributor

Thank you @sourabh-31 🚀

@gkhngyk gkhngyk mentioned this pull request May 26, 2026
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