Repository navigation
縦画面向けのナンバリング改修 - #4892
縦画面向けのナンバリング改修#4892
Conversation
📝 Walkthrough概要複数のコンポーネントに 変更内容
推定レビュー工数🎯 2 (Simple) | ⏱️ ~12分 関連する可能性のある PR
ポエム
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (9)src/{components,screens}/**/*.tsx📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx,json}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx,py,java,go,cs}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,ts,tsx,jsx,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{tsx,ts}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,ts,tsx,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (5)📓 Common learnings📚 Learning: 2026-01-02T09:13:09.701ZApplied to files:
📚 Learning: 2025-07-18T11:04:45.459ZApplied to files:
📚 Learning: 2025-05-19T10:59:37.813ZApplied to files:
📚 Learning: 2025-11-03T12:13:46.409ZApplied to files:
🧬 Code graph analysis (2)src/components/Transfers.tsx (1)
src/components/TransfersYamanote.tsx (1)
🔇 Additional comments (2)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/components/TrainTypeListModal.tsx (1)
170-170: 不要な null 合体演算子(重複)Line 154 と同様に、
?? undefinedは不要です。
🧹 Nitpick comments (1)
src/components/TrainTypeListModal.tsx (1)
154-154: 不要な null 合体演算子
line.stationは既にStation | null | undefined型で、targetStationプロパティはStation | undefinedを受け入れるため、?? undefinedは不要です。TypeScript が自動的に null を処理します。🔎 提案される修正
- targetStation={line.station ?? undefined} + targetStation={line.station ?? undefined}または単に:
- targetStation={line.station ?? undefined} + targetStation={line.station}
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
src/components/CommonCard.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/NumberingIconSquare.tsxsrc/components/StationSearchModal.tsxsrc/components/TrainTypeListModal.tsxsrc/components/TransferLineMark.tsxsrc/screens/RouteSearchScreen.tsxsrc/screens/SelectLineScreen.tsx
🧰 Additional context used
📓 Path-based instructions (9)
src/{components,screens}/**/*.tsx
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Component files should use PascalCase naming (e.g.,
StationBanner.tsx)
Files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
**/*.{ts,tsx,js,jsx,json}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use Biome as the formatter for all code files
Files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx,js,jsx}: Use Biome as the linter for all code files
Use// biome-ignoreonly for true compatibility issues and include an inline reason
Files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
**/*.{ts,tsx,js,jsx,py,java,go,cs}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx,js,jsx,py,java,go,cs}: Use descriptive names for agents that clearly indicate their purpose and domain
Implement agents with well-defined input/output contracts to ensure clear communication
Document agent responsibilities and expected behaviors in comments or docstrings
Use composition and dependency injection for agent collaboration rather than tight coupling
Implement error handling and graceful degradation in agents to improve system resilience
Files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
**/*
📄 CodeRabbit inference engine (AGENTS.md)
Use UTF-8 encoding, two-space indentation, single quotes, and ES5 trailing commas as enforced by
.editorconfig.
Files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
**/*.{js,ts,tsx,jsx,json}
📄 CodeRabbit inference engine (AGENTS.md)
Biome is authoritative for linting; avoid
// biome-ignoreunless a rule is truly incompatible and document the rationale inline.
Files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
**/*.{tsx,ts}
📄 CodeRabbit inference engine (AGENTS.md)
Name components with PascalCase (e.g.,
StationBanner.tsx).
Files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Name hooks with
use*prefix (e.g.,useStationFeed.ts).
Files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
**/*.{js,ts,tsx,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Keep comments purposeful: explain intent or non-obvious constraints, not obvious mechanics.
Files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
🧠 Learnings (8)
📓 Common learnings
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 0
File: :0-0
Timestamp: 2025-08-11T21:13:39.083Z
Learning: TinyKitten prefers concise code reviews for the TrainLCD/MobileApp repository. Keep review comments brief and to the point.
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4448
File: functions/src/funcs/tts.ts:214-232
Timestamp: 2025-08-11T20:23:23.071Z
Learning: PR #4448 in TrainLCD/MobileApp is specifically about AI feedback summarization and labeling functionality, not about TTS (Text-to-Speech) improvements. The TTS code changes appear to be part of a modularization refactoring but are not the focus of this PR.
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4595
File: src/components/LineBoardEast.tsx:497-504
Timestamp: 2025-11-03T12:13:46.409Z
Learning: In TrainLCD/MobileApp LineBoard components (LineBoardEast, LineBoardWest, LineBoardSaikyo, LineBoardToei, LineBoardJRKyushu), the correct implementation pattern is to apply the dynamic width (dim.width / 9) to the outer stationNameContainer View, as implemented in LineBoardEast, not to the inner wrapper View.
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4249
File: __tests__/hooks/useTelemetrySender.enabled.test.tsx:54-68
Timestamp: 2025-05-07T23:04:31.413Z
Learning: TinyKitten is working on implementing a queue for movement logs in the TrainLCD mobile app, but realized the implementation differed from their original intention.
Learnt from: CR
Repo: TrainLCD/MobileApp PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T03:10:26.328Z
Learning: Code review and feedback should be provided in Japanese
📚 Learning: 2025-05-19T10:59:37.813Z
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4286
File: src/components/HeaderLED.tsx:5-10
Timestamp: 2025-05-19T10:59:37.813Z
Learning: The hooks useCurrentStation, useNextStation, useIsNextLastStop, and useNumbering are properly exported in src/hooks/index.ts, allowing them to be imported from '../hooks' in src/components/HeaderLED.tsx as implemented in PR #4286.
Applied to files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
📚 Learning: 2025-12-20T09:29:40.164Z
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4758
File: src/components/TypeChangeNotify.tsx:663-672
Timestamp: 2025-12-20T09:29:40.164Z
Learning: In TrainLCD/MobileApp TypeChangeNotify component (src/components/TypeChangeNotify.tsx), the centerCircle size differences across themes (MetroBars, SaikyoBars, JOBars) are intentional design decisions. JOBars uses larger non-tablet dimensions (32x32, borderRadius 16) compared to the base style (24x24, borderRadius 15) to maintain theme-specific visual identity.
Applied to files:
src/components/NumberingIconSquare.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/components/NumberingIconOdakyu.tsxsrc/components/NumberingIconRound.tsxsrc/components/CommonCard.tsx
📚 Learning: 2026-01-02T09:13:09.701Z
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4890
File: src/components/LineBoard.tsx:41-50
Timestamp: 2026-01-02T09:13:09.701Z
Learning: In LineBoard.tsx for bus lines (TransportType.Bus), only the `nameRoman` field requires parentheses removal via `parenthesisRegexp.replace()`. Other language fields (name, nameKatakana, nameChinese, nameKorean) should remain unchanged in the slicedLeftStations mapping.
Applied to files:
src/components/NumberingIconSquare.tsxsrc/screens/SelectLineScreen.tsxsrc/components/TransferLineMark.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
📚 Learning: 2025-11-25T03:10:26.328Z
Learnt from: CR
Repo: TrainLCD/MobileApp PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T03:10:26.328Z
Learning: Applies to src/{components,screens}/**/*.tsx : Component files should use PascalCase naming (e.g., `StationBanner.tsx`)
Applied to files:
src/screens/SelectLineScreen.tsxsrc/components/TrainTypeListModal.tsxsrc/screens/RouteSearchScreen.tsxsrc/components/StationSearchModal.tsxsrc/components/CommonCard.tsx
📚 Learning: 2025-11-03T12:13:46.409Z
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4595
File: src/components/LineBoardEast.tsx:497-504
Timestamp: 2025-11-03T12:13:46.409Z
Learning: In TrainLCD/MobileApp LineBoard components (LineBoardEast, LineBoardWest, LineBoardSaikyo, LineBoardToei, LineBoardJRKyushu), the correct implementation pattern is to apply the dynamic width (dim.width / 9) to the outer stationNameContainer View, as implemented in LineBoardEast, not to the inner wrapper View.
Applied to files:
src/components/TrainTypeListModal.tsxsrc/components/CommonCard.tsx
📚 Learning: 2025-06-18T17:29:46.085Z
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4359
File: src/components/TrainTypeList.tsx:1-1
Timestamp: 2025-06-18T17:29:46.085Z
Learning: When analyzing React import changes in TypeScript/JavaScript files, carefully verify that React.Fragment, React.createElement, or other React namespace usages actually exist in the code before flagging them as issues. Don't assume React.Fragment is used just because the default React import was removed.
Applied to files:
src/components/CommonCard.tsx
📚 Learning: 2025-07-18T11:04:45.459Z
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4396
File: src/components/TrainTypeBoxJRKyushu.tsx:176-183
Timestamp: 2025-07-18T11:04:45.459Z
Learning: TrainTypeBoxJRKyushuコンポーネントでは、trainTypeNameとprevTrainTypeNameは常に文字列となるため、.split()メソッドを使用する際のnull安全性チェックは不要である。これらの変数はuseMemoとuseLazyPreviousを通じて管理され、translate()関数からのフォールバック値により常に文字列が保証される。
Applied to files:
src/components/CommonCard.tsx
🧬 Code graph analysis (1)
src/components/CommonCard.tsx (1)
src/constants/numbering.ts (2)
MARK_SHAPE(1-37)NUMBERING_ICON_SIZE(39-43)
🔇 Additional comments (13)
src/components/NumberingIconOdakyu.tsx (1)
35-35: LGTM!iOS向けのmarginTop調整により、縦画面でのナンバリング表示が改善されます。
src/screens/SelectLineScreen.tsx (1)
653-653: LGTM!
targetStationpropの追加により、CommonCardがより文脈に応じたレンダリング(バス路線対応など)が可能になります。src/screens/RouteSearchScreen.tsx (1)
297-297: LGTM!検索結果の駅を
targetStationとしてCommonCardに渡すことで、より適切なレンダリングが可能になります。src/components/NumberingIconSquare.tsx (1)
83-83: これは意図的な設計です。コンポーネントの形状により色値が異なります。ナンバリングアイコンコンポーネントの色値の違いは意図的な設計です。Square形状のコンポーネント(NumberingIconSquare.tsx)は
#231e1f、Round形状のコンポーネント(NumberingIconRound.tsx、NumberingIconRoundHorizontal.tsx、NumberingIconOdakyu.txzなど)は#221714を使用しており、コンポーネントの視覚的アイデンティティを維持する設計になっています。src/components/StationSearchModal.tsx (1)
170-170: LGTM!
targetStationプロパティの追加が正しく実装されています。src/components/TransferLineMark.tsx (2)
63-64: バス路線のシンボル抽出ロジックが適切に実装されています全角数字を削除してから最初の文字を取得する実装は、バス路線番号の表示に適しています。
196-203: LGTM!バス路線とその他の路線で
stationNumberを適切に切り替えています。src/components/CommonCard.tsx (6)
7-9: LGTM!必要なインポートが適切に追加されています。
19-19: LGTM!
targetStationプロパティの追加により、駅固有のナンバリング情報を渡せるようになっています。
56-61: LGTM!マークなしの場合のスタイルが適切に定義されています。スケール変換は既存パターンと一致しています。
169-169: LGTM!バス路線の判定ロジックが明確です。
195-199: 可読性の向上
titleOrLineNameをブロック形式のuseMemoに変更したことで、コードが読みやすくなっています。
247-263: 空文字列では「-00」フォールバックは発動しませんレビューコメントの懸念について検証しました。実際には、
targetStationNumberが undefined の場合、CommonCard は空文字列''を TransferLineMark に渡します(line 258)。TransferLineMark のフォールバック(line 196-203)はstationNumber ?? fallbackで、nullish coalescing 演算子(??)は null または undefined のみ をチェックするため、空文字列''に対しては発動しません。つまり、'' ?? '-00'は''を返し、'-00'は表示されません。
Summary by CodeRabbit
リリースノート
バグ修正
新機能
スタイル
✏️ Tip: You can customize this high-level summary in your review settings.