Skip to content

feat(maintainer): add CSV export for PR queue (#87)#151

Open
Sujini-kudupudi wants to merge 3 commits into
Coder-s-OG-s:mainfrom
Sujini-kudupudi:feature/pr-queue-csv-export
Open

feat(maintainer): add CSV export for PR queue (#87)#151
Sujini-kudupudi wants to merge 3 commits into
Coder-s-OG-s:mainfrom
Sujini-kudupudi:feature/pr-queue-csv-export

Conversation

@Sujini-kudupudi
Copy link
Copy Markdown

Summary

Adds a one-click CSV export feature for maintainers to download a snapshot of the PR queue matching their active filters. This enables maintainers to easily share queue states with co-maintainers and load them into spreadsheets for planning.

Type of Change

  • Bug fix
  • New feature
  • UI / UX improvement
  • Refactor
  • Documentation
  • Other

Related Issue

Closes #87

What was changed?

  • Added exportPrQueueCsv server action in src/app/actions/maintainer.ts to fetch filter-matching PRs and format them as CSV (omitting the standard 25-item page limit).
  • Created ExportCsvButton client component in src/app/(app)/maintainer/export-csv-button.tsx to trigger the action and handle the secure browser Blob download.
  • Integrated the export button into the filter bar on the maintainer PR queue page.
  • Added age (days) calculation for exported PRs based on github_updated_at.

Screenshots

(If you'd like, you can drag and drop a quick screenshot of the new Export CSV button here before creating the PR!)

Checklist

  • My code follows the project structure and conventions
  • I tested this locally (npm run dev)
  • No hardcoded secrets or credentials
  • I have updated documentation if needed

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 17, 2026

@Sujini-kudupudi is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Ayush-Patel-56
Copy link
Copy Markdown
Collaborator

Please see this #67 (comment)

@Ayush-Patel-56
Copy link
Copy Markdown
Collaborator

@Sujini-kudupudi please solve the conflicts. Thanks

Copy link
Copy Markdown
Collaborator

@Siddhartha-singh01 Siddhartha-singh01 left a comment

Choose a reason for hiding this comment

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

Hi @Sujini-kudupudi the CSV-export feature itself looks fine, but the conflict
resolution in your last two merge commits corrupted maintainer.ts. Specifically,
your new exportPrQueueCsv function is never closed before main's
getRepoHealthOverview starts both function bodies got interleaved into one.
You can see it at lines 604-612:

export async function exportPrQueueCsv(
  installationId: number,
  filters?: Partial<QueueFilters>,
): Promise<Result<string>> {
  const sb = getServerSupabase();
  if (!sb) return err('not_configured', 'auth not configured');
  const service = getServiceSupabase();
  if (!service) return err('not_configured', 'service role missing');
export async function getRepoHealthOverview(): Promise<Result<RepoHealthRow[]>> {

There's no closing } between line 611 and 612. The file doesn't parse — npm run typecheck will fail, and CI will go red shortly. There are even two rateLimit
calls (one with namespace: 'maint:csv', one with namespace: 'maintainer') in
the merged body, which confirms the two functions got smashed together.

The cleanest fix is to reset and redo the merge:

git reset --hard ec92b80         # back to your original feature commit
git fetch upstream main
git rebase upstream/main         # resolve conflicts carefully this time
git push --force-with-lease

When you resolve the conflicts, make sure exportPrQueueCsv is fully closed (the
auth/rate-limit/listMaintainerRepos/validateFilters/CSV-build logic + its return ok(csv) and }) BEFORE getRepoHealthOverview starts.

Critical step: run npm run typecheck locally before pushing that catches
this immediately. If typecheck is green, the merge is sound.

I'll re-review as soon as CI is green. The feature is welcome just needs a clean
merge to land.

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.

Add CSV export for maintainer PR queue

3 participants