Skip to content

feat: export all project contacts as CSV - #526

Open
Pratham2511 wants to merge 1 commit into
useplunk:nextfrom
Pratham2511:codex/export-contacts-csv-461
Open

Pratham2511 wants to merge 1 commit into
useplunk:nextfrom
Pratham2511:codex/export-contacts-csv-461

Conversation

@Pratham2511

Copy link
Copy Markdown

Description

Adds Export CSV to Contacts for the entire authenticated project, including contacts beyond the visible page and custom fields found on later pages. The dialog explains that search, filters and selected rows do not limit the export.

A dedicated BullMQ worker reads indexed batches of 100, snapshots rows to a private temporary file and uploads CSV in bounded multipart buffers. Columns are deterministic; quoting, Unicode, null/nested values and spreadsheet formula protection are covered. Authenticated downloads enforce project membership and expire after 24 hours. Queued cancellation/expiry supports immediate restart; active work retains its lock until cleanup.

Self-hosted setup and CSV semantics are documented in CONTRIBUTING.md. The worker requires temporary disk space and permissions to manage a separate private <S3_BUCKET>-contact-exports bucket. It requests one-day expiry and incomplete-upload abort rules; operators must verify backend support. Concurrent edits are not a point-in-time backup. XLSX and a column selector are outside this PR.

Type of Change

  • feat: New feature (MINOR version bump)
  • fix: Bug fix (PATCH version bump)
  • feat!: Breaking change - new feature (MAJOR version bump)
  • fix!: Breaking change - bug fix (MAJOR version bump)
  • docs: Documentation update (no version bump)
  • chore: Maintenance/dependencies (no version bump)
  • refactor: Code refactoring (no version bump)
  • test: Adding tests (no version bump)
  • perf: Performance improvement (PATCH version bump)

Testing

Independent verification on the unchanged patch, using the existing CI profile:

  • Base e0b4faf: yarn test:run — 1,387/1,387 pass.
  • Candidate: yarn test:run — 1,422/1,422 pass.
  • Focused export regressions — 38/38 pass (35 supplied tests plus three temporary reviewer tests); no skips in these three runs.
  • Prior independent lint, root API typecheck, production dashboard build, formatting and real browser/API CSV download pass. The downloaded 305-row, 13-column CSV matches the authenticated API response; tenant/authentication, formula protection, cancellation/restart and phone layout checks pass.

The earlier six local failures were reproduced in a mismatched setup. PostgreSQL used Asia/Kolkata and CI=true was absent; the cutoff timezone effect was independently reproduced. Corrected runs use Node 20.20.2, PostgreSQL 16.15, Redis 7.4.11 and the CI MinIO release, UTC, the existing CI performance profile and unchanged four-worker/30-second limits. Earlier near-floor benchmark and resource-timeout failures remain recorded; no checks, dependencies or unrelated source were changed. Native local services differ from the hosted container environment; remote candidate CI is not yet verified.

Existing unmasked build limitations remain disclosed and were not rerun: direct yarn workspace api build cannot find tsc, and wiki/combined build lacks openapi.local.json. Passing root typecheck/dashboard build does not establish an all-app build pass; CI masks its separate final combined build with || true.

Actual day-long deletion, crash-abandoned upload/temporary-file recovery, million-row heap behavior and Microsoft Excel remain unverified. The earlier Silo backend omitted the requested abort-incomplete-upload rule. Handled upload failures abort correctly; this does not establish crash cleanup.

Checklist

  • PR title follows conventional commits format
  • Code builds successfully (unmasked direct API/wiki limitations above)
  • Tests pass locally
  • Documentation updated (if needed)

Related Issues

Closes #461

Copilot AI balanced review requested due to automatic review settings October 20, 2026 03:04

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Contacts Export Feature

2 participants