Skip to content

AI画面のリセットボタン表示をFigmaに合わせて主語を省略 - #6490

Merged
TinyKitten merged 1 commit into
devfrom
claude/ai-screen-reset-label-b53nut
Jul 29, 2026
Merged

TinyKitten merged 1 commit into
devfrom
claude/ai-screen-reset-label-b53nut

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jul 29, 2026 •

Copy link
Copy Markdown
Member

概要

Figma の AI 画面デザインでは、スマートフォンの画面幅を考慮してヘッダーのリセットボタンが主語を省略した「リセット」表記になっています。一方でアプリの実装は「会話をリセット」のままでデザインと乖離していたため、ボタンの表示文言をデザインに追従させます。

幅の制約を受けるのはヘッダーボタンだけなので、既存キー destinationAgentReset を書き換えるのではなく短縮ラベル用のキーを追加し、表示テキストのみを差し替えています。読み上げ(accessibilityLabel)と確認ダイアログのタイトルは、主語のある「会話をリセット」のほうが操作対象が明確なため従来どおりです。

箇所 変更前 変更後
ヘッダーボタンの表示 会話をリセット / Reset conversation リセット / Reset
ボタンの accessibilityLabel 会話をリセット 会話をリセット(変更なし)
リセット確認ダイアログのタイトル 会話をリセット 会話をリセット(変更なし)

変更の種類

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

変更内容

  • 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

  • 改善
    • AIチャットのリセットボタンに、画面上で見やすい短いラベル(「Reset」/「リセット」)を追加しました。
    • 読み上げ時は従来どおり、操作内容が分かる「会話をリセット」相当の説明が提供されます。

@TinyKitten TinyKitten self-assigned this Jul 29, 2026
@github-actions github-actions Bot added the react label Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

AgentHeaderのリセットボタン表示を短縮ラベルへ変更し、英語・日本語の翻訳キーと表示・アクセシビリティ・操作に関するテストを追加しました。

Changes

リセットラベル表示

Layer / File(s) Summary
短縮翻訳キーとヘッダー表示
assets/translations/en.json, assets/translations/ja.json, src/screens/DestinationAgent/AgentHeader.tsx, src/screens/DestinationAgent/AgentHeader.test.tsx
英語「Reset」と日本語「リセット」の短縮キーを追加し、ボタン表示に使用します。アクセシビリティラベルは従来のキーを維持し、表示条件と各ボタンのコールバックをテストします。

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

Possibly related PRs

Poem

ぴょんと短く「リセット」表示、
英語も日本語もすっきり跳ねる。
読み上げラベルはそのままに、
テストがボタンを見守れば、
うさぎも安心、耳ぴんぴん。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Figmaに合わせてAI画面のリセットボタン表示を短縮する変更を端的に示しており、内容と一致しています。
Description check ✅ Passed 概要・変更種別・変更内容・テストが揃っており、テンプレート要件をほぼ満たしています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/ai-screen-reset-label-b53nut

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.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between a2bfaf7 and 04407d1.

📒 Files selected for processing (4)
  • assets/translations/en.json
  • assets/translations/ja.json
  • src/screens/DestinationAgent/AgentHeader.test.tsx
  • src/screens/DestinationAgent/AgentHeader.tsx

@TinyKitten
TinyKitten merged commit b4aee69 into dev Jul 29, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the claude/ai-screen-reset-label-b53nut branch July 29, 2026 23:52
@TinyKitten TinyKitten mentioned this pull request Jul 31, 2026
5 of 9 tasks
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.

2 participants