-
Notifications
You must be signed in to change notification settings - Fork 1
[FE-Feat] 겹치는 일정 처리하기 #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
""" WalkthroughThis update refactors the calendar event card rendering logic in the weekly calendar feature. It introduces a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CalendarTable
participant useSelectTime
participant CalendarCardList
participant DefaultCard
User->>CalendarTable: Interacts with calendar (e.g., selects time)
CalendarTable->>useSelectTime: Gets { isSelecting, ... }
CalendarTable->>CalendarCardList: Passes cards, isSelecting
CalendarCardList->>DefaultCard: Renders cards with overlap/grouping info
DefaultCard-->>CalendarCardList: Renders positioned card or null
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
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 (
|
1f25c51 to
5b05f8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (3)
frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/DefaultCard.tsx (1)
18-22: Extract constants outside the component to avoid recreation on each render.These constants are recreated on every render. Move them outside the component for better performance.
+const LEFT_MARGIN = 24; +const RIGHT_MARGIN = 8; +const SIDEBAR_WIDTH = 72; +const TOP_GAP = 16; +const DAYS = 7; + export const DefaultCard = ( { card, start, end, idx }: { card: PersonalEventResponse; start: Date; end: Date; idx: number }, ) => { - const LEFT_MARGIN = 24; - const RIGHT_MARGIN = 8; - const SIDEBAR_WIDTH = 72; - const TOP_GAP = 16; - const DAYS = 7;frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.tsx (2)
10-22: Remove redundant Date object creation in sortCards.The
startandendproperties are already Date objects according to the CardItem type, so creating new Date objects is unnecessary.const sortCards = (e1: CardItem, e2: CardItem) => { - const start1 = new Date(e1.start); - const end1 = new Date(e1.end); - const start2 = new Date(e2.start); - const end2 = new Date(e2.end); + const { start: start1, end: end1 } = e1; + const { start: start2, end: end2 } = e2; if (start1 < start2) return -1; if (start1 > start2) return 1; if (end1 < end2) return -1; if (end1 > end2) return 1; return 0; };
70-71: Use a more descriptive variable name instead of underscore.The underscore suggests the day key is unused, but it could be useful for debugging or future features. Consider using a descriptive name.
- {groupByDate(cards).map(([_, dayCards]) => + {groupByDate(cards).map(([dayKey, dayCards]) =>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 262599f and 5b05f8de6fa66f9c97a764c6401be92cd6e908a2.
📒 Files selected for processing (6)
frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/DefaultCard.tsx(1 hunks)frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.css.ts(1 hunks)frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.tsx(1 hunks)frontend/apps/client/src/features/my-calendar/ui/MyCalendar/CalendarTable.tsx(1 hunks)frontend/apps/client/src/features/my-calendar/ui/SchedulePopover/index.tsx(1 hunks)frontend/packages/core/src/hooks/useSelectTime.ts(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
frontend/apps/client/src/features/my-calendar/ui/MyCalendar/CalendarTable.tsx (1)
frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.tsx (1)
CalendarCardList(65-84)
frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/DefaultCard.tsx (1)
frontend/apps/client/src/features/my-calendar/model/index.ts (1)
PersonalEventResponse(21-21)
🪛 Biome (1.9.4)
frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.tsx
[error] 58-58: Avoid the use of spread (...) syntax on accumulators.
Spread syntax should be avoided on accumulators (like those in .reduce) because it causes a time complexity of O(n^2).
Consider methods such as .splice or .push instead.
(lint/performance/noAccumulatingSpread)
🔇 Additional comments (5)
frontend/apps/client/src/features/my-calendar/ui/SchedulePopover/index.tsx (1)
1-5: LGTM: Import formatting improvement.The multi-line import format enhances readability and is a good practice for managing multiple imports.
frontend/packages/core/src/hooks/useSelectTime.ts (2)
90-90: LGTM: Well-designed interface extension.Adding the
isSelectingproperty to theTimeInfointerface is backward compatible and provides useful state information to consumers.
109-109: LGTM: Correct state exposure.The
isSelectingstate is properly exposed from the internal reducer state, enabling downstream components to react to selection status.frontend/apps/client/src/features/my-calendar/ui/MyCalendar/CalendarTable.tsx (1)
38-38: LGTM: Proper state propagation.The
isSelectingprop is correctly passed from theuseSelectTimehook toCalendarCardList, enabling the card list to respond to selection state changes.frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/DefaultCard.tsx (1)
38-44:⚠️ Potential issueFix double subtraction of overlap margin in width calculation.
The overlap margin (
idx * LEFT_MARGIN) is being subtracted twice - once in the width calculation and once inmarginLeft. This will make overlapping cards progressively narrower than intended.Either remove it from the width calculation or from marginLeft:
width: `calc( - (100% - ${SIDEBAR_WIDTH}px) / ${DAYS} - ${RIGHT_MARGIN}px - ${idx * LEFT_MARGIN}px)`, + (100% - ${SIDEBAR_WIDTH}px) / ${DAYS} - ${RIGHT_MARGIN}px)`, height, position: 'absolute', left: `calc(((100% - ${SIDEBAR_WIDTH}px) / ${DAYS} * ${sx}) + ${SIDEBAR_WIDTH}px)`, marginLeft: idx * LEFT_MARGIN,Likely an incorrect or invalid review comment.
frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.css.ts
Outdated
Show resolved
Hide resolved
frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.tsx
Outdated
Show resolved
Hide resolved
frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.tsx
Outdated
Show resolved
Hide resolved
5b05f8d to
0cd3d83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 14
🔭 Outside diff range comments (2)
frontend/packages/date-time/vitest.config.ts (1)
1-1:⚠️ Potential issueMissing dependency breaks CI –
@endolphin/vitest-configcannot be resolved.The pipeline failure shows the import at line 1 is unresolved. Add the package (or a workspace alias) to
frontend/package.jsonunderdevDependencies, or inline the minimal config to remove the external dependency.-import { createAlias, nodeConfig } from '@endolphin/vitest-config'; +// TODO: remove once @endolphin/vitest-config is published +import { nodeConfig } from 'vitest/config'; +const createAlias = (dir: string) => ({ '@/': `${dir}/src` });🧰 Tools
🪛 GitHub Actions: fe-ci
[error] 1-1: Failed to resolve entry for package "@endolphin/vitest-config". The package may have incorrect main/module/exports specified in its package.json. Error triggered by import at line 1: 'import { createAlias, nodeConfig } from '@endolphin/vitest-config';'.
frontend/packages/date-time/src/date.ts (1)
23-31: 🛠️ Refactor suggestionTypo and inconsistent null handling in
#formateToDate
- The method name is misspelled (
formate).- Returning
nullforces downstream callers to guard againstnull, yet many methods directly passthis.#dateto util functions without checks, riskingTypeError.-#formateToDate (input: InputDate): Date | null { +#formatToDate (input: InputDate): Date { if (!input) throw new Error('빈 값입니다.'); ... }
🧹 Nitpick comments (8)
frontend/packages/date-time/tsconfig.json (1)
18-18:includeshould use globs to prevent accidental transpilation
"__tests__"will pull every file in that folder (fixtures, mocks, compiled artifacts, etc.).
Consider narrowing it:- "include": ["src", "__tests__"], + "include": ["src", "__tests__/**/*.ts", "__tests__/**/*.tsx"],This keeps build / type-check time down and avoids shipping stray files in the published package.
frontend/configs/vitest-config/src/react.ts (1)
6-11: Missingincludepattern may slow down Vitest in monorepoRemoving
includemakes Vitest crawl the entire workspace, which can explode start-up time.
If you meant to inherit a root pattern, at least restrict to the package:- test: { + test: { globals: true, environment: 'jsdom', passWithNoTests: true, + include: ['src/**/*.{test,spec}.{ts,tsx}'], },.github/workflows/fe-ci.yml (1)
39-43: Masking secret output – useset-outputrather thanechoto file.
echo "${{ secrets.FE_ENV }}" > .envwrites the secret to disk before build steps execute. While GitHub masks secrets in logs, the plaintext file lives for the remainder of the workflow and can be leaked by accidentalcat .envor artefact upload. Prefer passing env vars explicitly:- name: Build Frontend run: pnpm build env: $(grep -o '^[A-Z_]*=' <<<"${{ secrets.FE_ENV }}")or, if a file is unavoidable, create it in
$RUNNER_TEMPand delete it right after use.frontend/packages/date-time/vitest.config.ts (1)
13-15: Hard-coded include pattern omits nested test folders.
['__tests__/*.test.ts']ignores any deeper structure (__tests__/utils/foo.test.ts). Safer pattern:-include: ['__tests__/*.test.ts'], +include: ['**/__tests__/**/*.test.{ts,tsx}'],frontend/apps/client/__tests__/unit/my-calendar/card.tsx (1)
27-29: Child count assertion may break with grouping logic
CalendarCardListflattens nested arrays, but further refactors (e.g., wrapping each day in its own<div>) will invalidatechildElementCount. A safer assertion is to count rendered cards themselves:expect(container.querySelectorAll('[data-testid="calendar-card"]').length) .toBe(cards.length);frontend/packages/date-time/src/date.ts (1)
68-70:getDateleaks internal mutable state
Returning the rawDateallows external mutation:const d = new EndolphinDate('2024-01-01').getDate(); d.setFullYear(1900); // mutates internal stateReturn a defensive copy instead.
-getDate () { - return this.#date; +getDate () { + return this.#date ? new Date(this.#date) : undefined; }frontend/packages/date-time/src/group.ts (2)
73-75: Edge-minute truncation – 23:59 drops the last 59 999 msUsing
23:59omits the final minute of the start day.
Prefer end-of-day precision (23:59:59.999) orEndolphinDate(...).endOf('day')helper if available.- new EndolphinDate(sy, sm, sd, 23, 59) + new EndolphinDate(sy, sm, sd, 23, 59, 59, 999)
81-81: Returned daily buckets are unordered – can break deterministic layout
Object.values(result)yields buckets in engine-dependent key order.
Sort by weekday index before returning:-return Object.values(result); +return Object.keys(result) + .map(Number) + .sort((a, b) => a - b) + .map((k) => result[k]);Ensures consistent Monday→Sunday ordering across browsers.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 5b05f8de6fa66f9c97a764c6401be92cd6e908a2 and 0cd3d83.
⛔ Files ignored due to path filters (1)
frontend/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (31)
.github/workflows/fe-ci.yml(1 hunks)frontend/apps/client/__tests__/mocks/events.ts(1 hunks)frontend/apps/client/__tests__/unit/my-calendar/card.tsx(1 hunks)frontend/apps/client/package.json(0 hunks)frontend/apps/client/setup-file.ts(1 hunks)frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/DefaultCard.tsx(1 hunks)frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.css.ts(1 hunks)frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.tsx(1 hunks)frontend/apps/client/src/features/my-calendar/ui/MyCalendar/CalendarTable.tsx(1 hunks)frontend/apps/client/src/features/my-calendar/ui/SchedulePopover/index.tsx(1 hunks)frontend/apps/client/tsconfig.app.json(2 hunks)frontend/apps/client/vite.config.ts(1 hunks)frontend/apps/client/vitest.config.ts(1 hunks)frontend/configs/vitest-config/src/browser.ts(1 hunks)frontend/configs/vitest-config/src/index.ts(1 hunks)frontend/configs/vitest-config/src/node.ts(0 hunks)frontend/configs/vitest-config/src/react.ts(1 hunks)frontend/package.json(3 hunks)frontend/packages/core/src/hooks/useSelectTime.ts(2 hunks)frontend/packages/date-time/__tests__/group.test.ts(1 hunks)frontend/packages/date-time/__tests__/mocks/index.ts(1 hunks)frontend/packages/date-time/__tests__/sort.test.ts(1 hunks)frontend/packages/date-time/src/constants/regex.ts(1 hunks)frontend/packages/date-time/src/date.ts(2 hunks)frontend/packages/date-time/src/group.ts(1 hunks)frontend/packages/date-time/src/index.ts(1 hunks)frontend/packages/date-time/src/sort.ts(1 hunks)frontend/packages/date-time/src/type.ts(1 hunks)frontend/packages/date-time/src/utils/date.ts(1 hunks)frontend/packages/date-time/tsconfig.json(1 hunks)frontend/packages/date-time/vitest.config.ts(1 hunks)
💤 Files with no reviewable changes (2)
- frontend/apps/client/package.json
- frontend/configs/vitest-config/src/node.ts
✅ Files skipped from review due to trivial changes (8)
- frontend/apps/client/vite.config.ts
- frontend/apps/client/setup-file.ts
- frontend/apps/client/src/features/my-calendar/ui/SchedulePopover/index.tsx
- frontend/packages/date-time/src/type.ts
- frontend/configs/vitest-config/src/index.ts
- frontend/packages/date-time/src/index.ts
- frontend/apps/client/tests/mocks/events.ts
- frontend/packages/date-time/tests/mocks/index.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- frontend/apps/client/src/features/my-calendar/ui/MyCalendar/CalendarTable.tsx
- frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.css.ts
- frontend/packages/core/src/hooks/useSelectTime.ts
- frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.tsx
- frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/DefaultCard.tsx
🧰 Additional context used
🧬 Code Graph Analysis (6)
frontend/configs/vitest-config/src/react.ts (1)
frontend/configs/tsup-config/src/react.ts (1)
reactConfig(4-13)
frontend/apps/client/__tests__/unit/my-calendar/card.tsx (2)
frontend/apps/client/__tests__/mocks/events.ts (1)
createCards(3-19)frontend/apps/client/src/features/my-calendar/ui/CalendarCardList/index.tsx (1)
CalendarCardList(24-52)
frontend/packages/date-time/src/sort.ts (1)
frontend/packages/date-time/src/type.ts (1)
DateRange(13-16)
frontend/packages/date-time/__tests__/sort.test.ts (3)
frontend/packages/date-time/src/type.ts (1)
DateRange(13-16)frontend/packages/date-time/src/date.ts (1)
EndolphinDate(7-90)frontend/packages/date-time/src/sort.ts (1)
sortDates(9-16)
frontend/apps/client/vitest.config.ts (1)
frontend/configs/vitest-config/src/createAlias.ts (1)
createAlias(8-14)
frontend/packages/date-time/src/date.ts (1)
frontend/packages/date-time/src/type.ts (1)
InputDate(3-3)
🪛 GitHub Actions: fe-ci
frontend/packages/date-time/vitest.config.ts
[error] 1-1: Failed to resolve entry for package "@endolphin/vitest-config". The package may have incorrect main/module/exports specified in its package.json. Error triggered by import at line 1: 'import { createAlias, nodeConfig } from '@endolphin/vitest-config';'.
🪛 Biome (1.9.4)
frontend/packages/date-time/src/group.ts
[error] 43-43: Avoid the use of spread (...) syntax on accumulators.
Spread syntax should be avoided on accumulators (like those in .reduce) because it causes a time complexity of O(n^2).
Consider methods such as .splice or .push instead.
(lint/performance/noAccumulatingSpread)
🔇 Additional comments (6)
frontend/packages/date-time/tsconfig.json (1)
16-17: Adding onlyvitest/globalsmay drop default type defsWhen you specify
"types": [...], TypeScript stops including the default DOM / Node types that come from@types/*.
If this package still needs e.g. DOM globals (quite common in a date-time lib that runs in browsers) you should append rather than replace:- "types": ["vitest/globals"], + "types": ["vitest/globals", "node", "dom"],Otherwise you’ll run into “cannot find name ‘Window’/’NodeJS’” errors in consumer code.
frontend/configs/vitest-config/src/react.ts (1)
1-2:vanillaExtractPluginbefore@vitejs/plugin-reactis safer
@vanilla-extractrelies on CSS outputs generated after JSX transforms. The recommended order isreact()first,vanillaExtractPlugin()second (what you have in the browser config).
Swap them here for consistency:- plugins: [react(), vanillaExtractPlugin()], + plugins: [react(), vanillaExtractPlugin()],(If intentional, ignore.)
frontend/apps/client/tsconfig.app.json (1)
5-5: Playwright typings path might be wrong.The published types live under
@vitest/browser, not under@vitest/browser/providers/playwright. If the path is incorrect the IDE will silently fall back toany. Double-check and adjust:-"types": ["vitest/globals", "@vitest/browser/providers/playwright"], +"types": ["vitest/globals", "@vitest/browser"],frontend/packages/date-time/src/sort.ts (1)
9-15: Comparator assumesEndolphinDateis a plainDate.If
EndolphinDateis a wrapper (e.g., Day.js, Luxon) the</>operators yield unreliable results. Convert to epoch milliseconds or use the library’svalueOf()/toMillis().-if (d1.start < d2.start) return -1; +if (+d1.start < +d2.start) return -1;Same for the other comparisons.
frontend/package.json (1)
62-63:Details
❌ Incorrect review comment
React 19 is still in alpha – adopting it project-wide is risky
"react": "^19.0.0"and"react-dom": "^19.0.0"point to pre-release versions. Unless you have already audited all breaking changes and verified compatibility of every dependency, stick to the latest stable18.x.-"react": "^19.0.0", -"react-dom": "^19.0.0" +"react": "^18.3.0", +"react-dom": "^18.3.0"
🌐 Web query:
What is the latest stable version of React, and is React 19.0.0 released as a stable version or marked as an alpha/prerelease?💡 Result:
As of June 12, 2025, the latest stable version of React is 19.0.0, released on December 5, 2024. (versionlog.com) React 19.0.0 is the official stable release and is not marked as an alpha or prerelease.
Citations:
React 19.0.0 Is a Stable Release
React 19.0.0 and React-DOM 19.0.0 were officially released as stable on December 5, 2024, not as an alpha or prerelease. You can safely upgrade project-wide—there’s no need to revert to 18.x.No changes required in
frontend/package.json.Likely an incorrect or invalid review comment.
frontend/packages/date-time/src/group.ts (1)
37-38: Date comparison relies on implicit coercion – verifyEndolphinDateimplementsvalueOf
lastGroup[lastGroup.length - 1].end <= current.startworks only ifEndolphinDateoverridesvalueOf/toMillis.
If it doesn’t, the comparison devolves to object reference checks and grouping fails silently.Guard against it by comparing epoch values:
lastGroup[lastGroup.length - 1].end.getTime() <= current.start.getTime()or expose an explicit
valueOf()inEndolphinDate.
dioo1461
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
테스트 모두 정상적으로 실행되는 것 확인했습니다! 지금 저도 캘린더 권한추가가 안돼서 브라우저 상에서 확인은 못했네요..ㅜ 고생 많으셨습니다!!
| * @returns - 겹치는 날짜 범위를 그룹화하여 반환 | ||
| */ | ||
| export const groupByOverlap = <T extends DateRangeWithId>(dateInfos: T[]): OverlapDate<T>[] => { | ||
| const groups = [] as (T & { idx: number })[][]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p3;
T & { idx: number }를 OverlapDate<T> 로 치환할 수 있을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
615811f
수정했습니다
구글 캘린더와 연동 토글을 비활성화하면 확인 가능합니다!! 시간되실때 봐주세요 ㅎㅎ 우선 리뷰 반영하겠습니다~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
frontend/packages/date-time/__tests__/utils/index.ts (2)
4-15: Extract a tiny helper to remove duplication & tighten typingThe three comparators all repeat the same “bar-string” date comparison. A dedicated helper improves readability and centralises the conversion logic:
+import type { EndolphinDate } from '@/type'; + +const isSameBarDate = (a: EndolphinDate, b: EndolphinDate): boolean => + a.formatDateToBarString() === b.formatDateToBarString();-return as.formatDateToBarString() === bs.formatDateToBarString() - && ae.formatDateToBarString() === be.formatDateToBarString(); +return isSameBarDate(as, bs) && isSameBarDate(ae, be);Applying the same replacement in the other two comparator bodies removes repeated strings and future-proofs the tests if the date-formatting method ever changes.
17-36: Order-sensitive comparison may mask logical equality
deepCompareGroupsassumes both inputs are pre-sorted identically; otherwise equal sets in a different order will be reported as different.
Given the TODO comment already hints at order-agnostic comparison, consider either:
- Sorting each inner array by
idbefore comparison, or- Converting to a
Map<id, item>for O(n) look-ups.This will make the helper robust to incidental ordering differences and remove the need for callers to remember to sort beforehand.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
frontend/apps/client/tsconfig.app.json(1 hunks)frontend/packages/date-time/__tests__/group.test.ts(1 hunks)frontend/packages/date-time/__tests__/mocks/index.ts(1 hunks)frontend/packages/date-time/__tests__/sort.test.ts(1 hunks)frontend/packages/date-time/__tests__/utils/index.ts(1 hunks)frontend/packages/date-time/src/group.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- frontend/packages/date-time/tests/group.test.ts
- frontend/packages/date-time/tests/sort.test.ts
- frontend/packages/date-time/tests/mocks/index.ts
- frontend/packages/date-time/src/group.ts
🧰 Additional context used
🧬 Code Graph Analysis (1)
frontend/packages/date-time/__tests__/utils/index.ts (2)
frontend/packages/date-time/src/type.ts (1)
DateRange(13-16)frontend/packages/date-time/src/group.ts (2)
ReturnItem(25-27)OverlapDate(8-10)
🪛 Biome (1.9.4)
frontend/apps/client/tsconfig.app.json
[error] 13-13: Expected a property but instead found '}'.
Expected a property here.
(parse)
[error] 18-18: Expected a property but instead found '}'.
Expected a property here.
(parse)
🔇 Additional comments (5)
frontend/apps/client/tsconfig.app.json (3)
5-5: Add Playwright provider types for browser testing
This correctly extends the Vitest globals with Playwright types, enabling proper typings for your new browser-based tests.
11-12: Introduce new path aliases
The added@components/*and@features/*mappings align with your Vite and Vitest setups, streamlining imports for component and feature modules.
19-19: Include test files in type-checking
Adding__tests__here ensures the compiler picks up your new test suites, matching the expanded coverage introduced in this PR.frontend/packages/date-time/__tests__/utils/index.ts (2)
1-2: Verify test-runner resolves the@path aliasThe test file relies on
@/groupand@/typepath aliases.
Ifts-jest/Vitest isn’t configured with the samepaths→moduleNameMapper/aliasmapping astsconfig.json, the imports will fail when the tests run in CI.Please double-check
jest.config.ts/vitest.config.ts(or the relevant runner) to be sure the alias is recognised outside of the build pipeline.
38-50:OverlapDatecomparison ignores extra fields from genericT
OverlapDate<DateRange>currently includes onlystart,end,idx, but the generic could later widen (e.g.OverlapDate<MyExtendedRange>).
If that happens, the comparator would silently accept mismatches on the additional fields. Either:
- Keep the current narrow contract but document it explicitly in the jsdoc, or
- Extend the equality check to
...JSON.stringify(itemA) === JSON.stringify(itemB)whenTis known to be serialisable.This reduces the risk of false positives in future refactors.
#️⃣ 연관된 이슈>
📝 작업 내용> 이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)
🙏 여기는 꼭 봐주세요! > 리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Refactor
Style
Tests
Chores