Skip to content

fix: resolve CSV export limit and spurious toast on brand tabs - #1

Merged
gitbasitmalik merged 2 commits into
mainfrom
fix/spurious-toast-brand-tabs
Jun 15, 2026
Merged

gitbasitmalik merged 2 commits into
mainfrom
fix/spurious-toast-brand-tabs

Conversation

@gitbasitmalik

Copy link
Copy Markdown
Owner

Summary

This PR addresses two main issues:

  1. CSV Export Limit: Bypassed the default 1,000-row limit when exporting insights data. It now uses a while-loop to paginate through the data 1,000 rows at a time, up to a hard safety ceiling of 50,000 rows to prevent Out-Of-Memory (OOM) crashes.
  2. Export UX: Added an isExporting loading state with a spinner to the export button to prevent duplicate clicks while generating the file. Added a warning toast and a final row in the CSV file if the 50k ceiling is reached.
  3. Spurious Toast Fix: Resolved an issue where navigating quickly across brand tabs would trigger a spurious toast error by adding a cancellation flag and cleanup logic.

Related issue

Closes ansvisor#192

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@gitbasitmalik
gitbasitmalik merged commit 807812b into main Jun 15, 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.

fix(insights): CSV export is silently capped at ~1000 rows (all-time export is incomplete)

1 participant