Skip to content

bug bug bug#99

Merged
LuckyIntegral merged 7 commits intodevfrom
mzolfagh/bugBugBug
Mar 13, 2026
Merged

bug bug bug#99
LuckyIntegral merged 7 commits intodevfrom
mzolfagh/bugBugBug

Conversation

@zolfagharipour
Copy link
Copy Markdown
Owner

PR: Bug fixes and prod server

Fixes

  1. 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

  2. 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

  3. 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

  4. Corrupted seeds – I could not replicate the problem so I assume it doesnt exist :)
    closes Corrupted seed #86

Other changes

  • Shared package: explicit subpath exports for schemas and enums
  • Registration and profile edit: consistent name validation (letters, spaces, hyphens, apostrophes only)
  • Biography sanitization: no HTML escaping

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 expand shared/package.json subpath exports.
  • Update sanitization/validation (notably sanitizeName now returns string | null with 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 dist artifacts.

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.

Comment thread server/src/utils/sanitizer.ts
Comment thread client/src/app/app/feed/page.tsx Outdated
Comment thread client/src/components/ProfileIncompleteNotice.tsx Outdated
Comment thread shared/package.json
@LuckyIntegral LuckyIntegral merged commit 293637a into dev Mar 13, 2026
2 checks passed
LuckyIntegral added a commit that referenced this pull request Apr 2, 2026
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.

weird chars prod in server Corrupted seed Completed profiles

3 participants