Skip to content

TransferLineMarkにrecyclingKeyを追加してAndroidの画像誤表示を修正#5804

Merged
TinyKitten merged 2 commits intodevfrom
feature/fix-transfer-line-mark-android-recycling
Apr 11, 2026
Merged

TransferLineMarkにrecyclingKeyを追加してAndroidの画像誤表示を修正#5804
TinyKitten merged 2 commits intodevfrom
feature/fix-transfer-line-mark-android-recycling

Conversation

@TinyKitten
Copy link
Copy Markdown
Member

@TinyKitten TinyKitten commented Apr 11, 2026

Summary

  • Android の FlatList でビューが使い回される際、expo-image が前の路線の画像(例: 千代田線)をそのまま表示し続けて、都営新宿線など別路線のアイコンが誤って表示される不具合を修正。
  • TransferLineMark.tsx<Image>recyclingKeyline.id ベース、フォールバックは mark.sign)を追加し、リサイクル時にソースを確実に無効化するようにした。
  • Transfersの乗換路線画像がAndroidで別路線のwebpになる問題を修正 #5795removeClippedSubviews を外したが根治に至らんかったため、ThemeConfirmModal.tsx:169 と同じ recyclingKey パターンで本丸を叩く対応。

Regression risk

  • TransferLineMark を使っとる他の画面(Transfers 以外にも PadLineMarks / HeaderJRWest / CommonCard など)にも影響するが、recyclingKey はリスト外でも副作用なしで安全。
  • line.idnull の場合は mark.sign にフォールバックするため、キーが完全に欠ける事態は避けている。

Test plan

  • Android 実機で乗換表示を開き、都営新宿線などのアイコンが正しく表示されるか確認
  • スクロールを往復しても路線アイコンが入れ替わらないか確認
  • iOS でも回帰がないかざっくり確認
  • npx biome check --unsafe --fix ./src
  • npx tsc --noEmit
  • CodeRabbit review(指摘なし)

🤖 Generated with Claude Code

Summary by CodeRabbit

リリースノート

  • Refactor
    • 画像の再利用キーを導入し、転送ラインの画像レンダリングで描画の再利用性とパフォーマンスを改善しました。

@github-actions github-actions bot added the react label Apr 11, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2026

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: 02708908-e921-41f8-a4b1-52e297c66f94

📥 Commits

Reviewing files that changed from the base of the PR and between f7e9249 and 5a00912.

📒 Files selected for processing (1)
  • src/components/TransferLineMark.tsx

📝 Walkthrough

Walkthrough

TransferLineMark.tsxにて、line?.idを起点とするrecyclingKeyが導入され、btUnionSignPathsおよびsignPathを描画するImageコンポーネントにそのrecyclingKeyが渡されるようになりました(NumberingIconブランチは変更なし)。

Changes

Cohort / File(s) Summary
Image 要素のリサイクルキー導入
src/components/TransferLineMark.tsx
recyclingKeyを追加。値は line?.idmark.signmark.btUnionSignPaths?.[0] / mark.signPath'unknown-mark' の順でフォールバックし、btUnionSignPaths && !stationNumbersignPath && !stationNumberImage コンポーネントに渡されるように変更。NumberingIcon ブランチは変更なし。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

react

Poem

🐰 キーを握る小さな手
line の名で舞い戻るよ
マークが変わらぬように
イメージは静かに再利用される
ぴょんと祝福、ささやかな更新

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PRのタイトルは、TransferLineMarkコンポーネントにrecyclingKeyを追加してAndroidの画像誤表示を修正するという主要な変更内容を明確に示しており、ファイルサマリーとも一致しています。
Description check ✅ Passed PR説明は、テンプレートの主要セクション(概要、変更内容、テスト、関連Issue)をカバーしており、具体的な問題の背景、実装の詳細、回帰リスク、テスト計画が包括的に記載されています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feature/fix-transfer-line-mark-android-recycling

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

@TinyKitten TinyKitten self-assigned this Apr 11, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@src/components/TransferLineMark.tsx`:
- Around line 167-168: recyclingKey が line?.id が null かつ mark.sign が未定義のとき null
になり、Image コンポーネントのリサイクルリセットが効かないケースがあるため、recyclingKey のフォールバックを必ず非 null
にするよう修正してください:現在の定義 (recyclingKey) を変更して最終フォールバックに画像ソース(該当する
props/変数名を使用)を含め、line?.id → mark.sign → imageSrc
の順で優先し、どれも無ければ固定文字列(例:"unknown-mark")を返すようにして Image(該当箇所: Line 181 / Line 199 の
Image)で常に一意かつ非 null な key が渡るようにしてください。
🪄 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: 940c2229-574b-47df-a573-276aaaaf4d1e

📥 Commits

Reviewing files that changed from the base of the PR and between e9c4536 and f7e9249.

📒 Files selected for processing (1)
  • src/components/TransferLineMark.tsx

@TinyKitten TinyKitten merged commit cdd0ce5 into dev Apr 11, 2026
6 checks passed
@TinyKitten TinyKitten deleted the feature/fix-transfer-line-mark-android-recycling branch April 11, 2026 01:16
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