Conversation
This reverts commit 32557d7.
WalkthroughThis change refactors the handling of discussion IDs throughout the frontend and server codebase, converting their type from string to number in all relevant interfaces, schemas, and components. It also removes server-side middleware and utilities for encrypting, decrypting, and proxying discussion IDs, along with related environment configuration and dependencies. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend
participant API
User->>Frontend: Initiate discussion-related action (with discussionId as number)
Frontend->>API: Send request with discussionId (number)
API-->>Frontend: Responds with discussionId (number)
Frontend-->>User: Renders UI with numeric discussionId
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related PRs
Suggested labels
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
frontend/apps/server/src/index.ts (1)
74-74: 빈 줄 정리를 고려해보세요.미들웨어 제거 후 남은 빈 줄을 정리하면 코드가 더 깔끔해질 것 같습니다.
await addMiddleware(); await serveHTML(); - if (!isProduction) {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
frontend/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (36)
frontend/.gitignore(0 hunks)frontend/apps/client/src/features/discussion/api/index.ts(2 hunks)frontend/apps/client/src/features/discussion/api/invitationApi.ts(1 hunks)frontend/apps/client/src/features/discussion/api/keys.ts(1 hunks)frontend/apps/client/src/features/discussion/api/mutations.ts(1 hunks)frontend/apps/client/src/features/discussion/api/queries.ts(1 hunks)frontend/apps/client/src/features/discussion/api/queryOptions.ts(1 hunks)frontend/apps/client/src/features/discussion/model/index.ts(2 hunks)frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/SubmitForm.tsx(1 hunks)frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/index.tsx(2 hunks)frontend/apps/client/src/features/shared-schedule/model/finishedSchedules.ts(1 hunks)frontend/apps/client/src/features/shared-schedule/model/ongoingSchedules.ts(1 hunks)frontend/apps/client/src/features/shared-schedule/model/upcomingSchedules.ts(1 hunks)frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/RecommendedSchedules.tsx(1 hunks)frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/ScheduleDetails.tsx(1 hunks)frontend/apps/client/src/features/timeline-schedule/model/index.ts(1 hunks)frontend/apps/client/src/pages/DiscussionPage/DiscussionInvitePage/index.tsx(1 hunks)frontend/apps/client/src/pages/MyCalendarPage/DiscussionContext.ts(1 hunks)frontend/apps/client/src/pages/MyCalendarPage/index.tsx(1 hunks)frontend/apps/client/src/routes/_main/discussion/invite/$id.tsx(1 hunks)frontend/apps/client/src/utils/error/HTTPError.ts(0 hunks)frontend/apps/client/src/utils/error/handleError.ts(1 hunks)frontend/apps/server/package.json(1 hunks)frontend/apps/server/src/envconfig.ts(0 hunks)frontend/apps/server/src/index.ts(2 hunks)frontend/apps/server/src/middlewares/discussionId/discussionCipher.ts(0 hunks)frontend/apps/server/src/middlewares/discussionId/index.ts(0 hunks)frontend/apps/server/src/middlewares/discussionId/proxyHandlers.ts(0 hunks)frontend/apps/server/src/utils/cipher.ts(0 hunks)frontend/apps/server/src/utils/collectResponse.ts(0 hunks)frontend/apps/server/src/utils/isProduction.ts(0 hunks)frontend/apps/server/src/utils/object.ts(0 hunks)frontend/apps/server/src/utils/stringTransformer.ts(0 hunks)frontend/apps/server/tsup.config.ts(1 hunks)frontend/apps/server/vitest.config.ts(1 hunks)frontend/package.json(0 hunks)
💤 Files with no reviewable changes (12)
- frontend/.gitignore
- frontend/package.json
- frontend/apps/client/src/utils/error/HTTPError.ts
- frontend/apps/server/src/utils/isProduction.ts
- frontend/apps/server/src/envconfig.ts
- frontend/apps/server/src/utils/collectResponse.ts
- frontend/apps/server/src/utils/stringTransformer.ts
- frontend/apps/server/src/middlewares/discussionId/proxyHandlers.ts
- frontend/apps/server/src/middlewares/discussionId/discussionCipher.ts
- frontend/apps/server/src/utils/cipher.ts
- frontend/apps/server/src/utils/object.ts
- frontend/apps/server/src/middlewares/discussionId/index.ts
🧰 Additional context used
🧠 Learnings (16)
📓 Common learnings
Learnt from: dioo1461
PR: softeer5th/Team4-enDolphin#53
File: frontend/src/components/Input/MultiInput.tsx:50-59
Timestamp: 2025-02-04T03:10:35.809Z
Learning: User dioo1461 prefers to receive code reviews and responses in Korean language.
Learnt from: dioo1461
PR: softeer5th/Team4-enDolphin#365
File: frontend/server/middlewares/discussionIdTransformer/discussionCipher.js:24-30
Timestamp: 2025-03-28T06:06:04.683Z
Learning: The decryptDiscussionId function can benefit from additional error handling despite the existing error handling in the aesGcm module, since aesGcm rethrows errors rather than handling them with fallbacks. Error handling for the URL processing-related functions improves application resilience.
frontend/apps/server/package.json (2)
Learnt from: hamo-o
PR: #411
File: frontend/apps/client/package.json:7-7
Timestamp: 2025-05-27T17:33:56.448Z
Learning: In the Team4-enDolphin project, the server uses Vite as middleware in development mode, so the dev script in frontend/apps/client/package.json only needs to start the server (pnpm --filter server start) rather than running separate Vite dev server and server processes.
Learnt from: dioo1461
PR: #426
File: frontend/packages/ui/vite.config.ts:6-0
Timestamp: 2025-06-13T07:39:57.840Z
Learning: frontend/packages/ui/vite.config.ts 에서 defineConfig 를 vitest/config 로부터 가져오는 것은 정상적인 패턴이다. vitest/config 는 Vite의 defineConfig 를 re-export 하며, test 옵션 타입을 추가로 제공한다.
frontend/apps/client/src/features/shared-schedule/model/finishedSchedules.ts (1)
Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature's SharedEventDTO, use z.string().datetime() for validating date-time strings as it properly handles ISO 8601 format.
frontend/apps/client/src/features/shared-schedule/model/ongoingSchedules.ts (1)
Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature's SharedEventDTO, use z.string().datetime() for validating date-time strings as it properly handles ISO 8601 format.
frontend/apps/server/tsup.config.ts (3)
Learnt from: dioo1461
PR: #426
File: frontend/packages/ui/vite.config.ts:6-0
Timestamp: 2025-06-13T07:39:57.840Z
Learning: frontend/packages/ui/vite.config.ts 에서 defineConfig 를 vitest/config 로부터 가져오는 것은 정상적인 패턴이다. vitest/config 는 Vite의 defineConfig 를 re-export 하며, test 옵션 타입을 추가로 제공한다.
Learnt from: hamo-o
PR: #411
File: frontend/apps/client/package.json:7-7
Timestamp: 2025-05-27T17:33:56.448Z
Learning: In the Team4-enDolphin project, the server uses Vite as middleware in development mode, so the dev script in frontend/apps/client/package.json only needs to start the server (pnpm --filter server start) rather than running separate Vite dev server and server processes.
Learnt from: hamo-o
PR: #89
File: frontend/src/routes/__root.tsx:18-20
Timestamp: 2025-02-04T09:08:12.489Z
Learning: In the Team4-enDolphin project, environment-specific features should be lazy-loaded and conditionally imported based on defaultENV.MODE to optimize bundle size and enable tree-shaking in production builds.
frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/RecommendedSchedules.tsx (2)
Learnt from: hamo-o
PR: #205
File: frontend/src/features/discussion/ui/DiscussionCalendar/CalendarTable.tsx:29-33
Timestamp: 2025-02-19T05:54:56.987Z
Learning: The hardcoded selectedUserIdList in CalendarTable.tsx will be replaced with dynamic user selection when checkbox functionality is implemented in a future PR.
Learnt from: hamo-o
PR: #101
File: frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx:10-35
Timestamp: 2025-02-06T05:14:12.328Z
Learning: Form state management and validation for the SchedulePopover component in frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx will be implemented in a future PR.
frontend/apps/client/src/features/shared-schedule/model/upcomingSchedules.ts (1)
Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature's SharedEventDTO, use z.string().datetime() for validating date-time strings as it properly handles ISO 8601 format.
frontend/apps/client/src/pages/MyCalendarPage/DiscussionContext.ts (1)
Learnt from: hamo-o
PR: #205
File: frontend/src/features/discussion/ui/DiscussionCalendar/CalendarTable.tsx:29-33
Timestamp: 2025-02-19T05:54:56.987Z
Learning: The hardcoded selectedUserIdList in CalendarTable.tsx will be replaced with dynamic user selection when checkbox functionality is implemented in a future PR.
frontend/apps/client/src/features/discussion/model/index.ts (2)
Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature's SharedEventDTO, use z.string().datetime() for validating date-time strings as it properly handles ISO 8601 format.
Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature, use:
z.string().datetime()when the field needs to validate full ISO 8601 datetime strings (e.g., in SharedEventDTO)DATE_BARregex when only date component (YYYY-MM-DD) needs to be validated
frontend/apps/client/src/utils/error/handleError.ts (3)
Learnt from: hamo-o
PR: #348
File: frontend/src/main.tsx:16-19
Timestamp: 2025-03-23T22:04:21.003Z
Learning: In the Team4-enDolphin project, throwOnError: handleError in Tanstack Query configuration is intentional. The handleError function contains branching logic that returns true for NetworkError to propagate it, and false for other errors to handle them internally without rethrowing.
Learnt from: hamo-o
PR: #348
File: frontend/src/main.tsx:16-19
Timestamp: 2025-03-23T22:04:21.003Z
Learning: In the Team4-enDolphin project, throwOnError: handleError in Tanstack Query configuration is intentional. The handleError function contains branching logic that returns true for NetworkError to propagate it, and false for other errors to handle them internally without rethrowing.
Learnt from: dioo1461
PR: #365
File: frontend/server/middlewares/discussionIdTransformer/discussionCipher.js:24-30
Timestamp: 2025-03-28T06:06:04.683Z
Learning: The decryptDiscussionId function can benefit from additional error handling despite the existing error handling in the aesGcm module, since aesGcm rethrows errors rather than handling them with fallbacks. Error handling for the URL processing-related functions improves application resilience.
frontend/apps/server/src/index.ts (3)
Learnt from: hamo-o
PR: #411
File: frontend/apps/client/package.json:7-7
Timestamp: 2025-05-27T17:33:56.448Z
Learning: In the Team4-enDolphin project, the server uses Vite as middleware in development mode, so the dev script in frontend/apps/client/package.json only needs to start the server (pnpm --filter server start) rather than running separate Vite dev server and server processes.
Learnt from: dioo1461
PR: #365
File: frontend/server/middlewares/discussionIdTransformer/discussionCipher.js:24-30
Timestamp: 2025-03-28T06:06:04.683Z
Learning: The decryptDiscussionId function can benefit from additional error handling despite the existing error handling in the aesGcm module, since aesGcm rethrows errors rather than handling them with fallbacks. Error handling for the URL processing-related functions improves application resilience.
Learnt from: dioo1461
PR: #426
File: frontend/packages/ui/vite.config.ts:6-0
Timestamp: 2025-06-13T07:39:57.840Z
Learning: frontend/packages/ui/vite.config.ts 에서 defineConfig 를 vitest/config 로부터 가져오는 것은 정상적인 패턴이다. vitest/config 는 Vite의 defineConfig 를 re-export 하며, test 옵션 타입을 추가로 제공한다.
frontend/apps/client/src/pages/MyCalendarPage/index.tsx (4)
Learnt from: hamo-o
PR: #205
File: frontend/src/features/discussion/ui/DiscussionCalendar/CalendarTable.tsx:29-33
Timestamp: 2025-02-19T05:54:56.987Z
Learning: The hardcoded selectedUserIdList in CalendarTable.tsx will be replaced with dynamic user selection when checkbox functionality is implemented in a future PR.
Learnt from: hamo-o
PR: #95
File: frontend/src/components/Calendar/Core/WeekCell.tsx:34-34
Timestamp: 2025-02-06T01:44:08.551Z
Learning: In the Calendar WeekCell component, Date.now() is intentionally used as a key when selected is true to force re-renders of the component when the selected state changes. This is a specific requirement for the component's animation behavior.
Learnt from: hamo-o
PR: #101
File: frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx:10-35
Timestamp: 2025-02-06T05:14:12.328Z
Learning: Form state management and validation for the SchedulePopover component in frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx will be implemented in a future PR.
Learnt from: hamo-o
PR: #80
File: frontend/src/components/Calendar/Header/CalendarHeader.tsx:8-24
Timestamp: 2025-02-04T03:20:42.270Z
Learning: The codebase uses useSafeContext hook to handle React context error cases by throwing an error with message "🚨 이 컴포넌트는 ContextProvider 내부에서 사용되어야 합니다!" when the context value is null.
frontend/apps/server/vitest.config.ts (2)
Learnt from: dioo1461
PR: #426
File: frontend/packages/ui/vite.config.ts:6-0
Timestamp: 2025-06-13T07:39:57.840Z
Learning: frontend/packages/ui/vite.config.ts 에서 defineConfig 를 vitest/config 로부터 가져오는 것은 정상적인 패턴이다. vitest/config 는 Vite의 defineConfig 를 re-export 하며, test 옵션 타입을 추가로 제공한다.
Learnt from: hamo-o
PR: #411
File: frontend/apps/client/package.json:7-7
Timestamp: 2025-05-27T17:33:56.448Z
Learning: In the Team4-enDolphin project, the server uses Vite as middleware in development mode, so the dev script in frontend/apps/client/package.json only needs to start the server (pnpm --filter server start) rather than running separate Vite dev server and server processes.
frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/SubmitForm.tsx (4)
Learnt from: hamo-o
PR: #267
File: frontend/src/features/discussion/ui/DiscussionForm/MeetingPassword.tsx:16-20
Timestamp: 2025-02-21T17:55:36.208Z
Learning: In the DiscussionForm component, the password field is optional and not required for form submission.
Learnt from: hamo-o
PR: #169
File: frontend/src/features/my-calendar/ui/SchedulePopover/PopoverForm.tsx:73-73
Timestamp: 2025-02-14T11:43:43.567Z
Learning: In the SchedulePopover's PopoverForm component, the time input fields are readOnly and their values are controlled by the parent component through valuesRef, so validation for time range is not needed.
Learnt from: hamo-o
PR: #101
File: frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx:10-35
Timestamp: 2025-02-06T05:14:12.328Z
Learning: Form state management and validation for the SchedulePopover component in frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx will be implemented in a future PR.
Learnt from: hamo-o
PR: #96
File: frontend/src/components/DatePicker/Header/index.tsx:22-27
Timestamp: 2025-02-06T02:45:15.500Z
Learning: Date picker navigation controls (e.g., previous/next month buttons) should include proper accessibility attributes:
- role="button" for semantic meaning
- tabIndex={0} for keyboard focus
- aria-label for screen reader description
- onKeyDown handler for keyboard interaction (Enter key)
frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/ScheduleDetails.tsx (2)
Learnt from: hamo-o
PR: #205
File: frontend/src/features/discussion/ui/DiscussionCalendar/CalendarTable.tsx:29-33
Timestamp: 2025-02-19T05:54:56.987Z
Learning: The hardcoded selectedUserIdList in CalendarTable.tsx will be replaced with dynamic user selection when checkbox functionality is implemented in a future PR.
Learnt from: hamo-o
PR: #101
File: frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx:10-35
Timestamp: 2025-02-06T05:14:12.328Z
Learning: Form state management and validation for the SchedulePopover component in frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx will be implemented in a future PR.
frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/index.tsx (1)
Learnt from: hamo-o
PR: #267
File: frontend/src/features/discussion/ui/DiscussionForm/MeetingPassword.tsx:16-20
Timestamp: 2025-02-21T17:55:36.208Z
Learning: In the DiscussionForm component, the password field is optional and not required for form submission.
🧬 Code Graph Analysis (3)
frontend/apps/client/src/routes/_main/discussion/invite/$id.tsx (1)
frontend/apps/client/src/features/discussion/api/queryOptions.ts (1)
invitationQueryOption(8-11)
frontend/apps/client/src/features/discussion/api/index.ts (1)
frontend/apps/client/src/features/discussion/model/index.ts (2)
DiscussionConfirmResponse(80-90)DiscussionConfirmResponse(96-96)
frontend/apps/server/vitest.config.ts (1)
frontend/configs/vitest-config/src/node.ts (1)
nodeConfig(3-9)
🔇 Additional comments (32)
frontend/apps/client/src/utils/error/handleError.ts (1)
25-25: 변경 확인: 404 에러 처리 로직 완전 제거됨스크립트 실행 결과,
frontend/apps/client/src/utils/error/HTTPError.ts내에isNotFoundError메소드가 존재하지 않고- 전체 코드베이스(
frontend/)에isNotFoundError참조가 없으며not-found관련 라우팅 설정도 더 이상 사용되지 않음을 확인했습니다.따라서 해당 리팩토링은 HTTPError 클래스 변경 사항과 일치하며, 추가 정리 작업 없이 안전하게 머지할 수 있습니다.
frontend/apps/server/package.json (1)
12-12: 의존성 정리가 올바르게 수행되었습니다.
http-proxy-middleware제거는 논의 ID 암호화 미들웨어 제거와 일치하며,@endolphin/vitest-config추가는 테스트 인프라 개선을 위한 좋은 변경사항입니다.Also applies to: 17-18
frontend/apps/server/tsup.config.ts (1)
11-11: Verifybundle: falsebuild & deploy compatibilityDisabling bundling in
tsup.config.tsmeans your output will be a set of ESM files rather than a single bundled artifact. Please confirm the following before merging:
- Dependencies (e.g.
express) are always installed in your deployment environment so that runtime imports resolve correctly.- The generated
dist/folder contains all necessary.jsmodules and thatnode dist/index.jsstill works (check your"type": "module"setting or file extensions).- Your CI/CD or Docker pipeline packages both
dist/andnode_modules(or otherwise provisions dependencies) to avoid runtime errors.If you intentionally switched off bundling for faster iteration or clearer stack traces, document these deployment changes; otherwise consider re-enabling bundling for a self-contained server build.
frontend/apps/server/vitest.config.ts (1)
1-14: 테스트 설정이 올바르게 구성되었습니다.ES 모듈 환경에서 올바른 디렉터리 경로 처리 방식을 사용하고 있으며, 워크스페이스의 기본 설정과 프로젝트별 설정을 적절히 병합하고 있습니다. vitest/config의 defineProject 사용도 표준 패턴을 따르고 있습니다.
frontend/apps/server/src/index.ts (1)
10-10: 인라인 환경 체크로 단순화가 잘 되었습니다.
isProduction유틸리티를 인라인으로 정의하여 불필요한 import를 제거한 것은 좋은 단순화입니다.frontend/apps/client/src/pages/DiscussionPage/DiscussionInvitePage/index.tsx (1)
25-25: 토론 ID 타입 변환이 올바르게 구현되었습니다.문자열 라우트 매개변수를 숫자로 변환하는 단항 플러스 연산자 사용이 적절합니다. 이는
DiscussionInviteCard컴포넌트가 이제 숫자 타입의discussionId를 기대하는 것과 일치합니다.frontend/apps/client/src/features/shared-schedule/model/upcomingSchedules.ts (2)
9-9: 토론 ID 타입 변경이 올바르게 적용되었습니다.
discussionId를z.number()로 변경한 것이 리버트 목적에 부합합니다.
21-22: Align discussionId type between UpcomingSchedule schemasThe two schemas in
upcomingSchedules.tscurrently diverge ondiscussionId:
UpcomingScheduleSchema(line 9):discussionId: z.number(),UpcomingScheduleDetailsResponseSchema(lines 21–22):// TODO: discussionId 인코딩 적용 후 z.string()으로 변경 discussionId: z.union([z.string(), z.number()]),If the API always returns a numeric ID, change the details schema to use
z.number(). If the details endpoint may encode the ID as a string, either:
- Update
UpcomingScheduleSchemato match (union) and normalize downstream, or- Decode the string before parsing and keep both schemas as
z.number().Please confirm the backend contract and update both schemas accordingly.
frontend/apps/client/src/features/shared-schedule/model/ongoingSchedules.ts (1)
5-5: 토론 ID 타입 변경이 일관되게 적용되었습니다.
discussionId를z.number()로 변경한 것이 다른 스케줄 모델들과 일치하며 리버트 목적에 부합합니다.frontend/apps/client/src/features/discussion/api/queries.ts (1)
111-112: Invitation Query Type Change VerifiedAll invitation-related modules consistently use
numberfordiscussionId, while other discussion features continue to usestring. This aligns with the separate backend endpoints for invitation vs. encrypted-ID functionality. No code changes are required.Relevant files (all consistently using
numberfor invitation):
- frontend/apps/client/src/features/discussion/api/queries.ts –
useInviteInfoQuery(discussionId: number)- frontend/apps/client/src/features/discussion/api/queryOptions.ts –
invitationQueryOption(discussionId: number)- frontend/apps/client/src/features/discussion/api/keys.ts –
invitationQueryKey(discussionId: number)- frontend/apps/client/src/features/discussion/api/invitationApi.ts –
getInvitationInfo(discussionId: number)&postInviatationJoin(discussionId: number)- frontend/apps/client/src/features/discussion/api/mutations.ts – mutation
body: { discussionId: number }- frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/** – props using
numberOther discussion queries (e.g.,
useDiscussionQuery,discussionCalendarQuery, etc.) correctly remain onstringfor encrypted IDs.frontend/apps/client/src/features/shared-schedule/model/finishedSchedules.ts (1)
6-6: 토론 ID 타입 변경이 일관되게 적용되었습니다.
discussionId를z.number()로 변경한 것이 다른 스케줄 모델들과 일치하며 리버트가 올바르게 구현되었습니다.frontend/apps/client/src/features/timeline-schedule/model/index.ts (1)
34-34: discussionId schema update is safe and requires no further changesThe change of
discussionIdtoz.number()inCandidateDetailResponseSchemaapplies only to the parsed response. We’ve scanned all usages ofCandidateDetailResponseand found:
- No UI or downstream code consuming
response.discussionIdexpects it to be a string.- All request/query functions still take
discussionIdas a string input (route params), which is orthogonal to the response schema.- Invitation APIs already handle
discussionIdas a number, matching the updated schema.No code paths were found that misuse the parsed
discussionIdas a string, so this schema change is safe as-is.frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/SubmitForm.tsx (1)
14-14: Props 타입 변경이 올바르게 적용되었습니다.
SubmitFormProps의discussionId타입을 number로 변경한 것이 적절합니다. 컴포넌트 내부에서 navigation 시.toString()을 사용하여 string으로 변환하는 부분(34번째 줄)도 올바르게 처리되어 있습니다.frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/RecommendedSchedules.tsx (1)
58-58: 컴포넌트 Props 타입 변경이 올바르게 구현되었습니다.
RecommendedScheduleItem의discussionIdprops 타입을 number로 변경한 것이 적절합니다. Link 컴포넌트의 params에서.toString()을 사용하여 string으로 변환하는 부분(70번째 줄)도 올바르게 처리되어 있습니다.frontend/apps/client/src/features/discussion/api/keys.ts (1)
27-27: Query Key 함수의 타입 변경이 올바르게 적용되었습니다.
invitationQueryKey함수의discussionId매개변수 타입을 number로 변경한 것이 전체적인 타입 리팩토링과 일치합니다. React Query의 캐시 키는 number 타입을 올바르게 처리할 수 있으므로 문제없이 작동할 것입니다.frontend/apps/client/src/features/discussion/api/queryOptions.ts (1)
8-8: Query Option 함수의 타입 변경이 일관성 있게 적용되었습니다.
invitationQueryOption함수의discussionId매개변수 타입을 number로 변경한 것이 적절합니다. 이 변경사항은invitationQueryKey와invitationApi.getInvitationInfo함수에서도 number 타입을 사용하는 것과 일치합니다.frontend/apps/client/src/routes/_main/discussion/invite/$id.tsx (1)
22-22: 타입 변환이 올바르게 적용되었습니다.라우트 파라미터
id를Number()로 변환하여invitationQueryOption함수에 전달하는 것이 적절합니다. 라우트 파라미터는 항상 문자열이지만 API가 이제 숫자 타입을 기대하므로 필요한 변환입니다.frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/ScheduleDetails.tsx (3)
23-23: props 타입이 올바르게 업데이트되었습니다.
discussionId의 타입이string에서number로 변경되어 전체 코드베이스의 타입 일관성과 맞춰졌습니다.
55-55: 라우트 파라미터를 위한 타입 변환이 적절합니다.Link 컴포넌트의 params는 문자열을 기대하므로
.toString()변환이 올바릅니다.
28-28: 확인 완료:useDiscussionQuery훅은 문자열 파라미터를 기대하므로.toString()사용이 올바릅니다.현재 코드(
frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/ScheduleDetails.tsx)에서:
discussionId는number타입이며useDiscussionQuery(discussionId.toString())로 전달되어야 훅 시그니처(discussionId: string)와 일치합니다.장기적으로는
discussionId타입을 전역적으로string으로 통일하거나, 훅이number도 허용하도록 오버로드를 고려할 수 있습니다.frontend/apps/client/src/pages/MyCalendarPage/index.tsx (1)
18-18: 상태 타입이 올바르게 업데이트되었습니다.
selectedId상태의 타입을number | null로 변경한 것이 전체 코드베이스의 discussionId 타입 일관성과 맞춰져 적절합니다.frontend/apps/client/src/features/discussion/api/index.ts (3)
7-14: import 구문 정리가 적절합니다.
DiscussionConfirmResponse를 별도의 import 구문으로 분리한 것이 코드 가독성을 향상시킵니다.
67-67: 파싱 메서드 호출이 올바르게 수정되었습니다.이전의
response.parse(response)는 잘못된 호출이었습니다.DiscussionConfirmResponse.parse(response)로 수정하여 Zod 스키마를 사용한 올바른 응답 파싱이 가능합니다.
72-72: 파싱 메서드 호출이 올바르게 수정되었습니다.
DiscussionConfirmResponse.parse(response)를 사용하여 API 응답을 올바르게 파싱하도록 수정되었습니다.frontend/apps/client/src/features/discussion/api/mutations.ts (1)
33-33: mutation 파라미터 타입이 올바르게 업데이트되었습니다.
discussionId의 타입을number로 변경한 것이invitationApi.postInviatationJoin함수의 예상 파라미터 타입과 일치하여 적절합니다.frontend/apps/client/src/pages/MyCalendarPage/DiscussionContext.ts (1)
6-7: 타입 변경이 올바르게 적용되었습니다.논의 ID를 문자열에서 숫자로 되돌리는 변경사항이 인터페이스에 정확히 반영되었습니다. nullable 타입도 적절히 유지되었습니다.
frontend/apps/client/src/features/discussion/api/invitationApi.ts (2)
6-6: API 메서드 매개변수 타입이 올바르게 변경되었습니다.
getInvitationInfo메서드의discussionId매개변수가number타입으로 정확히 변경되었습니다.
11-11: API 메서드 매개변수 타입이 올바르게 변경되었습니다.
postInviatationJoin메서드의discussionId매개변수가number타입으로 정확히 변경되었습니다. 템플릿 리터럴에서 숫자가 자동으로 문자열로 변환되므로 URL 구성에 문제가 없습니다.frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/index.tsx (2)
15-15: 컴포넌트 props 타입이 올바르게 업데이트되었습니다.
DiscussionInviteCardProps인터페이스의discussionId속성이number타입으로 정확히 변경되었습니다.
64-64: 푸터 컴포넌트 props 타입이 일관되게 업데이트되었습니다.
DiscussionInviteCardFooterProps인터페이스의discussionId속성도number타입으로 일관되게 변경되어 타입 안전성이 유지됩니다.frontend/apps/client/src/features/discussion/model/index.ts (2)
40-40: 응답 스키마의 ID 타입이 올바르게 변경되었습니다.
DiscussionResponse스키마의id필드가z.number()로 정확히 업데이트되어 숫자형 논의 ID 검증이 가능합니다.
80-81: 확인 응답 스키마가 적절히 업데이트되었습니다.
DiscussionConfirmResponse스키마가 내보내기로 변경되어 재사용성이 향상되었고,discussionId필드도z.number()로 일관되게 변경되었습니다.
Reverts #365
Summary by CodeRabbit
Bug Fixes
Chores
Tests
Refactor