Repository navigation
connectedRoutesの区間に通過駅を含む駅グループIDの並びを追加 - #1690
Conversation
Co-Authored-By: Claude Opus 5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (7)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. 📝 WalkthroughWalkthrough
Changes駅グループ経路情報
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant RouteQuery
participant JourneyLeg
participant RouteLeg
participant GraphQL
RouteQuery->>JourneyLeg: station_group_idsを取得
JourneyLeg->>RouteLeg: station_group_idsを設定
RouteLeg->>GraphQL: stationGroupIdsへ変換
Merge Risk: ⚪ Minimal · up to この変更は経路区間に駅グループ列を追加するもので、既存クライアントへの影響はなく、マージ可能です。 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. うさぎは駅グループを数える Comment |
概要
connectedRoutesのRouteLegにstationGroupIds: [Int!]を追加しました。乗車駅から降車駅までの駅グループ ID を進行順に並べたもので、通過駅も含みます。探索結果 (JourneyLeg.station_group_ids) をそのまま返します。アプリはこの並びに沿って、区間ごとに選んだ種別(既定は各停)の駅リストから駅を拾います。これでアプリ側の弧の選び方(
LOOP_LINE_IDSと駅数の比較)が要らなくなります。変更の種類
変更内容
schema/public.graphql/src/graphql/types.rs:RouteLeg.stationGroupIds: [Int!]を追加(フィールドの追加だけなので、既存クライアントに影響はありません)stationapi/src/model.rs:model::RouteLegにstation_group_ids: Vec<u32>を追加stationapi/src/use_case/interactor/query.rs:get_connected_routesで探索結果の並びを渡すようにした(追加の引き当ては無く、計算量は変わりません)src/repository.rs: 実データのテストを追加。各区間の並びが 2 駅以上あり、先頭がfromStation.groupId、末尾がtoStation.groupIdと一致することを確かめますdocs/architecture.md/AGENTS.md: 駅 ID ではなく駅グループ ID にした理由(アプリが選ぶ種別は、探索で使った系統とは別の路線を走ることがある)と、同じ駅グループが 2 回出る系統(大江戸線の都庁前)の扱いを追記駅 ID は路線ごとに違いますが、駅グループ ID ならどの種別の駅リストとも突き合わせられます。同じ駅グループが 2 回出る系統では、直前に拾った駅に隣り合うほうを選んでもらう前提です。
テスト
make fmtが通ることmake clippyが通ること(wasm32 ターゲットを含む)make testが通ることmake clippy: 新しい警告はありません(出ているのはgenerated/が無いときの build.rs の案内だけ)make test: 全件成功(stationapi 422 件、stationapi-worker 19 件ほか)ローカルは
generated/が無くdata/*.csvにフォールバックした状態で確かめました。make schema(起動した Worker の SDL との差分)は CI に任せています関連Issue
スクリーンショット(任意)
🤖 Generated with Claude Code
Summary by CodeRabbit
connectedRoutesの各区間で、乗車駅から降車駅までの駅グループID一覧を取得できるようになりました。