Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the monorepo’s shared contract consumption by migrating the server to a scoped workspace package (@matcha/shared), tightens/changes input sanitization behavior for names/biographies, and enhances “profile incomplete” responses to include missing-field details (surfaced in the client).
Changes:
- Switch server imports and TS path mappings from
@shared/*to the workspace package@matcha/shared/*, and expandshared/package.jsonsubpath exports. - Update sanitization/validation (notably
sanitizeNamenow returnsstring | nullwith stricter allowed characters; biography is no longer escaped) and add missing-field reporting for incomplete profiles. - Adjust server build/runtime wiring (Docker build order; server start entrypoint) and remove committed
distartifacts.
Reviewed changes
Copilot reviewed 23 out of 168 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/package.json | Adds/extends subpath exports for the shared workspace package. |
| server/tsconfig.json | Updates TS path aliases to @matcha/shared and adds a project reference to ../shared. |
| server/src/utils/sanitizer.ts | Changes name/biography sanitization semantics (including sanitizeName: string | null). |
| server/src/routes/profiles/utils.ts | Adds getMissingProfileFields() for richer profile completeness feedback. |
| server/src/routes/discovery/browsing.ts | Returns PROFILE_INCOMPLETE with missingFields details and a richer message. |
| server/src/routes/profiles/profileHandler.ts | Adds explicit first/last name validation errors and adapts to sanitizeName returning null. |
| server/src/routes/authentication/registration.ts | Adds explicit first/last name validation errors for registration. |
| server/src/config/constant.ts | Migrates shared import to @matcha/shared/apiPaths.js. |
| server/src/notification/emitter.ts | Migrates shared import to @matcha/shared/enums.js. |
| server/src/routes/socials/reports.ts | Migrates shared import to @matcha/shared/enums.js. |
| server/src/routes/socialRoutes.ts | Migrates schema import to @matcha/shared/schemas/socialSchema.js. |
| server/src/routes/profileRoutes.ts | Migrates schema import to @matcha/shared/schemas/profileSchema.js. |
| server/src/routes/notificationRoutes.ts | Migrates schema imports to @matcha/shared/schemas/*.js. |
| server/src/routes/discoveryRoutes.ts | Migrates schema imports to @matcha/shared/schemas/discoverySchema.js. |
| server/src/routes/discovery/search.ts | Migrates schema type import to @matcha/shared/schemas/discoverySchema.js. |
| server/src/routes/profiles/location.ts | Migrates shared import to @matcha/shared/enums.js. |
| server/src/routes/authRoutes.ts | Migrates schema imports to @matcha/shared/schemas/authSchema.js. |
| server/package.json | Adds @matcha/shared workspace dependency; updates start script path. |
| server/Dockerfile | Builds shared before server; updates CMD entrypoint. |
| client/src/app/app/feed/page.tsx | Reads missingFields from API error details to enhance incomplete-profile UX. |
| client/src/components/ProfileIncompleteNotice.tsx | Renders missing fields list when provided. |
| server/dist/utils/sendReply.* | Removes committed build artifacts. |
| server/dist/utils/sanitizer.* | Removes committed build artifacts. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
LuckyIntegral
added a commit
that referenced
this pull request
Apr 2, 2026
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.
PR: Bug fixes and prod server
Fixes
Profile name special characters – Names with
./%@#etc. no longer get replaced by weird characters. Server rejects invalid names; client validates with clear error: "Name can only contain letters, spaces, hyphens, and apostrophes."closes weird chars #97
Prod server – Docker CMD and start script use
dist/src/index.js. Shared package builds first. Import paths updated to@matcha/shared.closes prod in server #96
Profile-incomplete message – Users now see exactly what's missing (e.g., "Missing: Gender, Bio, Birth date, At least one photo") instead of the generic "Complete your profile before browsing."
closes Completed profiles #85
Corrupted seeds – I could not replicate the problem so I assume it doesnt exist :)
closes Corrupted seed #86
Other changes