Repository navigation
AI画面のリセットボタン表示をFigmaに合わせて主語を省略 - #6490
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Kj166shvxxZxckJGg5adfx
Contributor
📝 WalkthroughWalkthroughAgentHeaderのリセットボタン表示を短縮ラベルへ変更し、英語・日本語の翻訳キーと表示・アクセシビリティ・操作に関するテストを追加しました。 Changesリセットラベル表示
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/screens/DestinationAgent/AgentHeader.test.tsx (1)
15-18: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win実際の翻訳値も回帰テストで検証してください。
translateをキーそのものを返すモックにしているため、"Reset"や"リセット"の定義が誤っていてもテストは成功します。短縮キーの選択テストは維持しつつ、英語・日本語の翻訳定義を実値で検証するテストを追加してください。コーディングガイドラインの「挙動を変更する際は、同じ変更セット内でテストも更新または追加すること」に基づく指摘です。
🤖 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 `@src/screens/DestinationAgent/AgentHeader.test.tsx` around lines 15 - 18, Update the translation mock used by the AgentHeader tests so short-key selection coverage remains intact, and add regression tests that assert the actual English and Japanese values for “Reset” and “リセット” rather than returning keys unchanged. Use the existing translation symbols and AgentHeader test cases without changing unrelated behavior.Source: Coding guidelines
🤖 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.
Nitpick comments:
In `@src/screens/DestinationAgent/AgentHeader.test.tsx`:
- Around line 15-18: Update the translation mock used by the AgentHeader tests
so short-key selection coverage remains intact, and add regression tests that
assert the actual English and Japanese values for “Reset” and “リセット” rather than
returning keys unchanged. Use the existing translation symbols and AgentHeader
test cases without changing unrelated behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ae38f27f-1500-4e2c-8751-af52769f89b7
📒 Files selected for processing (4)
assets/translations/en.jsonassets/translations/ja.jsonsrc/screens/DestinationAgent/AgentHeader.test.tsxsrc/screens/DestinationAgent/AgentHeader.tsx
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.
概要
Figma の AI 画面デザインでは、スマートフォンの画面幅を考慮してヘッダーのリセットボタンが主語を省略した「リセット」表記になっています。一方でアプリの実装は「会話をリセット」のままでデザインと乖離していたため、ボタンの表示文言をデザインに追従させます。
幅の制約を受けるのはヘッダーボタンだけなので、既存キー
destinationAgentResetを書き換えるのではなく短縮ラベル用のキーを追加し、表示テキストのみを差し替えています。読み上げ(accessibilityLabel)と確認ダイアログのタイトルは、主語のある「会話をリセット」のほうが操作対象が明確なため従来どおりです。accessibilityLabel変更の種類
変更内容
assets/translations/ja.json/assets/translations/en.json: 短縮ラベル用キーdestinationAgentResetShort(リセット/Reset)を追加src/screens/DestinationAgent/AgentHeader.tsx: リセットボタンの表示テキストをdestinationAgentResetShortに差し替え(accessibilityLabelはdestinationAgentResetを維持)src/screens/DestinationAgent/AgentHeader.tsx: ヘッダー左右のflexによるタイトル中央揃えのコメントから、実態と合わなくなった「リセット約100pt」という具体値の記述を削除src/screens/DestinationAgent/AgentHeader.test.tsx: 新規追加。表示は短縮ラベル・読み上げは省略前の文言・showResetによる表示制御・onReset/onBackの発火を検証ヘッダーのタイトル中央揃えは左右を同じ
flexにして幅差を吸収する実装のままなので、ボタンが短くなってもタイトルの中央位置は維持されます。@expo/vector-iconsはフォントの非同期読み込みでact警告を出すため、追加したテスト内に限りモックしています。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること実行結果:
npm run lint:Checked 598 files/ エラーなしnpm test: 197 suites / 2115 tests すべてパスnpm run typecheck: エラーなしリグレッションリスクは低いと判断しています。変更対象は AI 画面ヘッダーの表示文言 1 箇所と翻訳キーの追加のみで、既存キー
destinationAgentResetの値・参照箇所(読み上げ・確認ダイアログ)には手を入れていません。想定される影響範囲は「ヘッダーのリセットボタンの表示幅が縮む」ことのみで、ヘッダーのレイアウトは幅差を吸収するflex構成のため崩れません。関連Issue
スクリーンショット(任意)
作業環境にシミュレータ/エミュレータが無く実機確認を行えていないため未添付です。マージ前に実端末での見た目確認をお願いします。
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kj166shvxxZxckJGg5adfx
Generated by Claude Code
Summary by CodeRabbit