Repository navigation
fix: return user pseuds as an array instead of a joined string - #204
Open
Ashutosh-Panda2004 wants to merge 1 commit into
Open
Ashutosh-Panda2004 wants to merge 1 commit into
Ashutosh-Panda2004 wants to merge 1 commit into
Conversation
getUserProfilePseuds already collects the pseuds into an array and then joins them with ", ", so callers get one string and cannot tell where one pseud ends and the next begins. Return the array instead: User.pseuds is now string[], the zod schema matches, the TODO in getUser is resolved, and the user test expects the array.
Ashutosh-Panda2004
force-pushed
the
fix/202-pseuds-as-array
branch
from
October 12, 2026 18:07
0c7487c to
d96b00c
Compare
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.
Closes #202
getUserProfilePseudsalready collects the pseuds into an array and then joins them with ", ", sogetUserreturns one string and callers can't tell where one pseud ends and the next begins. This returns the array instead:src/users/getters.ts— return the collected array, drop the join and the now-unused suffix constanttypes/entities.ts—User.pseudsis nowstring[]src/users/index.ts— remove the "this should really be an array" TODOtypes/zod/generated/schemas.ts— `pseuds: z.array(z.string()), matching what generate-schemas produces for the new typetests/user.test.ts— expect the arrayOne note: I only applied the pseuds line to the generated schema by hand. A full
npm run generate-schemasalso adds atagsWithSameMeaningentry to tagSchema — that field already exists in types/entities.ts but was never regenerated, so the drift predates this change and I left it out to keep the diff scoped.npm run type-checkpasses and the full suite is green (120 passed, 5 skipped, 1 todo).