[#345] Sort individual form responses view by time submitted, not by name#355
Merged
DVidal1205 merged 4 commits intomainfrom Feb 10, 2026
Merged
[#345] Sort individual form responses view by time submitted, not by name#355DVidal1205 merged 4 commits intomainfrom
DVidal1205 merged 4 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughSorting logic in PerUserResponsesView.tsx is updated to order grouped user responses chronologically by the earliest submission timestamp instead of alphabetically by user name, affecting only presentation order without changing data collection or display logic. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@apps/blade/src/app/admin/forms/`[slug]/responses/_components/PerUserResponsesView.tsx:
- Around line 93-96: The sort currently uses the first element of each user's
array (a[0]/b[0]) which breaks if responses aren't chronological; update the
sort in the users assignment (the callback used on Object.values(groupedByUser))
to compute each group's earliest submittedAt by scanning the group's items
(e.g., reduce or Math.min over parsed timestamps) and compare those earliest
times (timeA vs timeB) instead of a[0]/b[0], ensuring users are ordered by their
earliest submission.
apps/blade/src/app/admin/forms/[slug]/responses/_components/PerUserResponsesView.tsx
Show resolved
Hide resolved
DVidal1205
approved these changes
Feb 10, 2026
Contributor
DVidal1205
left a comment
There was a problem hiding this comment.
lgtm. congrats on first PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
/form/responsesgets all responses from a form and displays them in alphabetical order. it should be chronological, starting with the first person.What
Issue(s): #345
Sorts responses by time submitted rather than name.
Test Plan
Merge me twin.
Checklist
db:pushbefore mergingSummary by CodeRabbit