ETA実装LineBoardの最後尾ドット右隣に残り分数の単位(分/min./분)を表示#6428
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E8ZY7TtPKrZtovHbUCHv7b
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E8ZY7TtPKrZtovHbUCHv7b
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E8ZY7TtPKrZtovHbUCHv7b
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E8ZY7TtPKrZtovHbUCHv7b
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 42 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughETA表示に言語別の単位ラベルを追加し、終端駅かつETAが存在する場合だけ表示するよう各LineBoardとLineDotを更新しました。日本語・英語・韓国語などの表示と、終端駅判定のテストも追加しています。 ChangesETA単位ラベル表示
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant LineBoard
participant LineDot
participant headerStateAtom
participant EstimatedMinutesUnitLabel
LineBoard->>LineDot: 駅情報、ETA、isLastを渡す
LineDot->>EstimatedMinutesUnitLabel: 終端駅のETA単位を描画
EstimatedMinutesUnitLabel->>headerStateAtom: 言語状態を購読
headerStateAtom-->>EstimatedMinutesUnitLabel: 分 / min. / 분を返却
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E8ZY7TtPKrZtovHbUCHv7b
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In
`@src/components/LineBoard/shared/components/EstimatedMinutesUnitLabel.test.tsx`:
- Around line 22-50: EstimatedMinutesUnitLabel のテストスイートに afterEach
フックを追加し、各テスト終了後に jest.clearAllMocks() を呼び出してモックの呼び出し履歴をリセットしてください。
🪄 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: acba4eb3-0d69-46b3-bfb1-54fee7f1b540
📒 Files selected for processing (15)
src/components/LineBoard/shared/components/EstimatedMinutesUnitLabel.test.tsxsrc/components/LineBoard/shared/components/EstimatedMinutesUnitLabel.tsxsrc/components/LineBoard/shared/components/LineDot.test.tsxsrc/components/LineBoard/shared/components/LineDot.tsxsrc/components/LineBoard/shared/components/index.tssrc/components/LineBoardE231.test.tsxsrc/components/LineBoardE231.tsxsrc/components/LineBoardEast.test.tsxsrc/components/LineBoardEast.tsxsrc/components/LineBoardJO.test.tsxsrc/components/LineBoardJO.tsxsrc/components/LineBoardJRKyushu.test.tsxsrc/components/LineBoardJRKyushu.tsxsrc/components/LineBoardSaikyo.tsxsrc/components/LineBoardToei.tsx
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E8ZY7TtPKrZtovHbUCHv7b
概要
ETA(残り分数)を実装しているLineBoardで、最後尾の駅ドットの右隣に単位ラベルを表示するようにした。単位はヘッダーの言語Stateに追従し、日本語・かな・中国語では「分」、英語では「min.」、韓国語では「분」を表示する。
変更の種類
変更内容
EstimatedMinutesUnitLabelを新設。ヘッダー言語Stateから単位文字列(分 / min. / 분)を導出するderived atomを購読し、単位が実際に変わったときだけ再レンダーされるようにしたLineDotにisLastプロパティを追加し、最後尾セルかつETA数字表示中のみドット右隣へ単位ラベルを描画(LineBoardEast / LineBoardSaikyo / LineBoardToei / LineBoardJRKyushu が対象)補足: LineBoardYamanotePad(PadArch)もETAを実装しているが、アーチ状レイアウトでドット右隣に駅名が配置されており衝突するため今回は対象外とした。小田急テーマ(LineBoardEastの
isOdakyu)はETA自体が対象外のため表示されない。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
スクリーンショット(任意)