ディープリンク sids 形式で skips パラメータによる通過駅指定を追加#6012
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughディープリンク sids 形式で通過駅を表現する skips パラメータ対応を実装。sids で指定された駅のうち、skipIndices に含まれるインデックスの駅について stopCondition を StopCondition.Not に上書きする。クエリ解析で skips を検証し、不正値時はリンク全体を no-op とする。テストで停車・通過上書きと入力検証を確認。 Changesskips パラメータによる通過駅指定機能
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
概要
#6005 案 A の実装。
sidsディープリンクと並行する新パラメータskipsを追加し、0-origin インデックスで指定した駅のstopConditionをStopCondition.Not(通過扱い)に上書きできるようにする。URL 例:
上記では
sids[1]とsids[2]が通過扱いになり、それ以外は停車扱いとなる。変更の種類
変更内容
useDeepLink.handleUrlでskipsクエリパラメータをパースし、整数・厳密昇順・範囲内(重複なし)を検証する。useDeepLink.openRouteByStationIdsにskipIndices: ReadonlySet<number> | nullを追加し、要求したstationIdsの 0-origin インデックスに対応する駅のstopConditionをStopCondition.Notに上書きする。stationIds」基準で解釈する。サーバが一部の駅を返さず除外しても、残った駅の skip 位置はずれない。skips省略時は#6002と完全に同一の挙動(全駅停車)。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
Closes #6005
スクリーンショット(任意)
Summary by CodeRabbit
リリースノート
skipsパラメータにより、経路設定時に駅の通過条件を指定できるようになりました。