Skip to content

feat: show response counts on My Forms - #110

Merged
SahinurDEV merged 1 commit into
SahinurDEV:mainfrom
Veeramanikandanr48:feat/form-response-counts
Nov 19, 2026
Merged

SahinurDEV merged 1 commit into
SahinurDEV:mainfrom
Veeramanikandanr48:feat/form-response-counts

Conversation

@Veeramanikandanr48

Copy link
Copy Markdown
Contributor

Summary

  • GET /forms now returns a responseCount for every form, computed with a $lookup + $count aggregation.
  • The My Forms table has a sortable Responses column.
  • Sorting by responseCount is applied before pagination; for other sorts, responses are only counted for the current page.

Tests

  • Added server tests covering response counts (including zero) and sorting by count.
  • Server: pnpm test → 24 passed.
  • Client: pnpm test → 3 passed.
  • tsc --noEmit and ESLint pass in both packages.

Fixes #102

@netlify

netlify Bot commented Nov 18, 2026

Copy link
Copy Markdown

👷 Deploy request for frolicking-cascaron-4fab1f pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 519f5e7

@SahinurDEV
SahinurDEV merged commit 8c2af33 into SahinurDEV:main Nov 19, 2026
1 of 3 checks passed
@SahinurDEV

Copy link
Copy Markdown
Owner

Merged — thank you @Veeramanikandanr48, great work! 🎉 Really nice that sorting by responseCount happens before pagination while the other sorts only count the current page, plus the whitelist for sort fields and the new tests. This closes #102.

Small optional follow-up if you're interested: an index on FormResponse.form would keep the $lookup fast as response counts grow.

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.

Show the number of responses for each form

2 participants