Repository navigation
feat(insights): added csv export button on the answer engine insights page header - #73
Conversation
|
Thanks for the contribution, @sourabh-31! The CSV export itself looks good — it reuses the shared One thing to sort out before merge: the diff shows +287/−102, but most of it is unrelated Prettier reformatting of code the feature doesn't touch (whole-file multi-line rewrapping). This makes the change hard to review and risks merge conflicts, since Could you revert the formatting-only changes and keep just the feature hunks — the Once the diff is just the feature, this is good to merge. Thanks again! 🙌 |
Thanks for the review! I reverted almost all of the unrelated formatting changes — around 98% of them are gone now. A few tiny formatting diffs may still remain in the file because my editor auto-formatted some touched sections while saving. I also think it would help a lot if we add a shared Prettier config to the repo (and possibly enforce it through lint-staged/CI), so everyone’s editor follows the exact same formatting rules and we can avoid noisy diffs like this in future PRs. The actual feature changes are now isolated to the CSV export additions only. 🙌 |
|
Thanks for the update, @sourabh-31 — the diff is much smaller now (287 → 117) and the feature itself looks good. 🙌 It's almost there, but a few formatting-only changes are still mixed in, and the manual cleanup introduced some new whitespace issues. Could you revert those back to
New whitespace issues to fix:
Still-unrelated reformatting to revert to Feature hunks to keep: the Once those are the only changes left, this is good to merge. Thanks again! 🙏 |
|
🚀 |
What changed and why
Export CSVbutton to the Insights page header.Test Single PromptandRun Allremain self-host-only whileExport CSVis shared across environments.resultsstate, so active filters (date range, region, model, topic, etc.) are automatically reflected in the downloaded file.How to test the change
Open
/dashboard/insightswith a brand that has prompt results.Verify the
Export CSVbutton appears in the top-right header area.Click the button and confirm a CSV file downloads with the format:
ansvisor_<brand-slug>_results_<YYYY-MM-DD>.csvOpen the CSV in Excel or Google Sheets and verify:
Apply filters (date range, region, model, topic) and re-export.
Confirm the exported rows match the currently visible filtered dataset.
Verify the button is disabled when:
Verify cloud mode only shows
Export CSV, while self-host mode still shows:Test Single PromptRun AllScreenshot
This closes issue #38