Skip to content

AIエージェントのUI設計書を追加 - #6478

Merged
TinyKitten merged 6 commits into
devfrom
docs/ai-agent-ui-spec
Jul 29, 2026
Merged

TinyKitten merged 6 commits into
devfrom
docs/ai-agent-ui-spec

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jul 29, 2026 •

Copy link
Copy Markdown
Member

概要

#6474 でFIXしたAIエージェント設計(docs/spec/ai-agent/architecture.md)にフィットするUI設計書を追加します。Figmaデザインは人力ではなくFigma MCPで本書を入力として起こし、@TinyKitten がレビュー・採否判断を行う前提の中間計画書です(#6477 の成果物)。

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

docs/spec/ai-agent/ui.md を新規追加。主な内容:

  • デザイン原則: 既存デザイントークン(#FAFAFA 背景・白カード + シャドウ・アクセント #008ffe・LEDテーマ時のドットフォント + 角丸なし)を全面踏襲し、新規のビジュアル語彙は「チャットバブル」「タイピングインジケータ」の2つに限定
  • エントリポイント3案の比較(推奨: RouteSearchScreen の検索バー直下バナー / 代替: FooterTabBarタブ化・ホーム画面カード)
  • DestinationAgentScreen の画面構成(ヘッダー・メッセージリスト・入力バーの3層)とASCIIワイヤフレーム
  • 提案駅カードは CommonCard 流用で検索結果と同一の見た目にし、GET_STATIONS_BY_IDS での再取得タイミングを含めて規定
  • 状態別表示マトリクス(送信中・謝絶・429・通信エラー・提案再取得失敗)、空状態(例文チップ + 免責文言)
  • LEDテーマ対応表・翻訳キー案(ja/en)・アクセシビリティ・タブレット対応
  • Figmaデザイン判断チェックリストとUI判断事項(いずれも2026-07-29のレビューで全項目確定済み。Figma MCPでデザインを起こす前提)
  • CodeRabbitレビュー反映: ユーザバブルのコントラストをAA準拠の受け入れ条件に変更(既定 #0071CE)、提案カードの路線解決ルール(stationId 由来の Station.line 使用・名称一致禁止)と送信中の再送信ブロック必須条件(ハンドラガード + disabled + accessibilityState)を明文化

テスト

ドキュメントのみの変更のため、以下を実行しています。

  • npx markdownlint-cli2 docs/spec/ai-agent/ui.md : 0 issues(CLAUDE.md記載のMarkdown規約準拠)

  • npm run lint が通ること

  • npm test が通ること

  • npm run typecheck が通ること

関連Issue

Closes #6477

スクリーンショット(任意)

なし(ドキュメントのみ)

🤖 Generated with Claude Code

https://claude.ai/code/session_01KDaiKgFRUQAb3Pmn97t2a9

Summary by CodeRabbit

  • ドキュメント
    • AIエージェント用「行き先相談」チャット画面のUI設計仕様を追加しました。
    • ヘッダー/メッセージリスト/入力バーの構成、メッセージ種別や謝絶表示の方針を整理しました。
    • 提案カードの表示手順(再取得・エラー時再試行)、空状態、タイピングインジケータを定義しました。
    • 入力・送信の制御(上限、送信中の無効化、復元、アクセシビリティ)と状態別表示マトリクスを明記しました。
    • 画面遷移、LEDテーマ差分、多言語・タブレット対応、チェックリストも収録しました。

@TinyKitten TinyKitten self-assigned this Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

AIエージェント用チャット画面のUI設計書を新規追加しました。画面構成、メッセージ表示、提案カード、送信状態、画面遷移、テーマ、多言語、アクセシビリティ、Figma反映事項を定義しています。

Changes

AIエージェントUI

Layer / File(s) Summary
画面方針とチャット構成
docs/spec/ai-agent/ui.md
エントリポイント、DestinationAgentScreen、メッセージバブル、提案カード、入力バー、送信・通信エラーなどの状態表示を定義しています。
画面遷移とコンポーネント連携
docs/spec/ai-agent/ui.md
チャット画面からSelectBoundModal、メイン画面へ遷移する流れと、コンポーネントの配置方針を定義しています。
テーマ対応と設計引き継ぎ
docs/spec/ai-agent/ui.md
LEDテーマ、多言語キー、アクセシビリティ、タブレット表示、Figma確認項目、未決事項を記載しています。

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

ぴょんと跳ねればチャットの森
バブルが並び、提案が踊る
LEDの灯りもきらきらと
うさぎは仕様を月へ運ぶ
Figmaの星へ、ぴょん、ぴょん、ぴょん

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed #6477のUI設計とFigma MCP前提の中間計画書作成という目的に沿っており、要求を満たしています。
Out of Scope Changes check ✅ Passed 変更はdocs/spec/ai-agent/ui.mdの追加に限定され、目的外のコード変更は見当たりません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed 変更内容の主題であるAIエージェントのUI設計書追加を簡潔に表しています。
Description check ✅ Passed テンプレートの主要項目が揃っており、概要・変更内容・テスト・関連Issueまで記載されています。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/ai-agent-ui-spec

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (1)
docs/spec/ai-agent/ui.md (1)

215-217: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low value

SelectBoundModal 起動前の状態契約も明記してください。
pendingStation / pendingStations / selectedLine をクリアし、pendingLine をセットしてからモーダルを開く前提を共有フックの責務として書いておくと、実装差分を追いやすいです。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/spec/ai-agent/ui.md` around lines 215 - 217,
共有フックの責務として、SelectBoundModalを開く前にpendingStation、pendingStations、selectedLineをクリアし、pendingLineをセットする状態契約をdocs/spec/ai-agent/ui.mdに明記してください。RouteSearchScreenのhandleLineSelectedと同じ既存UI遷移の説明は維持してください。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/spec/ai-agent/ui.md`:
- Around line 278-280: Update the sending-state requirements in the UI
specification’s send-button behavior to require actual submission blocking, not
only `opacity: 0.5`: the send handler must guard against in-flight submissions,
the button must set `disabled`, and it must expose `accessibilityState={{
disabled: true }}` while sending.
- Around line 195-207: 提案ごとに表示対象路線を一意に解決できるよう、suggestions のレスポンス契約へ lineId
などの安定した路線識別子を追加してください。GET_STATIONS_BY_IDS で再取得した Station の Line
一覧から名称一致に頼らずその識別子で対象路線を明示的に選択し、CommonCard には解決した Line を渡す仕様を更新してください。
- Around line 182-185: ユーザーメッセージの配色仕様で、#008ffe 上の白文字を未決事項として扱わず、WCAG AA
準拠の背景色または文字色へ変更してください。該当する設計要件・受け入れ条件にも準拠を明記し、Figmaでの検討事項として実装へ引き継がないでください。

---

Nitpick comments:
In `@docs/spec/ai-agent/ui.md`:
- Around line 215-217:
共有フックの責務として、SelectBoundModalを開く前にpendingStation、pendingStations、selectedLineをクリアし、pendingLineをセットする状態契約をdocs/spec/ai-agent/ui.mdに明記してください。RouteSearchScreenのhandleLineSelectedと同じ既存UI遷移の説明は維持してください。
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0a1230ea-c644-4ce9-a1b6-cd9d343661c0

📥 Commits

Reviewing files that changed from the base of the PR and between dd755a5 and c7e96e9.

📒 Files selected for processing (1)
  • docs/spec/ai-agent/ui.md

Comment thread docs/spec/ai-agent/ui.md Resolved
Comment thread docs/spec/ai-agent/ui.md Resolved
Comment thread docs/spec/ai-agent/ui.md Resolved
@TinyKitten

Copy link
Copy Markdown
Member Author

Fixes Applied Successfully

Fixed 1 file based on 3 CodeRabbit feedback items.

Files modified:

  • docs/spec/ai-agent/ui.md

Commit: 30c305a4c

Summary of changes:

  1. ユーザバブルのコントラストを未決事項から受け入れ条件に変更(既定 #0071CE・白文字と 4.5:1 以上を必須化)
  2. 提案カードの路線解決ルールを明文化(stationId は路線ごとに一意な行 ID のため再取得した Station.line で一意に解決。名称一致による選択を禁止。契約への lineId 追加は不要と判断)
  3. 送信中の再送信ブロックを必須条件化(ハンドラ側ガード + disabled + accessibilityState。opacity は視覚表現のみ)

The latest autofix changes are on the docs/ai-agent-ui-spec branch.

@TinyKitten

Copy link
Copy Markdown
Member Author
image 結局Figma MCPを使ったが、東海道本線のアイコンがりんかい線と同じなこと以外問題なさそう。

@TinyKitten

Copy link
Copy Markdown
Member Author
image 完璧では?

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/spec/ai-agent/ui.md`:
- Around line 452-464:
Figma判断項目の一覧に、東海道本線のアイコンがりんかい線と同一になっている既知の不一致を修正待ち項目として追加してください。「全項目とも確定」という表現が誤解を招かないよう、当該アイコンは修正確認後に確定扱いと明記し、既存の確定項目は変更しないでください。
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eefc25a0-8afb-4baa-ad28-2f145d5775b3

📥 Commits

Reviewing files that changed from the base of the PR and between 780fa83 and e2c1be3.

📒 Files selected for processing (1)
  • docs/spec/ai-agent/ui.md

Comment thread docs/spec/ai-agent/ui.md Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AI PoC] UI設計

1 participant