feat: shared lib improvements - #71
Merged
Merged
Conversation
HJyup
commented
Jun 6, 2026
Collaborator
- Unify names
- Add comments for shared lib
- Simplify schemas using zod v4
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR improves the shared library contracts and their consumers (API + web) by unifying naming, adding clarifying comments, and updating schemas/types to align with Zod v4 usage.
Changes:
- Renames several shared contract fields/types (e.g.
from/until→dateFrom/dateTo,locationURL→locationUrl,RegistrationFormAnswer→RegistrationAnswer). - Updates API and web call sites to match the renamed shared contracts and schemas.
- Adds/updates documentation comments in shared schema/type definitions and tightens a few schema shapes (e.g.
eventTitlenow required).
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/web/src/routes/me.tsx | Updates user registration query params and relies on required eventTitle. |
| apps/web/src/routes/index.tsx | Updates user registration query params (dateFrom). |
| apps/web/src/routes/events/create.tsx | Renames form field to locationUrl. |
| apps/web/src/routes/events/$eventId/index.tsx | Uses event.locationUrl and passes locationUrl to GoogleMaps. |
| apps/web/src/routes/events/$eventId/edit.tsx | Renames edit initial value to locationUrl. |
| apps/web/src/lib/hooks/registrations/use-batch-update-registrations.tsx | Updates batch update type name import/usage. |
| apps/web/src/lib/data/users.ts | Renames user registrations query params to dateFrom/dateTo consistently. |
| apps/web/src/lib/data/registration.ts | Updates shared schema/type names for registration update endpoints. |
| apps/web/src/components/home/my-events-list.tsx | Removes eventTitle fallback now that schema requires it. |
| apps/web/src/components/google-maps.tsx | Renames prop locationURL → locationUrl. |
| apps/web/src/components/forms/modify-event-form.tsx | Renames form schema + field name + transform to locationUrl. |
| apps/web/src/components/forms/event-registration-form-dialog.tsx | Renames answer type to RegistrationAnswer. |
| apps/web/src/components/controlls/create-register-event-button.tsx | Renames answer type to RegistrationAnswer. |
| apps/shared/src/users/types.ts | Adds/clarifies shared user request/response types and comments. |
| apps/shared/src/users/schemas.ts | Adds comments and defines update/response schemas (with nullable email). |
| apps/shared/src/users/filters.ts | Renames registrations query filter to dateFrom/dateTo and updates docs. |
| apps/shared/src/users/constants.ts | Adds doc comment describing user roles. |
| apps/shared/src/registrations/types.ts | Renames update/batch types and clarifies answer type naming + docs. |
| apps/shared/src/registrations/schemas.ts | Renames update schemas; makes eventTitle required; refines analytics schema typing. |
| apps/shared/src/registrations/constants.ts | Adds doc comment describing registration status lifecycle. |
| apps/shared/src/events/types.ts | Adds comments for event request/response types. |
| apps/shared/src/events/schemas.ts | Introduces FieldType constant usage; renames locationUrl field in contracts. |
| apps/shared/src/events/filters.ts | Simplifies includePast parsing and updates filter documentation. |
| apps/shared/src/events/constants.ts | Adds FieldType and doc comments for event constants. |
| apps/shared/src/core/types.ts | Documents the Nullable<T> helper type. |
| apps/shared/src/core/constants.ts | Adds doc comment describing SIG identifiers. |
| apps/api/src/modules/users/store.ts | Renames registrations date filters to dateFrom/dateTo in DB query conditions. |
| apps/api/src/modules/registration/utils.ts | Renames answer type to RegistrationAnswer. |
| apps/api/src/modules/registration/route.ts | Renames update/batch schemas used to parse request bodies. |
| apps/api/src/modules/events/route.test.ts | Updates tests to send locationUrl. |
| apps/api/src/db/schema.ts | Renames Drizzle model properties to locationUrl and RegistrationAnswer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.