feat(frontend): update dashboard UI #43#44
Merged
Inlet-back merged 1 commit intodevelopfrom Feb 19, 2026
Merged
Conversation
Contributor
Author
16 tasks
Neon-straySheep
added a commit
that referenced
this pull request
Feb 19, 2026
## 概要 ユーザーが学びたい技術のドキュメントを入力すると、 LLMを使用してランクに見合った実践的なハンズオン演習を自動生成する機能を実装。 概念実証を優先し、まずは動くことを重視。 ## 実装内容 ### 1. プロンプトテンプレート拡張 - `app/core/prompts.py`: QUEST_GENERATION_TEMPLATEを詳細化 - ランク別の難易度設定ガイドライン - JSON出力形式の厳密な指定 - ステップ構成の要件定義 ### 2. サービス層実装 - `app/services/quest_service.py`: generate_handson_quest関数 - LLM呼び出し (temperature=0.7で創造性を持たせる) - JSONパース+エラーハンドリング - デフォルト値フォールバック ### 3. スキーマ定義拡張 - `app/schemas/quest.py`: QuestGenerationRequest/Response追加 - QuestStep: 演習ステップの詳細定義 - リクエストバリデーション (document_content: 10KB制限) - Swagger UIのExample付き ### 4. APIエンドポイント実装 - `app/api/endpoints/quest.py`: POST /api/v1/quest/generate - リクエスト受け取り - サービス呼び出し - エラーハンドリング ### 5. ルーター登録 - `app/api/api.py`: questルーターを統合 ### 6. テスト実装 - `tests/test_services/test_quest_service.py`: サービス層テスト - `tests/test_api/test_quest.py`: APIエンドポイントテスト - LLM呼び出しをモック化してCI環境対応 - 正常系・エラー系・バリデーションをカバー ## MVP制限(概念実証優先) - ❌ DB保存なし: 生成された演習はAPIレスポンスのみ - ❌ 進捗管理なし: 演習の完了状態やスコアは後続Issue -⚠️ 生成品質: プロンプト調整は後続Issue ## セキュリティ考慮 - Request Bodyサイズ制限(document_content: 10KB) - LLMレスポンスのサニタイズ(JSONパースエラー時のフォールバック) - エラーメッセージの安全な返却 ## テスト要件 - モック使用でAPI キー不要(CI環境対応) - 正常系・エラー系・バリデーションを網羅 ## 完了条件(DoD) - [x] POST /api/v1/quest/generate実装完了 - [x] スキーマ定義とバリデーション実装 - [x] テスト5件以上実装(モック使用) - [x] エラーハンドリング実装 ## 依存 - Issue #32(AI基盤セットアップ)✅ - Issue #36(ランク判定AI)✅ ## 次のステップ(後続Issue) - Issue #41: 演習のDB保存機能 - Issue #42: 演習進捗管理機能 - Issue #43: 演習生成品質向上 - Issue #44: 生成コードのセキュリティチェック
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Issue: #43
Closes #43
実装の概要
添付されたモックアップ画像に基づき、ダッシュボード画面のUIを実装しました。
app/dashboardルート配下に、サイドバー、ヘッダー、およびメインコンテンツ(ステータス、バッジ、スキルツリー)を配置しました。🔧 技術的な意思決定とトレードオフ (最重要)
採用したアプローチ
手法:
src/app/dashboardディレクトリを作成し、Next.js App Routerの特性を活かしたレイアウト構成を採用。AppSidebarとAcquiredBadgesを独立したコンポーネントとして切り出し。stickyポジションを使用して画面上部に固定。src/app/(dashboard)をsrc/app/dashboardにリネームしました。メリット:
デメリット/リスク:
mock.tsのモックデータを使用しており、バックエンド連携は未実装。却下したアプローチ(代替案)
page.tsxに記述する。🧪 テスト戦略と範囲
追加したテストケース
npm run devを実行し、/dashboardページが正常にレンダリングされることを目視確認。セキュリティに関する自己評価
レビュワー(人間)への申し送り事項