Skip to content

Use an intentional row cap for dashboard component exports #16

Description

@intraq-dev-ai

Problem

Dashboard component downloads request a row limit that does not match the backend export cap.

The frontend hardcodes limit: 1_000_000 for component downloads, while the backend chart export route clamps exports to MAX_EXPORT_LIMIT = 250_000.

Separately, SQL Editor exports were just standardized to a 100,000-row public export cap in issue #9 / PR #10, so dashboard export limits should be reviewed and made explicit.

Evidence

  • apps/web/src/modules/dashboard-builder/components/canvas/component-download.ts sends limit: 1_000_000.
  • apps/api/src/modules/sql-chart/foundation-route-types.ts defines MAX_EXPORT_LIMIT = 250_000.
  • apps/api/src/modules/sql-chart/chart-export-routes.ts clamps incoming export limits at MAX_EXPORT_LIMIT.
  • apps/api/src/modules/public-access/embed-data-routes.ts also allows download limits up to 1_000_000.

Impact

The frontend/backend mismatch can mislead users and diagnostics. The public-access embed download path may also allow heavier exports than intended for a source-available default setup.

Acceptance criteria

  • Dashboard/component/embed export caps are documented and intentional.
  • Frontend copy/request limits match the actual backend limit.
  • If the agreed public export cap is 100,000 rows, dashboard/component/embed paths enforce that same cap.
  • Tests cover the chosen export cap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:exportsDownload, CSV, Excel, JSON, and export behaviorarea:webFrontend UI and web application issuesbugSomething isn't workingpriority:highImportant fix or roadmap item

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions