-
-
Notifications
You must be signed in to change notification settings - Fork 143
Feature/update document #362
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
Co-Authored-By: ニケちゃん / nikechan <o3nike.teg.14@gmail.com>
Co-Authored-By: ニケちゃん / nikechan <o3nike.teg.14@gmail.com>
…delines Devin/1745015016 add testing guidelines
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthroughこの変更では、プロジェクトの開発ルールやディレクトリ構成、技術スタック、開発プロセス、タスクガイドなどを詳細に定めた複数のドキュメントファイルが新規追加されました。また、Live2D機能の商用ライセンスに関する追加料金率が25%から40%に変更され、関連するライセンス文書やガイドが各言語で修正されています。さらに、スポンサー貢献者「uwaguchi」がREADMEおよび各国語版READMEに追加されました。テスト関連ドキュメントからは「今後の課題」セクションが削除されています。 Changes
Sequence Diagram(s)(該当なし) 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (9)
✅ Files skipped from review due to trivial changes (8)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 10
🔭 Outside diff range comments (1)
.cursor/rules/testing-guidelines.mdc (1)
224-230: 🛠️ Refactor suggestionテスト対象の優先順位は明確ですが、統合テストに関する指針も追加するとよいでしょう
単体テストの優先順位は明確に定義されていますが、統合テストやエンドツーエンドテストに関する指針が欠けています。以下の追加を検討してください:
- コンポーネント間の統合テスト
- 機能フロー全体のエンドツーエンドテスト
- パフォーマンステスト
- アクセシビリティテスト
3. **ストア**:Zustandストアの状態管理 4. **UI コンポーネント**:ユーザーインターフェース要素 + +## 統合テストとE2Eテスト + +1. **コンポーネント統合テスト**:複数のコンポーネントが連携する機能 +2. **ユーザーフローテスト**:ユーザーシナリオに基づく一連の操作 +3. **エッジケーステスト**:ネットワークエラー、大量データ処理などの境界条件
🧹 Nitpick comments (7)
website/document/guide/character/live2d.md (1)
131-131: 表現の微調整提案: 助詞「が、」の置換
箇条書き内の「発生しますが、これは」は「発生します。これは」に変更するとより自然です。
例:- - Live2Dモデルを使用する場合は基本ライセンス料金に40%の追加料金が発生しますが、これはLive2Dモデルを活用したサービスから売上が生じた際にLive2D社へライセンス料を支払う義務が生じるためです + - Live2Dモデルを使用する場合は基本ライセンス料金に40%の追加料金が発生します。これはLive2Dモデルを活用したサービスから売上が生じた際にLive2D社へライセンス料を支払う義務が生じるためです.cursor/rules/code-conventions.mdc (1)
15-18: リンクパスの形式を統一してください
project-structure.mdcのリンクがmdc:.cursor/rules/project-structure.mdcですが、他のリンクと同様に相対パスを明示して一貫性を持たせましょう。.cursor/rules/project-structure.mdc (1)
11-17: コードブロックに言語指定を追加すると可読性が向上します
バッククオート(```)にbashや `text` などの言語識別子を追加すると、ドキュメントの可読性とツールとの連携が向上します。.cursor/rules/development-process.mdc (2)
18-18: 重複実装の防止メカニズムをより具体的に定義することを検討してください重複実装の防止は素晴らしい実践ですが、具体的な確認方法やツールを提供すると、開発者がこのステップを実行しやすくなります。例えば、既存コードの検索方法や類似機能を特定するためのチェックリストなどを追加することを検討してください。
45-66: 結果報告テンプレートを拡張することを検討してください現在のテンプレートは良く構成されていますが、以下の情報を追加するとさらに有用になります:
- 関連するイシュー/チケット番号へのリンク
- 使用したブランチ名やコミットハッシュなどのバージョン管理情報
- レビュー担当者や承認者の記録欄
# 実行結果報告 +## 関連情報 +- イシュー/チケット番号: [#XX] +- ブランチ: [ブランチ名] +- コミット: [ハッシュ] ## 概要 [全体の要約].cursor/rules/testing-guidelines.mdc (2)
110-152: モックパターンのサンプルをさらに拡張するとよいでしょう現在のモックパターンは基本的なユースケースをカバーしていますが、より複雑なシナリオも追加するとよいでしょう。例えば:
- 条件付きモックの実装(異なる入力に対して異なる応答を返す)
- 非同期処理の連鎖(複数のPromise)をモックする方法
- エラーケースのモック
- ストアの状態変化をテストする方法
// 条件付きモックの例 jest.mock('../../../path/to/module', () => ({ conditionalFunction: jest.fn().mockImplementation((input) => { if (input === 'specific_case') { return 'special_result'; } return 'default_result'; }), })); // エラーケースのモック例 jest.mock('../../../path/to/api', () => ({ apiCall: jest.fn().mockRejectedValue(new Error('API error')), }));
194-222: CI/CD統合は適切ですが、追加の保護設定を記載するとより良いでしょうGitHub Actionsの設定は適切ですが、以下の追加情報を提供することでCI/CDプロセスの完全性を高めることができます:
- ブランチ保護ルール(テスト通過を必須にする)
- PRレビュー要件との統合
- テスト失敗時の通知設定
- デプロイ環境ごとの追加テスト(ステージング環境など)
# ブランチ保護の設定例: # GitHub > リポジトリ設定 > Branches > Branch protection rules で以下を設定 # - Require status checks to pass before merging # - Require branches to be up to date before merging # - Status checks: Run Tests (このワークフローの名前)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
.cursor/rules/api-management.mdc(1 hunks).cursor/rules/code-conventions.mdc(1 hunks).cursor/rules/development-process.mdc(1 hunks).cursor/rules/project-structure.mdc(1 hunks).cursor/rules/task-guides.mdc(1 hunks).cursor/rules/tech-stack.mdc(1 hunks).cursor/rules/testing-guidelines.mdc(1 hunks)README.md(1 hunks)docs/README_en.md(1 hunks)docs/README_ko.md(1 hunks)docs/README_pl.md(1 hunks)docs/README_zh.md(1 hunks)docs/license.md(1 hunks)docs/license_en.md(1 hunks)website/document/en/guide/character/live2d.md(1 hunks)website/document/guide/character/live2d.md(1 hunks)website/document/zh/guide/character/live2d.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/license_en.md
[uncategorized] ~60-~60: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...f Live2D, the conditions stated in the "Third Party Licenses" section below also apply. Fo...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Cloudflare Pages
🔇 Additional comments (11)
docs/README_zh.md (1)
261-263: 新スポンサー “uwaguchi” のロゴとリンクを追加
他のローカライズ版と同様のスタイルで正しく挿入されています。docs/README_en.md (1)
261-263: Added new sponsor “uwaguchi” logo and link
The English version list remains consistent with other locales.docs/README_pl.md (1)
261-263: Dodano nowego sponsora “uwaguchi”
Listę w wersji polskiej zaktualizowano zgodnie z pozostałymi językami.docs/README_ko.md (1)
261-263: 신규 스폰서 “uwaguchi” 로고 및 링크 추가
한국어 버전도 다른 언어 버전과 일관되게 업데이트되었습니다。README.md (1)
261-263: 新スポンサー “uwaguchi” のロゴとリンクを追加
メインREADMEでも一貫して反映されています。docs/license.md (1)
62-62: Live2D追加料金率の更新を承認
変更内容が他ドキュメントと整合しており、説明も明確です。website/document/en/guide/character/live2d.md (1)
133-133: 英語版ガイドの更新承認: Live2D追加料金40%
ガイド内の追加料金率を25%から40%に修正し、他ドキュメントと整合が取れています。website/document/zh/guide/character/live2d.md (1)
131-131: 中国語版ガイドの更新承認: Live2D追加費用40%
訳文が他言語版と整合しており、自然な表現です。docs/license_en.md (1)
60-60: Licenseドキュメントの更新承認: Live2D追加料金40%
追加料金率を25%から40%に修正し、説明もクリアです。🧰 Tools
🪛 LanguageTool
[uncategorized] ~60-~60: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...f Live2D, the conditions stated in the "Third Party Licenses" section below also apply. Fo...(EN_COMPOUND_ADJECTIVE_INTERNAL)
.cursor/rules/development-process.mdc (1)
68-74: 重要な注意点セクションは非常に適切ですこのセクションは開発プロセス中の重要な制約と要件を明確にしています。特にUI/UXの変更と技術スタックのバージョン変更に関する厳格なルールは、プロジェクトの一貫性を保つために重要です。このような明確なガイドラインは誤解を防ぎ、プロジェクト品質を維持するのに役立ちます。
.cursor/rules/testing-guidelines.mdc (1)
11-50: テスト環境セクションは非常に詳細かつ有用ですテスト環境のセットアップ、使用ツール、設定ファイル、実行コマンドが明確に定義されており、開発者が迅速にテスト環境を理解し利用できるようになっています。特に各設定ファイルの役割とモックの設定方法が丁寧に説明されている点が素晴らしいです。
| 以下の技術については、指定されたバージョンに従ってください。**事前の明示的な承認なしにバージョンを変更しないでください。** | ||
|
|
||
| ## コア技術 | ||
| - TypeScript: ^5.0.2 |
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.
🛠️ Refactor suggestion
TypeScriptのバージョン指定が重複しています
コア技術(11行目)と開発ツール(28行目)の両方で同じバージョンを指定しています。管理の混乱を避けるため、一箇所に統一してください。
Also applies to: 28-28
| --- | ||
| description: | ||
| globs: | ||
| alwaysApply: false | ||
| --- |
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.
Frontmatterのdescriptionおよびglobsが未設定です
ルールファイルが正しく適用されるように、descriptionに概要を、globsに対象ファイルパターンを明示的に記述してください。
| --- | ||
| description: | ||
| globs: | ||
| alwaysApply: false | ||
| --- |
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.
Frontmatterのdescriptionおよびglobsが未設定です
ドキュメントの目的を明確化し、globsで適用対象ファイルパターンを指定して、ルールの適用漏れを防いでください。
| --- | ||
| description: | ||
| globs: | ||
| alwaysApply: false | ||
| --- |
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.
Frontmatterのdescriptionおよびglobsが未設定です
適切なdescriptionとglobsを設定して、ルールファイルが意図した箇所に適用されることを保証してください。
| --- | ||
| description: | ||
| globs: | ||
| alwaysApply: false | ||
| --- |
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.
Frontmatterのdescriptionおよびglobsが未設定です
ドキュメントの概要と適用対象ファイルパターンをglobsに明示し、正しくガイドが反映されるようにしてください。
| --- | ||
| description: | ||
| globs: | ||
| alwaysApply: false | ||
| --- |
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.
Frontmatterのdescriptionおよびglobsが未設定です
ルールファイルが適切に適用されるよう、descriptionに目的を、globsに対象ファイルパターンを設定してください。
| --- | ||
| description: | ||
| globs: | ||
| alwaysApply: false | ||
| --- |
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.
🛠️ Refactor suggestion
フロントマターの詳細情報を追加してください
フロントマターのフィールド(description、globs)が空のままです。これらのフィールドはこのルールの説明や適用範囲を定義するために重要です。
---
-description:
+description: プロジェクトの開発プロセスとワークフローを定義したガイドライン
-globs:
+globs: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
alwaysApply: false
---📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| --- | |
| description: | |
| globs: | |
| alwaysApply: false | |
| --- | |
| --- | |
| description: プロジェクトの開発プロセスとワークフローを定義したガイドライン | |
| globs: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"] | |
| alwaysApply: false | |
| --- |
.cursor/rules/testing-guidelines.mdc
Outdated
| --- | ||
| description: | ||
| globs: | ||
| alwaysApply: false | ||
| --- |
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.
🛠️ Refactor suggestion
フロントマターの詳細情報を追加してください
フロントマターのフィールド(description、globs)が空のままです。これらのフィールドはこのルールの適用範囲を定義するために重要です。
---
-description:
+description: AITuberKitプロジェクトのテスト実装ガイドラインと規約
-globs:
+globs: ["**/*.test.ts", "**/*.test.tsx", "src/__tests__/**/*"]
alwaysApply: false
---📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| --- | |
| description: | |
| globs: | |
| alwaysApply: false | |
| --- | |
| --- | |
| description: AITuberKitプロジェクトのテスト実装ガイドラインと規約 | |
| globs: ["**/*.test.ts", "**/*.test.tsx", "src/__tests__/**/*"] | |
| alwaysApply: false | |
| --- |
.cursor/rules/testing-guidelines.mdc
Outdated
| ### テスト記述のガイドライン | ||
|
|
||
| 1. **テスト説明は日本語で記述**:`it('日本語でテストの目的を説明', ...)` | ||
| 2. **一つのテストケースでは一つの機能をテスト**:複数の機能や条件を一つのテストに詰め込まない | ||
| 3. **エッジケースを考慮**:空文字列、null、undefined、不正な入力などのケースもテスト | ||
| 4. **モックはテストごとにリセット**:`beforeEach(() => { jest.clearAllMocks() })` | ||
| 5. **テストデータは明示的に定義**:ハードコードされた値を使用し、テスト内で生成しない | ||
|
|
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.
🛠️ Refactor suggestion
テスト記述ガイドラインにカバレッジ目標を追加することを検討してください
現在のガイドラインは明確で実用的ですが、コードカバレッジに関する指針が欠けています。以下の項目を追加することを検討してください:
- 目標とするコードカバレッジの割合(例:80%以上)
- 重要な機能や複雑なロジックのテストカバレッジ優先度
- カバレッジレポートの確認方法と解釈のガイド
5. **テストデータは明示的に定義**:ハードコードされた値を使用し、テスト内で生成しない
+6. **テストカバレッジの目標**:プロジェクト全体で80%以上、コア機能は90%以上のカバレッジを目指す
+7. **カバレッジの確認**:`npm run test:coverage`の実行後、`coverage/lcov-report/index.html`で詳細を確認📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### テスト記述のガイドライン | |
| 1. **テスト説明は日本語で記述**:`it('日本語でテストの目的を説明', ...)` | |
| 2. **一つのテストケースでは一つの機能をテスト**:複数の機能や条件を一つのテストに詰め込まない | |
| 3. **エッジケースを考慮**:空文字列、null、undefined、不正な入力などのケースもテスト | |
| 4. **モックはテストごとにリセット**:`beforeEach(() => { jest.clearAllMocks() })` | |
| 5. **テストデータは明示的に定義**:ハードコードされた値を使用し、テスト内で生成しない | |
| ### テスト記述のガイドライン | |
| 1. **テスト説明は日本語で記述**:`it('日本語でテストの目的を説明', ...)` | |
| 2. **一つのテストケースでは一つの機能をテスト**:複数の機能や条件を一つのテストに詰め込まない | |
| 3. **エッジケースを考慮**:空文字列、null、undefined、不正な入力などのケースもテスト | |
| 4. **モックはテストごとにリセット**:`beforeEach(() => { jest.clearAllMocks() })` | |
| 5. **テストデータは明示的に定義**:ハードコードされた値を使用し、テスト内で生成しない | |
| 6. **テストカバレッジの目標**:プロジェクト全体で80%以上、コア機能は90%以上のカバレッジを目指す | |
| 7. **カバレッジの確認**:`npm run test:coverage`の実行後、`coverage/lcov-report/index.html`で詳細を確認 |
Deploying aituber-kit with
|
| Latest commit: |
b6fea54
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1b0f0cf7.aituber-kit-4s1.pages.dev |
| Branch Preview URL: | https://feature-update-document.aituber-kit-4s1.pages.dev |
Feature/update document
Summary by CodeRabbit