Skip to content

AIエージェント画面の送信ボタンのレイアウト崩れとヘッダータイトルの中央ズレを修正 - #6483

Merged
TinyKitten merged 1 commit into
devfrom
fix/destination-agent-layout
Jul 29, 2026
Merged

TinyKitten merged 1 commit into
devfrom
fix/destination-agent-layout

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jul 29, 2026 •

Copy link
Copy Markdown
Member

概要

AIエージェント行き先相談画面(PoC #6475)の 2 件のレイアウト不具合を修正する。

  1. 利用上限(429)到達時などに、テキスト入力右端の送信ボタンが入力バーからずれて見えるレイアウト崩れ
  2. ヘッダータイトル「AIに行き先を相談」が設計(左右中央)に対して左にズレている問題

変更の種類

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

変更内容

  • AgentInputBar: TextInput に lineHeight: 24 と paddingVertical: 12 を明示し、1 行時の高さを送信ボタンと同じ 48pt に固定。日本語プレースホルダーがフォールバックフォントで描画されると行高が約 32pt に膨らみ、バー全体が約 60pt になって下端揃えの送信ボタン(48pt)の上に白い隙間ができていた。MAX_INPUT_HEIGHT も同じ定数から算出するよう更新し、不要になったプラットフォーム別 paddingVertical 分岐と Platform import を削除。
  • AgentHeader: 戻るボタン(44pt)と「会話をリセット」ボタン(約 100pt)の幅差でタイトルが左に寄っていたため、左右を同じ flex: 1 のラッパー View で挟む構造に変更してタイトルを画面の左右中央に配置。リセット非表示時のプレースホルダー View は不要になったため削除。

テスト

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

npx jest src/screens/DestinationAgent(6 件)もパス。視覚的な変更のため、dev ビルドでの実機確認(上限到達状態の入力バー、LED テーマ、リセットボタン非表示時のヘッダー)を推奨。

関連Issue

Refs #6475

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

Summary by CodeRabbit

  • 改善
    • ヘッダーの戻るボタン、タイトル、リセットボタンの配置を整え、タイトルが中央に保たれるよう改善しました。
    • リセットボタンが表示されない場合も、不要な空白が発生しないよう調整しました。
    • 複数行入力時の行間や余白を見直し、入力欄の高さがより安定するよう改善しました。

@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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6047658f-094b-4c20-b0e8-d1aa25d84f85

📥 Commits

Reviewing files that changed from the base of the PR and between a0940b7 and 62825f9.

📒 Files selected for processing (2)
  • src/screens/DestinationAgent/AgentHeader.tsx
  • src/screens/DestinationAgent/AgentInputBar.tsx

📝 Walkthrough

Walkthrough

DestinationAgentのヘッダー配置を左右コンテナ構造へ変更し、入力欄の行高・縦余白と最大高さ計算を定数化しました。

Changes

DestinationAgent UI

Layer / File(s) Summary
ヘッダー左右レイアウトの統一
src/screens/DestinationAgent/AgentHeader.tsx
戻るボタンとリセットボタンを左右のコンテナに配置し、リセット非表示時のプレースホルダ描画を削除しました。
入力欄の行高と高さ計算
src/screens/DestinationAgent/AgentInputBar.tsx
行高と縦余白を定数化し、入力欄の最大高さ・lineHeight・paddingVertical に適用しました。

Estimated code review effort: 3 (Moderate) | ~15 minutes

Possibly related PRs

  • TrainLCD/MobileApp#6479: 同じDestinationAgentコンポーネントの表示ロジックと入力欄スタイルを導入した変更です。

Poem

うさぎが跳ねて、左右を整え
ヘッダーの真ん中、タイトル輝く
入力の行高、ぴたりと揃い
余白も高さも、すっきり軽やか
にんじん片手に、確認完了!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 主要な変更点である送信ボタンのレイアウト崩れとヘッダータイトルの中央ズレを簡潔に示しています。
Description check ✅ Passed 必要な概要・変更種類・変更内容・テスト・関連Issueの項目が揃っており、テンプレート要件を満たしています。
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 fix/destination-agent-layout

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

@TinyKitten
TinyKitten merged commit dbcd1a0 into dev Jul 29, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the fix/destination-agent-layout branch July 29, 2026 15:30
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.

1 participant