Skip to content

📦 [Consolidated] PR #38~#48 の統合・競合解消およびレビュー指摘対応#55

Merged
is0692vs merged 26 commits intomainfrom
fix/consolidated-prs-complete
Mar 14, 2026
Merged

📦 [Consolidated] PR #38~#48 の統合・競合解消およびレビュー指摘対応#55
is0692vs merged 26 commits intomainfrom
fix/consolidated-prs-complete

Conversation

@is0692vs
Copy link
Contributor

@is0692vs is0692vs commented Mar 6, 2026

概要

このPRは、複数の依存関係が重複したり機能連携がある以下11個のPRを一つのブランチにて統合(マージ)し、さらに各位からいただいたレビューコメント等の指摘事項に対応するためのものです。

統合元のPR(これらは本作業に伴いクローズ済みです):

対応した修正点 (レビュー指摘への対応)

  1. src/lib/__tests__/cardSettings.test.ts (PR 🧪 [Add tests for loadCardSettings window check in cardSettings.ts] #39, 🧪 ユニットテストの追加: cardSettings.tsの安全なJSONパースの検証 #47 指摘対応)

    • customLayoutに対し、CardLayoutの型指定が欠け暗黙の string になっていたものを追加。
    • customOptionsに対する余分なキャストを無くし安全性を向上。
    • saveCardSettings に渡すパラメーターが "left" などの文字列になっていたためテストが落ちるものを CardLayout オブジェクト定義に修正し、テストを正しく動作するように変更。
  2. src/lib/github.ts (PR 🧹 Refactor fetchUserSummary to reduce complexity #45 指摘対応)

    • fetchUserSummary でのエラーハンドリング result.reason?.message ?? "Unknown error" を改善。result.reason 自体が投げられた(Error以外でリジェクトされた)場合でも正常に表示できるよう修正。
  3. src/app/api/dashboard/year/route.test.ts (PR 🧪 /api/dashboard/year の無効な年に関するテストを追加 #42 指摘対応)

    • as any キャストを可能な限り排除。機能していない createMockRequest 関数を NextRequest を返すように変更し、セッションモック定義を定数で管理して重複を削除。
  4. パッケージの重複削除と整理 (PR 🧪 Add tests for useDashboardData hooks #46, 🧪 ユニットテストの追加: cardSettings.tsの安全なJSONパースの検証 #47 マージ競合解消)

    • package.json での競合解消時に、重複していた jsdom, vitest, @testing-library/* などの devDependencies をクリーンアップ。

確認事項

  • 本ブランチにてローカルでの npm run test (137件のテストパス) と npm run build は成功することを確認済みです。

google-labs-jules bot and others added 25 commits March 6, 2026 06:29
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
src/lib/githubYearInReview.ts内のfetchCommitDatesForTopRepos関数において、直列実行されていたコミット取得APIリクエストをPromise.allを使用して並列化。

Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
🎯 **What:** CI failed because of missing `@testing-library/react` and `jsdom` within dependencies that are used within the hook test suite. Added to `package.json` dynamically instead of exclusively relying on `npm i -D` within sandbox runtime, which resulted in CI workflow cache failures. In addition, `vitest` reported typing errors caused by `any` overriding not being accurately replaced by TypeScript and linting. Resolved `Response` object mapping logic and typing assignments on mock callbacks.
📊 **Coverage:** Covered hooks session authentication guards, mocked API endpoints URL inputs to SWR, validated data payload parsing outputs, and SWR global text error parsing fallbacks for generic `fetcher`. Testing environment switched to `jsdom`.
✨ **Result:** Raised `src/hooks/useDashboardData.ts` line, block and function coverage to 100% and restored CI workflow successfully.

Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
🎯 **What:** The testing gap addressed
The 'loadCardSettings' function had an edge case for when the global 'window' object was not defined, but it wasn't tested. Added comprehensive test coverage to ensure resilience in SSR environments.

📊 **Coverage:** What scenarios are now tested
- When 'window' is not defined (SSR environment).
- When 'window' is defined, checking parsing behavior.

✨ **Result:** The improvement in test coverage
The 'cardSettings.ts' module's critical 'window' logic is now covered by unit tests, preventing future regressions.

Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
…13861009318010078666' into fix/consolidated-prs-complete
…91336448988' into fix/consolidated-prs-complete
…rd-year-8975921816818319832' into fix/consolidated-prs-complete
…fetch-2499081300861358084' into fix/consolidated-prs-complete
…mplexity-9578357994793823332' into fix/consolidated-prs-complete
…llback-17427369068075534558' into fix/consolidated-prs-complete
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@vercel
Copy link

vercel bot commented Mar 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
github-user-summary Ready Ready Preview, Comment Mar 14, 2026 2:01pm

@is0692vs is0692vs changed the title Fix/consolidated prs complete 📦 [Consolidated] PR #38~#48 の統合・競合解消およびレビュー指摘対応 Mar 6, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

Warning

Rate limit exceeded

@is0692vs has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 0 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 40302f63-b014-4536-8192-6ac05c2ba76a

📥 Commits

Reviewing files that changed from the base of the PR and between 3cfdea1 and 09b67c6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • package.json
  • src/app/api/card/[username]/route.test.ts
  • src/app/api/dashboard/year/route.test.ts
  • src/components/ShareButtons.test.tsx
  • src/components/ThemeController.tsx
  • src/hooks/__tests__/useDashboardData.test.ts
  • src/hooks/useDashboardData.test.ts
  • src/hooks/useThemeColor.ts
  • src/lib/__tests__/cardSettings.test.ts
  • src/lib/github.ts
  • src/lib/githubYearInReview.ts
  • vitest.config.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/consolidated-prs-complete
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@is0692vs
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@is0692vs is0692vs merged commit 2f0cf1c into main Mar 14, 2026
6 of 7 checks passed
@is0692vs is0692vs deleted the fix/consolidated-prs-complete branch March 14, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant