Conversation
|
Warning
|
| Cohort / File(s) | Summary |
|---|---|
Testing Infrastructure Configuration package.json, vite.config.ts, vitest.shims.d.ts, storybook/main.ts, tsconfig.app.json |
Added Vitest setup with unit and Storybook test projects, Playwright-based browser testing, and coverage reporting. Integrated Storybook addon-vitest and updated TypeScript compiler configuration to include Vitest type declarations. |
Date Utilities Test Suite src/features/home/user/lib/date.test.ts |
New comprehensive test file (177 lines) validating date/time utility functions including date key generation, time labels, duration calculations, monthly/weekly grid generation, event aggregation, week range labeling, hourly ticks, and date navigation across modes. |
Calendar Feature Updates src/features/home/user/constants/calendar.ts, src/features/home/user/hooks/useMonthlyCalendarViewModel.ts, src/features/home/user/types/monthlyCalendar.ts, src/features/home/user/ui/MonthlyCalendar.tsx |
Introduced WEEKDAY_LABELS_MONDAY_FIRST constant and cascaded Monday-start week configuration through the calendar view model chain. Updated red text coloring in MonthlyCalendar to apply to Saturday/Sunday (indices 5–6) instead of Sunday/Saturday (indices 0–6). |
Project Configuration .gitignore, .coderabbit.yaml |
Added coverage to ignore list to exclude test artifacts. Extended CodeRabbit auto-review to include dev branch alongside main and develop. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~30 minutes
Possibly related PRs
- [chore] Storybook 라이브러리 설정 #8 — Updates Storybook configuration; the retrieved PR establishes initial Storybook setup while this PR adds the Vitest addon to the same configuration file.
- [feat] 알바생, 사장님 홈 컴포넌트 구현 #9 — Introduces the home/user calendar and date utilities; this PR adds comprehensive tests for those utilities and modifies Monday-first weekday ordering in the calendar components introduced there.
Suggested reviewers
- kim3360
- limtjdghks
Poem
🐰 Hoppy tests hop through the date,
Monday-first, our schedules await,
Coverage gathered, colors aligned,
Vitest woven through our code so fine! ✨
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description check | ✅ Passed | The PR description comprehensively covers all template sections: ID (ALT-167), detailed changes summary, complete implementation details with subsections, demonstration screenshots, and reference notes. |
| Title check | ✅ Passed | The title '[chore] Vitest 설정' directly and clearly summarizes the main change—configuring Vitest for testing. It accurately reflects the primary objective of the PR. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
feat/ALT-167
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 12
♻️ Duplicate comments (7)
coverage/Code/alter-client/src/shared/ui/manager/social/SocialCategory.tsx.html (1)
1-142:⚠️ Potential issue | 🔴 CriticalDo not commit generated coverage HTML reports to the repository.
Coverage HTML artifacts should be excluded from version control and generated as part of your CI/CD pipeline instead.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/shared/ui/manager/social/SocialCategory.tsx.html` around lines 1 - 142, Remove the generated coverage HTML (e.g., SocialCategory.tsx.html) from the repo, add a rule to .gitignore to prevent committing coverage HTML reports, and run git rm --cached for the already committed file(s) so they are removed from version control; optionally update CI/pipeline to generate coverage HTML artifacts as part of the build instead of storing them in the repository.coverage/Code/alter-client/src/features/home/user/ui/DailyCalendar.tsx.html (1)
1-370:⚠️ Potential issue | 🔴 CriticalDo not commit generated coverage HTML reports to the repository.
Coverage HTML artifacts should be excluded from version control and generated as part of your CI/CD pipeline instead.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/features/home/user/ui/DailyCalendar.tsx.html` around lines 1 - 370, The PR accidentally committed a generated coverage HTML (DailyCalendar.tsx.html); remove this generated file from the repo, add a rule to .gitignore for coverage HTML (e.g., *.html under coverage/ or the specific coverage/Code/** path) so future artifacts like coverage/Code/alter-client/src/features/home/user/ui/DailyCalendar.tsx.html are not tracked, and ensure your CI job produces and uploads coverage HTML as an artifact rather than committing it (update the pipeline config used in this repo accordingly).coverage/Code/alter-client/src/features/home/manager/ui/TodayWorkerList.tsx.html (1)
1-253:⚠️ Potential issue | 🔴 CriticalDo not commit generated coverage HTML reports to the repository.
Coverage HTML artifacts should be excluded from version control and generated as part of your CI/CD pipeline instead.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/features/home/manager/ui/TodayWorkerList.tsx.html` around lines 1 - 253, Remove the generated coverage HTML from the commit (the coverage HTML for TodayWorkerList.tsx) and stop committing coverage artifacts: delete the coverage HTML file from the PR, add an appropriate gitignore entry to exclude generated coverage reports/artifacts (coverage HTML files or the coverage/ directory), and ensure CI is configured to generate/upload coverage in the pipeline rather than storing HTML in the repo; use the TodayWorkerList, TodayWorkerCard, and TodayWorkerItem symbols to locate the related source file if needed.coverage/Code/alter-client/src/shared/ui/home/ApplicationStatusBadge.tsx.html (1)
1-193:⚠️ Potential issue | 🔴 CriticalDo not commit generated coverage HTML reports to the repository.
Coverage HTML artifacts should be excluded from version control and generated as part of your CI/CD pipeline instead.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/shared/ui/home/ApplicationStatusBadge.tsx.html` around lines 1 - 193, This is a generated coverage HTML report (coverage/Code/alter-client/src/shared/ui/home/ApplicationStatusBadge.tsx.html) that should not be committed; remove this file from the PR, add the coverage output path (e.g. coverage/ or coverage/**/*.html) to .gitignore, and ensure your CI generates coverage artifacts instead of committing them; the related source symbol is ApplicationStatusBadge.tsx (component) so you can keep that file but drop the generated coverage HTML.coverage/Code/alter-client/src/features/home/user/ui/AppliedStoreCard.tsx.html (1)
1-196:⚠️ Potential issue | 🔴 CriticalDo not commit generated coverage HTML reports to the repository.
Coverage HTML artifacts should be excluded from version control and generated as part of your CI/CD pipeline instead.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/features/home/user/ui/AppliedStoreCard.tsx.html` around lines 1 - 196, The committed coverage HTML report (AppliedStoreCard.tsx.html) is a generated artifact and must be removed from version control; remove the file from the repo (using git rm or git rm --cached so history stops tracking it), add the appropriate coverage patterns (e.g., coverage/ or **/coverage/*.html) to .gitignore to prevent future commits, commit that change, and ensure your CI pipeline generates and publishes the coverage HTML instead of committing it to the repository.coverage/Code/alter-client/src/features/home/user/hooks/useDailyCalendarViewModel.ts.html (1)
1-394:⚠️ Potential issue | 🔴 CriticalDo not commit generated coverage HTML reports to the repository.
Coverage HTML artifacts should be excluded from version control and generated as part of your CI/CD pipeline instead.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/features/home/user/hooks/useDailyCalendarViewModel.ts.html` around lines 1 - 394, This HTML coverage report (useDailyCalendarViewModel.ts.html) is a generated artifact and should be removed from the repo: delete the committed file, run git rm --cached if needed to stop tracking, and add a rule (e.g., coverage/ or **/*.html under coverage/) to .gitignore so future HTML reports aren’t committed; also ensure CI produces coverage HTML on demand rather than committing it (update CI job that runs coverage if necessary).coverage/Code/alter-client/src/features/home/user/constants/calendar.ts.html (1)
1-154:⚠️ Potential issue | 🔴 CriticalDo not commit generated coverage HTML reports to the repository.
Coverage HTML artifacts should be excluded from version control and generated as part of your CI/CD pipeline instead.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/features/home/user/constants/calendar.ts.html` around lines 1 - 154, Remove the generated coverage HTML (the calendar.ts.html artifact that contains symbols like WEEKDAY_LABELS, DATE_KEY_FORMAT and DAILY_STATUS_STYLE_MAP) from the commit/branch, add the appropriate coverage output patterns (e.g., the coverage directory and generated HTML reports) to .gitignore so these HTML artifacts are not tracked, and ensure coverage HTML is produced only by the CI/CD pipeline (update CI job to run the coverage reporter if not already).
🧹 Nitpick comments (4)
coverage/Code/alter-client/src/features/home/user/lib/date.ts.html (2)
359-360: Note: This file usesweekStartsOn: 1(Monday).This is the source of the inconsistency flagged earlier. If Sunday-start weeks are needed for
useMonthlyCalendarViewModel, consider whethergetMonthlyDateCellsfrom this module can be reused with a configurableweekStartsOnparameter to avoid duplicate logic.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/features/home/user/lib/date.ts.html` around lines 359 - 360, The code uses hardcoded weekStartsOn: 1 (Monday) when computing intervalStart/intervalEnd with startOfWeek/endOfWeek, causing inconsistency with consumers that expect Sunday-start weeks (e.g., useMonthlyCalendarViewModel); refactor getMonthlyDateCells to accept a weekStartsOn parameter (defaulting to 1 for current behavior) and update callers (including useMonthlyCalendarViewModel) to pass the desired weekStartsOn value so the same logic is reused instead of duplicating week-start handling.
1-469: Coverage report file - same recommendation as above.This file should also be excluded from version control. The 100% coverage achieved for
date.tsis excellent and validates the comprehensive test suite indate.test.ts.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/features/home/user/lib/date.ts.html` around lines 1 - 469, The coverage HTML (coverage/Code/alter-client/src/features/home/user/lib/date.ts.html) was accidentally committed and should be excluded from VCS; remove the file from the repo and add an appropriate ignore rule (e.g., a coverage/**/*.html or the specific path) to .gitignore so generated coverage artifacts like this one aren't tracked; reference the generated file name "date.ts.html" (and related coverage outputs) when updating .gitignore and remove the committed file with git rm --cached so future coverage reports (for date.ts / date.test.ts) remain untracked.src/features/home/user/lib/date.test.ts (1)
144-148: Consider asserting specific dates for the weekly mode test.Unlike the
monthlyanddailymode tests which assert exact date values, theweeklytest only validates the format. For April 15, 2026 (Wednesday), the expected Monday-start week would be2026-04-13to2026-04-19.💡 Suggested stronger assertion
it('weekly이면 해당 주 월요일~일요일이다', () => { - const { startDate, endDate } = getRangeParamsByMode(base, 'weekly') - expect(startDate <= endDate).toBe(true) - expect(startDate).toMatch(/^\d{4}-\d{2}-\d{2}$/) + expect(getRangeParamsByMode(base, 'weekly')).toEqual({ + startDate: '2026-04-13', + endDate: '2026-04-19', + }) })🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/features/home/user/lib/date.test.ts` around lines 144 - 148, The weekly test currently only checks format; update the test using getRangeParamsByMode with the base date (2026-04-15) to assert exact expected week bounds: expect startDate === '2026-04-13' and expect endDate === '2026-04-19' (i.e., Monday through Sunday for that week) instead of just format/ordering checks.coverage/Code/alter-client/src/features/home/user/hooks/useMonthlyCalendarViewModel.ts.html (1)
1-502: Coverage HTML reports should not be committed to version control.Generated coverage reports are build artifacts that:
- Bloat the repository with regenerated files on every test run
- Create noisy diffs unrelated to actual code changes
- Can be regenerated on demand via
test:coveragescriptsAdd the
coverage/directory to.gitignoreand remove these files from the repository.🗑️ Suggested .gitignore addition
+# Test coverage reports +coverage/🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@coverage/Code/alter-client/src/features/home/user/hooks/useMonthlyCalendarViewModel.ts.html` around lines 1 - 502, The repo contains generated coverage HTML (e.g. the file useMonthlyCalendarViewModel.ts.html under the coverage/ directory) which should not be committed; add "coverage/" to .gitignore, remove the currently tracked coverage files from git (e.g. git rm --cached <coverage files> and commit the removal), and push the commit so future coverage reports are not tracked; verify CI/test scripts still produce coverage artifacts on-demand (no code changes to functions like getMonthlyCells, getDayMetricsByDate, mergeMinuteRanges, or useMonthlyCalendarViewModel are required).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@coverage/clover.xml`:
- Around line 1-520: Remove the generated coverage report coverage/clover.xml
from the repo and stop committing coverage artifacts: add the coverage/
directory to .gitignore (so future clover.xml and other reports are ignored),
then remove the already committed files with git rm -r coverage/ and commit the
change (ensuring coverage/clover.xml is no longer tracked); keep CI configured
to generate/upload coverage reports instead of committing them.
In `@coverage/Code/alter-client.html`:
- Around line 114-138: The repository contains generated coverage artifacts
(e.g., coverage/Code/alter-client.html) with machine-specific paths and stack
traces; stop committing these by adding coverage/ to .gitignore, removing the
tracked coverage files (untrack the entire coverage/ directory from git history
with a git rm --cached -r on coverage and commit the removal), and re-running a
clean build to regenerate them locally/CI only; ensure no other generated
coverage files remain staged and update any CI artifacts configuration to
publish coverage without storing it in the repo.
In
`@coverage/Code/alter-client/src/features/home/user/hooks/useMonthlyCalendarViewModel.ts.html`:
- Around line 373-375: getMonthlyCells in useMonthlyCalendarViewModel.ts
currently uses weekStartsOn: 0 while getMonthlyDateCells in date.ts uses
weekStartsOn: 1, causing inconsistent weekly intervals; update getMonthlyCells
(or both) so they use the same weekStartsOn value—preferably align
getMonthlyCells to weekStartsOn: 1 to match the exported getMonthlyDateCells (or
extract a shared constant and use it in both places) so intervalStart/end
calculations are consistent across getMonthlyCells and getMonthlyDateCells.
In
`@coverage/Code/alter-client/src/features/home/user/ui/HomeScheduleCalendar.tsx.html`:
- Around line 2-243: Remove the generated coverage HTML artifact (e.g.,
HomeScheduleCalendar.tsx.html) from the repo and stop committing coverage/**:
add a rule "coverage/**" to .gitignore, remove the tracked coverage files with
git rm --cached (or delete them) and commit that change, and ensure CI publishes
coverage as an artifact instead of committing these outputs.
In `@coverage/Code/alter-client/src/features/home/user/ui/index.html`:
- Around line 1-251: This index.html is an auto-generated Istanbul coverage
artifact under the coverage/ directory and should not be committed; update your
.gitignore to include coverage/ (or coverage/**) so generated reports like this
index.html are ignored, then remove the tracked coverage files from git (e.g.,
git rm -r --cached coverage/ and commit the removal) and push the change so
future test runs don’t reintroduce these artifacts.
In
`@coverage/Code/alter-client/src/features/home/user/ui/MonthlyCalendar.tsx.html`:
- Around line 1-339: The repo has committed generated coverage artifacts (the
coverage/ directory including files like the MonthlyCalendar.tsx.html report);
update .gitignore to add an entry for coverage/ (and optionally /coverage/) and
then remove the tracked coverage files from git with git rm -r --cached
coverage/ followed by a commit; no source changes are needed in
MonthlyCalendar.tsx or related components—just ignore and untrack the coverage/
directory to prevent future commits of these generated artifacts.
In
`@coverage/Code/alter-client/src/features/home/user/ui/MonthlyDateGauge.tsx.html`:
- Around line 1-244: The coverage HTML artifacts under the coverage/ directory
were committed (e.g., the generated MonthlyDateGauge.tsx.html report); remove
the entire coverage/ directory from the repo history or delete it in the working
tree and add coverage/ to .gitignore to prevent future commits, then commit the
.gitignore change and (optionally) create a small follow-up commit or use git rm
--cached for already tracked files to stop tracking these generated reports.
In `@coverage/Code/alter-client/src/shared/lib/index.html`:
- Around line 1-116: The committed coverage HTML (e.g.,
coverage/Code/alter-client/src/shared/lib/index.html) are generated artifacts
and must be removed and ignored: add the top-level "coverage/" entry to
.gitignore and then remove the committed coverage files from the repo (e.g., run
git rm -r coverage/ and commit that removal) so future Istanbul/Vitest outputs
do not get checked into source control.
In `@coverage/Code/alter-client/src/shared/stores/useDocStore.ts.html`:
- Around line 1-214: Remove the committed coverage HTML artifacts (e.g.,
coverage/.../useDocStore.ts.html) from the repo and add the coverage/ directory
to .gitignore so generated reports are not tracked; update any commits to drop
the file (git rm --cached) and commit the .gitignore change. Also update CI
workflow(s) (e.g., .github/workflows/* or your pipeline config) to keep
generating coverage during test runs but upload HTML reports as build artifacts
or publish them to a coverage service (Codecov/Coveralls) or GitHub Pages
instead of committing the coverage/ directory.
In `@coverage/Code/alter-client/src/shared/ui/manager/index.html`:
- Around line 1-161: The PR accidentally commits generated coverage output
(coverage/Code/alter-client/src/shared/ui/manager/index.html and the surrounding
coverage/** files); remove those tracked artifacts and prevent re-adding them by
deleting the files from the repo (git rm --cached the coverage files or remove
them and commit), add the coverage/ path to .gitignore (or ensure the existing
ignore covers coverage/**), and re-run the commit so only source files
remain—look for the coverage/Code/alter-client/... index.html entry in the diff
to locate the offending files.
In `@vite.config.ts`:
- Around line 36-48: The coverage configuration is missing an include filter,
causing the coverage tool to scan unintended directories (leading to EISDIR on
coverage output); update the coverage block (the coverage object in
vite.config.ts) to add include: ['src/**/*.{ts,tsx}'] and also add 'coverage/**'
to the exclude array so the tool only processes source files and ignores its own
output.
In `@vitest.shims.d.ts`:
- Line 1: The project’s root-level vitest.shims.d.ts is not picked up because
tsconfig.app.json only includes "src"; update tsconfig.app.json to include
"vitest.shims.d.ts" in its "include" array or add a new tsconfig.test.json that
extends tsconfig.app.json and adds "vitest.shims.d.ts" to "include"; ensure your
test runner (Vitest) or npm test scripts reference the new tsconfig
(tsconfig.test.json) if you create it so TypeScript sees the vitest.shims.d.ts
types during test type-checking.
---
Duplicate comments:
In
`@coverage/Code/alter-client/src/features/home/manager/ui/TodayWorkerList.tsx.html`:
- Around line 1-253: Remove the generated coverage HTML from the commit (the
coverage HTML for TodayWorkerList.tsx) and stop committing coverage artifacts:
delete the coverage HTML file from the PR, add an appropriate gitignore entry to
exclude generated coverage reports/artifacts (coverage HTML files or the
coverage/ directory), and ensure CI is configured to generate/upload coverage in
the pipeline rather than storing HTML in the repo; use the TodayWorkerList,
TodayWorkerCard, and TodayWorkerItem symbols to locate the related source file
if needed.
In
`@coverage/Code/alter-client/src/features/home/user/constants/calendar.ts.html`:
- Around line 1-154: Remove the generated coverage HTML (the calendar.ts.html
artifact that contains symbols like WEEKDAY_LABELS, DATE_KEY_FORMAT and
DAILY_STATUS_STYLE_MAP) from the commit/branch, add the appropriate coverage
output patterns (e.g., the coverage directory and generated HTML reports) to
.gitignore so these HTML artifacts are not tracked, and ensure coverage HTML is
produced only by the CI/CD pipeline (update CI job to run the coverage reporter
if not already).
In
`@coverage/Code/alter-client/src/features/home/user/hooks/useDailyCalendarViewModel.ts.html`:
- Around line 1-394: This HTML coverage report
(useDailyCalendarViewModel.ts.html) is a generated artifact and should be
removed from the repo: delete the committed file, run git rm --cached if needed
to stop tracking, and add a rule (e.g., coverage/ or **/*.html under coverage/)
to .gitignore so future HTML reports aren’t committed; also ensure CI produces
coverage HTML on demand rather than committing it (update CI job that runs
coverage if necessary).
In
`@coverage/Code/alter-client/src/features/home/user/ui/AppliedStoreCard.tsx.html`:
- Around line 1-196: The committed coverage HTML report
(AppliedStoreCard.tsx.html) is a generated artifact and must be removed from
version control; remove the file from the repo (using git rm or git rm --cached
so history stops tracking it), add the appropriate coverage patterns (e.g.,
coverage/ or **/coverage/*.html) to .gitignore to prevent future commits, commit
that change, and ensure your CI pipeline generates and publishes the coverage
HTML instead of committing it to the repository.
In `@coverage/Code/alter-client/src/features/home/user/ui/DailyCalendar.tsx.html`:
- Around line 1-370: The PR accidentally committed a generated coverage HTML
(DailyCalendar.tsx.html); remove this generated file from the repo, add a rule
to .gitignore for coverage HTML (e.g., *.html under coverage/ or the specific
coverage/Code/** path) so future artifacts like
coverage/Code/alter-client/src/features/home/user/ui/DailyCalendar.tsx.html are
not tracked, and ensure your CI job produces and uploads coverage HTML as an
artifact rather than committing it (update the pipeline config used in this repo
accordingly).
In
`@coverage/Code/alter-client/src/shared/ui/home/ApplicationStatusBadge.tsx.html`:
- Around line 1-193: This is a generated coverage HTML report
(coverage/Code/alter-client/src/shared/ui/home/ApplicationStatusBadge.tsx.html)
that should not be committed; remove this file from the PR, add the coverage
output path (e.g. coverage/ or coverage/**/*.html) to .gitignore, and ensure
your CI generates coverage artifacts instead of committing them; the related
source symbol is ApplicationStatusBadge.tsx (component) so you can keep that
file but drop the generated coverage HTML.
In
`@coverage/Code/alter-client/src/shared/ui/manager/social/SocialCategory.tsx.html`:
- Around line 1-142: Remove the generated coverage HTML (e.g.,
SocialCategory.tsx.html) from the repo, add a rule to .gitignore to prevent
committing coverage HTML reports, and run git rm --cached for the already
committed file(s) so they are removed from version control; optionally update
CI/pipeline to generate coverage HTML artifacts as part of the build instead of
storing them in the repository.
---
Nitpick comments:
In
`@coverage/Code/alter-client/src/features/home/user/hooks/useMonthlyCalendarViewModel.ts.html`:
- Around line 1-502: The repo contains generated coverage HTML (e.g. the file
useMonthlyCalendarViewModel.ts.html under the coverage/ directory) which should
not be committed; add "coverage/" to .gitignore, remove the currently tracked
coverage files from git (e.g. git rm --cached <coverage files> and commit the
removal), and push the commit so future coverage reports are not tracked; verify
CI/test scripts still produce coverage artifacts on-demand (no code changes to
functions like getMonthlyCells, getDayMetricsByDate, mergeMinuteRanges, or
useMonthlyCalendarViewModel are required).
In `@coverage/Code/alter-client/src/features/home/user/lib/date.ts.html`:
- Around line 359-360: The code uses hardcoded weekStartsOn: 1 (Monday) when
computing intervalStart/intervalEnd with startOfWeek/endOfWeek, causing
inconsistency with consumers that expect Sunday-start weeks (e.g.,
useMonthlyCalendarViewModel); refactor getMonthlyDateCells to accept a
weekStartsOn parameter (defaulting to 1 for current behavior) and update callers
(including useMonthlyCalendarViewModel) to pass the desired weekStartsOn value
so the same logic is reused instead of duplicating week-start handling.
- Around line 1-469: The coverage HTML
(coverage/Code/alter-client/src/features/home/user/lib/date.ts.html) was
accidentally committed and should be excluded from VCS; remove the file from the
repo and add an appropriate ignore rule (e.g., a coverage/**/*.html or the
specific path) to .gitignore so generated coverage artifacts like this one
aren't tracked; reference the generated file name "date.ts.html" (and related
coverage outputs) when updating .gitignore and remove the committed file with
git rm --cached so future coverage reports (for date.ts / date.test.ts) remain
untracked.
In `@src/features/home/user/lib/date.test.ts`:
- Around line 144-148: The weekly test currently only checks format; update the
test using getRangeParamsByMode with the base date (2026-04-15) to assert exact
expected week bounds: expect startDate === '2026-04-13' and expect endDate ===
'2026-04-19' (i.e., Monday through Sunday for that week) instead of just
format/ordering checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 782fac50-c828-489e-98c8-e579d5072afd
⛔ Files ignored due to path filters (3)
coverage/favicon.pngis excluded by!**/*.pngcoverage/sort-arrow-sprite.pngis excluded by!**/*.pngpackage-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (69)
coverage/Code/alter-client.htmlcoverage/Code/alter-client/src/features/home/manager/ui/StoreWorkerListItem.tsx.htmlcoverage/Code/alter-client/src/features/home/manager/ui/TodayWorkerList.tsx.htmlcoverage/Code/alter-client/src/features/home/manager/ui/WorkspaceChangeCard.tsx.htmlcoverage/Code/alter-client/src/features/home/manager/ui/WorkspaceChangeList.tsx.htmlcoverage/Code/alter-client/src/features/home/manager/ui/index.htmlcoverage/Code/alter-client/src/features/home/user/constants/calendar.ts.htmlcoverage/Code/alter-client/src/features/home/user/constants/index.htmlcoverage/Code/alter-client/src/features/home/user/hooks/index.htmlcoverage/Code/alter-client/src/features/home/user/hooks/useDailyCalendarViewModel.ts.htmlcoverage/Code/alter-client/src/features/home/user/hooks/useMonthlyCalendarViewModel.ts.htmlcoverage/Code/alter-client/src/features/home/user/hooks/useMonthlyDateCellsState.ts.htmlcoverage/Code/alter-client/src/features/home/user/hooks/useWeeklyCalendarViewModel.ts.htmlcoverage/Code/alter-client/src/features/home/user/hooks/useWorkingStoreCardViewModel.ts.htmlcoverage/Code/alter-client/src/features/home/user/hooks/useWorkingStoresListViewModel.ts.htmlcoverage/Code/alter-client/src/features/home/user/lib/date.ts.htmlcoverage/Code/alter-client/src/features/home/user/lib/index.htmlcoverage/Code/alter-client/src/features/home/user/ui/AppliedStoreCard.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/AppliedStoreList.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/DailyCalendar.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/HomeScheduleCalendar.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/MonthlyCalendar.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/MonthlyDateCell.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/MonthlyDateGauge.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/WeeklyCalendar.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/WorkingStoreCard.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/WorkingStoresList.tsx.htmlcoverage/Code/alter-client/src/features/home/user/ui/index.htmlcoverage/Code/alter-client/src/shared/lib/index.htmlcoverage/Code/alter-client/src/shared/lib/tokens.ts.htmlcoverage/Code/alter-client/src/shared/stores/index.htmlcoverage/Code/alter-client/src/shared/stores/useDocStore.ts.htmlcoverage/Code/alter-client/src/shared/ui/MobileLayout.tsx.htmlcoverage/Code/alter-client/src/shared/ui/Spinner.tsx.htmlcoverage/Code/alter-client/src/shared/ui/common/AuthButton.tsx.htmlcoverage/Code/alter-client/src/shared/ui/common/AuthInput.tsx.htmlcoverage/Code/alter-client/src/shared/ui/common/Docbar.tsx.htmlcoverage/Code/alter-client/src/shared/ui/common/MoreButton.tsx.htmlcoverage/Code/alter-client/src/shared/ui/common/Navbar.tsx.htmlcoverage/Code/alter-client/src/shared/ui/common/index.htmlcoverage/Code/alter-client/src/shared/ui/home/ApplicationStatusBadge.tsx.htmlcoverage/Code/alter-client/src/shared/ui/home/WorkCategoryBadge.tsx.htmlcoverage/Code/alter-client/src/shared/ui/home/WorkerRoleBadge.tsx.htmlcoverage/Code/alter-client/src/shared/ui/home/index.htmlcoverage/Code/alter-client/src/shared/ui/index.htmlcoverage/Code/alter-client/src/shared/ui/manager/OngoingPostingCard.tsx.htmlcoverage/Code/alter-client/src/shared/ui/manager/SubstituteApprovalCard.tsx.htmlcoverage/Code/alter-client/src/shared/ui/manager/WorkerImageCard.tsx.htmlcoverage/Code/alter-client/src/shared/ui/manager/WorkerListItem.tsx.htmlcoverage/Code/alter-client/src/shared/ui/manager/alba-find/Albabox.tsx.htmlcoverage/Code/alter-client/src/shared/ui/manager/alba-find/index.htmlcoverage/Code/alter-client/src/shared/ui/manager/index.htmlcoverage/Code/alter-client/src/shared/ui/manager/social/SocialCategory.tsx.htmlcoverage/Code/alter-client/src/shared/ui/manager/social/SocialList.tsx.htmlcoverage/Code/alter-client/src/shared/ui/manager/social/index.htmlcoverage/Code/index.htmlcoverage/base.csscoverage/block-navigation.jscoverage/clover.xmlcoverage/coverage-final.jsoncoverage/index.htmlcoverage/prettify.csscoverage/prettify.jscoverage/sorter.jspackage.jsonsrc/features/home/user/lib/date.test.tsstorybook/main.tsvite.config.tsvitest.shims.d.ts
coverage/Code/alter-client/src/features/home/user/hooks/useMonthlyCalendarViewModel.ts.html
Outdated
Show resolved
Hide resolved
coverage/Code/alter-client/src/features/home/user/ui/HomeScheduleCalendar.tsx.html
Outdated
Show resolved
Hide resolved
coverage/Code/alter-client/src/features/home/user/ui/index.html
Outdated
Show resolved
Hide resolved
|
|
||
| <!doctype html> | ||
| <html lang="en"> | ||
|
|
||
| <head> | ||
| <title>Code coverage report for Code/alter-client/src/shared/stores/useDocStore.ts</title> | ||
| <meta charset="utf-8" /> | ||
| <link rel="stylesheet" href="../../../../../prettify.css" /> | ||
| <link rel="stylesheet" href="../../../../../base.css" /> | ||
| <link rel="shortcut icon" type="image/x-icon" href="../../../../../favicon.png" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <style type='text/css'> | ||
| .coverage-summary .sorter { | ||
| background-image: url(../../../../../sort-arrow-sprite.png); | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body> | ||
| <div class='wrapper'> | ||
| <div class='pad1'> | ||
| <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">Code/alter-client/src/shared/stores</a> useDocStore.ts</h1> | ||
| <div class='clearfix'> | ||
|
|
||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">55.55% </span> | ||
| <span class="quiet">Statements</span> | ||
| <span class='fraction'>5/9</span> | ||
| </div> | ||
|
|
||
|
|
||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">100% </span> | ||
| <span class="quiet">Branches</span> | ||
| <span class='fraction'>0/0</span> | ||
| </div> | ||
|
|
||
|
|
||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">40% </span> | ||
| <span class="quiet">Functions</span> | ||
| <span class='fraction'>2/5</span> | ||
| </div> | ||
|
|
||
|
|
||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">42.85% </span> | ||
| <span class="quiet">Lines</span> | ||
| <span class='fraction'>3/7</span> | ||
| </div> | ||
|
|
||
|
|
||
| </div> | ||
| <p class="quiet"> | ||
| Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block. | ||
| </p> | ||
| <template id="filterTemplate"> | ||
| <div class="quiet"> | ||
| Filter: | ||
| <input type="search" id="fileSearch"> | ||
| </div> | ||
| </template> | ||
| </div> | ||
| <div class='status-line medium'></div> | ||
| <pre><table class="coverage"> | ||
| <tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a> | ||
| <a name='L2'></a><a href='#L2'>2</a> | ||
| <a name='L3'></a><a href='#L3'>3</a> | ||
| <a name='L4'></a><a href='#L4'>4</a> | ||
| <a name='L5'></a><a href='#L5'>5</a> | ||
| <a name='L6'></a><a href='#L6'>6</a> | ||
| <a name='L7'></a><a href='#L7'>7</a> | ||
| <a name='L8'></a><a href='#L8'>8</a> | ||
| <a name='L9'></a><a href='#L9'>9</a> | ||
| <a name='L10'></a><a href='#L10'>10</a> | ||
| <a name='L11'></a><a href='#L11'>11</a> | ||
| <a name='L12'></a><a href='#L12'>12</a> | ||
| <a name='L13'></a><a href='#L13'>13</a> | ||
| <a name='L14'></a><a href='#L14'>14</a> | ||
| <a name='L15'></a><a href='#L15'>15</a> | ||
| <a name='L16'></a><a href='#L16'>16</a> | ||
| <a name='L17'></a><a href='#L17'>17</a> | ||
| <a name='L18'></a><a href='#L18'>18</a> | ||
| <a name='L19'></a><a href='#L19'>19</a> | ||
| <a name='L20'></a><a href='#L20'>20</a> | ||
| <a name='L21'></a><a href='#L21'>21</a> | ||
| <a name='L22'></a><a href='#L22'>22</a> | ||
| <a name='L23'></a><a href='#L23'>23</a> | ||
| <a name='L24'></a><a href='#L24'>24</a> | ||
| <a name='L25'></a><a href='#L25'>25</a> | ||
| <a name='L26'></a><a href='#L26'>26</a> | ||
| <a name='L27'></a><a href='#L27'>27</a> | ||
| <a name='L28'></a><a href='#L28'>28</a> | ||
| <a name='L29'></a><a href='#L29'>29</a> | ||
| <a name='L30'></a><a href='#L30'>30</a> | ||
| <a name='L31'></a><a href='#L31'>31</a> | ||
| <a name='L32'></a><a href='#L32'>32</a> | ||
| <a name='L33'></a><a href='#L33'>33</a> | ||
| <a name='L34'></a><a href='#L34'>34</a> | ||
| <a name='L35'></a><a href='#L35'>35</a> | ||
| <a name='L36'></a><a href='#L36'>36</a> | ||
| <a name='L37'></a><a href='#L37'>37</a> | ||
| <a name='L38'></a><a href='#L38'>38</a> | ||
| <a name='L39'></a><a href='#L39'>39</a> | ||
| <a name='L40'></a><a href='#L40'>40</a> | ||
| <a name='L41'></a><a href='#L41'>41</a> | ||
| <a name='L42'></a><a href='#L42'>42</a> | ||
| <a name='L43'></a><a href='#L43'>43</a> | ||
| <a name='L44'></a><a href='#L44'>44</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-yes">1x</span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-yes">1x</span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-yes">1x</span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-no"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-no"> </span> | ||
| <span class="cline-any cline-no"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-no"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span> | ||
| <span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { create } from 'zustand' | ||
| import type { TabKey } from '@/shared/types/tab' | ||
| | ||
| const PATHNAME_TAB_MAP: Array<{ matcher: RegExp; tab: TabKey }> = [ | ||
| { matcher: /(^|\/)home(\/|$)/, tab: 'home' }, | ||
| { matcher: /(^|\/)my(\/|$)/, tab: 'my' }, | ||
| { matcher: /(^|\/)message(\/|$)/, tab: 'message' }, | ||
| { matcher: /(^|\/)repute(\/|$)/, tab: 'repute' }, | ||
| { matcher: /(^|\/)search(\/|$)/, tab: 'search' }, | ||
| { matcher: /^\/manager\/home/, tab: 'home' }, | ||
| { matcher: /^\/job-lookup-map/, tab: 'search' }, | ||
| ] | ||
| | ||
| const createSelectedTab = (activeTab?: TabKey) => ({ | ||
| home: activeTab === 'home', | ||
| my: activeTab === 'my', | ||
| message: activeTab === 'message', | ||
| repute: activeTab === 'repute', | ||
| search: activeTab === 'search', | ||
| }) | ||
| | ||
| interface DocStoreState { | ||
| selectedTab: { | ||
| home: boolean | ||
| my: boolean | ||
| message: boolean | ||
| repute: boolean | ||
| search: boolean | ||
| } | ||
| setSelectedTab: (selectedTab: DocStoreState['selectedTab']) => void | ||
| setSelectedTabByPathname: (pathname: string) => void | ||
| } | ||
| | ||
| export const useDocStore = create<DocStoreState>(set => ({ | ||
| selectedTab: createSelectedTab(), | ||
| setSelectedTab: <span class="fstat-no" title="function not covered" >selectedTab => <span class="cstat-no" title="statement not covered" >s</span>et({ selectedTab }),</span> | ||
| setSelectedTabByPathname: <span class="fstat-no" title="function not covered" >pathname => {</span> | ||
| const matchedTab = <span class="cstat-no" title="statement not covered" >PATHNAME_TAB_MAP.find(<span class="fstat-no" title="function not covered" >({</span> matcher }) =></span> | ||
| <span class="cstat-no" title="statement not covered" > matcher.test(pathname)</span> | ||
| )?.tab | ||
| <span class="cstat-no" title="statement not covered" > set({ selectedTab: createSelectedTab(matchedTab) })</span> | ||
| }, | ||
| })) | ||
| </pre></td></tr></table></pre> | ||
|
|
||
| <div class='push'></div><!-- for sticky footer --> | ||
| </div><!-- /wrapper --> | ||
| <div class='footer quiet pad2 space-top1 center small'> | ||
| Code coverage generated by | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-04-05T07:59:34.214Z | ||
| </div> | ||
| <script src="../../../../../prettify.js"></script> | ||
| <script> | ||
| window.onload = function () { | ||
| prettyPrint(); | ||
| }; | ||
| </script> | ||
| <script src="../../../../../sorter.js"></script> | ||
| <script src="../../../../../block-navigation.js"></script> | ||
| </body> | ||
| </html> | ||
|
No newline at end of file |
There was a problem hiding this comment.
Do not commit generated coverage HTML reports to the repository.
Coverage HTML artifacts should be excluded from version control. They bloat the repository, become stale immediately, and regenerate on every test run.
✅ Recommended fix
Add the coverage/ directory to .gitignore:
+# Test coverage
+coverage/Configure your CI/CD pipeline to:
- Generate coverage reports during test runs
- Upload as build artifacts or send to a coverage service (e.g., Codecov, Coveralls)
- Optionally publish HTML reports to GitHub Pages or similar hosting
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@coverage/Code/alter-client/src/shared/stores/useDocStore.ts.html` around
lines 1 - 214, Remove the committed coverage HTML artifacts (e.g.,
coverage/.../useDocStore.ts.html) from the repo and add the coverage/ directory
to .gitignore so generated reports are not tracked; update any commits to drop
the file (git rm --cached) and commit the .gitignore change. Also update CI
workflow(s) (e.g., .github/workflows/* or your pipeline config) to keep
generating coverage during test runs but upload HTML reports as build artifacts
or publish them to a coverage service (Codecov/Coveralls) or GitHub Pages
instead of committing the coverage/ directory.
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/features/home/user/ui/MonthlyCalendar.tsx (1)
60-60: Use the registeredtext-errortoken instead of hardcoded color.The weekend index logic is correct—
index === 5 || index === 6properly targets Saturday and Sunday in the Monday-first array.However, replace the hardcoded
text-[#DC0000]with thetext-errortoken already registered intailwind.config.js(error: '#dc0000').🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/features/home/user/ui/MonthlyCalendar.tsx` at line 60, In MonthlyCalendar.tsx update the className string that currently uses the hardcoded color token 'text-[`#DC0000`]' (inside the template literal in the element that uses index === 5 || index === 6) to use the registered Tailwind token 'text-error' instead; locate the className expression in the MonthlyCalendar component and replace the hardcoded color with 'text-error' so weekends use the configured error color token.vite.config.ts (1)
70-82: Consider explicitly constraining Storybook project file selection for defensive coding.The storybook project (lines 70–82) lacks an explicit
includeorexcludepattern. While thestorybookTest()plugin manages file discovery independently via the Storybook config, and story files are already separated instorybook/stories/rather than mixed with unit tests insrc/, adding an exclude pattern provides defense against future configuration drift or plugin behavior changes.♻️ Optional adjustment
test: { name: 'storybook', + exclude: ['src/**/*.test.{ts,tsx}'], browser: { enabled: true, headless: true, provider: playwright({}),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@vite.config.ts` around lines 70 - 82, The Storybook test configuration (the test: { name: 'storybook', ... } block) should explicitly constrain which files are picked up to prevent accidental drift; add an explicit include or exclude pattern on that test config (for example, include only your story files under storybook/stories/**/*.{stories.ts,stories.tsx,stories.mdx} or add an exclude for unit tests like src/**/*.test.{ts,tsx,js,jsx}) so the storybookTest() discovery can't accidentally run non-story tests; update the test config object to include the chosen include/exclude property.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/features/home/user/ui/MonthlyCalendar.tsx`:
- Line 60: In MonthlyCalendar.tsx update the className string that currently
uses the hardcoded color token 'text-[`#DC0000`]' (inside the template literal in
the element that uses index === 5 || index === 6) to use the registered Tailwind
token 'text-error' instead; locate the className expression in the
MonthlyCalendar component and replace the hardcoded color with 'text-error' so
weekends use the configured error color token.
In `@vite.config.ts`:
- Around line 70-82: The Storybook test configuration (the test: { name:
'storybook', ... } block) should explicitly constrain which files are picked up
to prevent accidental drift; add an explicit include or exclude pattern on that
test config (for example, include only your story files under
storybook/stories/**/*.{stories.ts,stories.tsx,stories.mdx} or add an exclude
for unit tests like src/**/*.test.{ts,tsx,js,jsx}) so the storybookTest()
discovery can't accidentally run non-story tests; update the test config object
to include the chosen include/exclude property.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d961a9b6-43de-4867-91d6-1705af7f2794
📒 Files selected for processing (9)
.coderabbit.yaml.gitignoresrc/features/home/user/constants/calendar.tssrc/features/home/user/hooks/useMonthlyCalendarViewModel.tssrc/features/home/user/types/monthlyCalendar.tssrc/features/home/user/ui/MonthlyCalendar.tsxtsconfig.app.jsonvite.config.tsvitest.shims.d.ts
✅ Files skipped from review due to trivial changes (6)
- .gitignore
- tsconfig.app.json
- vitest.shims.d.ts
- .coderabbit.yaml
- src/features/home/user/constants/calendar.ts
- src/features/home/user/types/monthlyCalendar.ts
ID
변경 내용
구현 사항
Storybook + Vitest
v- ite.config.ts에 @storybook/addon-vitest/vitest-plugin의 storybookTest({ configDir: storybook }), Playwright Chromium 브라우저 모드의 storybook Vitest 프로젝트 구성
커버리지
단위 테스트
구현 시연 (필요 시)
참고 사항 (필요 시)
Summary by CodeRabbit
New Features
Bug Fixes
Tests