Skip to content

feat(web): export Competitor Gaps CSV and explain the disabled Source… - #629

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:feature/citations-export-gaps-and-types-tooltip
Aug 3, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:feature/citations-export-gaps-and-types-tooltip

Conversation

@d180

@d180 d180 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • On the Citations page, "Export CSV" silently greyed out on the Competitor Gaps and Source Types tabs with no explanation — the export handler only implemented domains/urls branches.
  • Competitor Gaps data is already flat and capped at 100 rows server-side, so it's straightforward to export: added a gaps branch to handleExportCsv (domain, category, competitor_answers, competitors, strength — the same columns shown in the visible table), following the existing ansvisor_${slug}_citations_..._${date}.csv naming. The button is now enabled on this tab (disabled only while gap data is still loading/unavailable).
  • Source Types genuinely isn't exportable (it's a chart breakdown, not tabular rows) — kept disabled, but wrapped the button in a tooltip explaining why instead of leaving it unexplained.
  • Domain/URL export behavior is unchanged.

Related issue

Closes #601

Type of change

  • feat — New feature

Checklist

  • Branch follows the naming convention (feature/)
  • 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

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right split — gaps export matches the visible table's columns, and the span-title workaround for the disabled button is the correct way to get a tooltip on it. Thanks!

@gkhngyk
gkhngyk merged commit fb42e25 into ansvisor:main Aug 3, 2026
4 checks passed
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.

Citations: Export CSV is silently disabled on the Competitor Gaps and Source Types tabs

2 participants