Skip to content

駅数制限の環境変数を定数に置き換え - #6300

Merged
TinyKitten merged 2 commits into
devfrom
chore/remove-station-limit-env-vars
Jun 21, 2026
Merged

TinyKitten merged 2 commits into
devfrom
chore/remove-station-limit-env-vars

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jun 21, 2026 •

Copy link
Copy Markdown
Member

概要

NEARBY_STATIONS_LIMIT と SEARCH_STATION_RESULT_LIMIT の環境変数を削除し、コード内の定数に置き換え。不要な TECHNICAL_DEBT.md を削除

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

  • .env.example から NEARBY_STATIONS_LIMIT / SEARCH_STATION_RESULT_LIMIT を削除
  • react-native-dotenv の型宣言から両変数を削除
  • StationSearchModal の NEARBY_STATIONS_LIMIT 参照をリテラル 10 に置換
  • RouteSearchScreen の SEARCH_STATION_RESULT_LIMIT をファイルローカル定数 100 に置換し、Number.parseInt を除去
  • 不要な TECHNICAL_DEBT.md を削除

テスト

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

関連Issue

スクリーンショット(任意)

Summary by CodeRabbit

  • Chores

    • 環境変数の定義と配置を整理し、不必要な設定項目を削除しました。
    • テクニカルデブト関連ドキュメントを整理・削除しました。
  • Refactor

    • 駅検索機能の最大結果件数が環境変数から100件の固定値に変更されました。
    • 近隣駅の最大検索件数が環境変数から10件の固定値に変更されました。

@TinyKitten TinyKitten self-assigned this Jun 21, 2026
@github-actions github-actions Bot added the react label Jun 21, 2026
@coderabbitai

coderabbitai Bot commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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: f6d724f4-85ff-478a-b3c3-759c94adfab1

📥 Commits

Reviewing files that changed from the base of the PR and between e763bc1 and 3ce99b0.

📒 Files selected for processing (5)
  • .env.example
  • TECHNICAL_DEBT.md
  • src/@types/react-native-dotenv.d.ts
  • src/components/StationSearchModal.tsx
  • src/screens/RouteSearchScreen.tsx
💤 Files with no reviewable changes (3)
  • TECHNICAL_DEBT.md
  • .env.example
  • src/@types/react-native-dotenv.d.ts

📝 Walkthrough

Walkthrough

NEARBY_STATIONS_LIMIT と SEARCH_STATION_RESULT_LIMIT を環境変数から固定定数(各 10 / 100)へ変更。型定義と .env.example から両変数を削除し、StationSearchModal と RouteSearchScreen の利用箇所を更新した。あわせて TECHNICAL_DEBT.md を全削除した。

Changes

リミット値のハードコード化

Layer / File(s) Summary
型定義と env.example からの環境変数削除
src/@types/react-native-dotenv.d.ts, .env.example
react-native-dotenv の型定義と .env.example から NEARBY_STATIONS_LIMIT / SEARCH_STATION_RESULT_LIMIT を削除した。
StationSearchModal の limit 固定値化
src/components/StationSearchModal.tsx
NEARBY_STATIONS_LIMIT の import を削除し、近隣駅取得クエリの variables.limit を固定値 10 に変更した。
RouteSearchScreen の limit 固定値化
src/screens/RouteSearchScreen.tsx
SEARCH_STATION_RESULT_LIMIT をローカル定数 100 として再定義し、fetchByName の variables.limit と fetchRouteTypes の variables.pageSize への渡し方を parseInt から直接定数参照に変更した。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐇 ふわふわの耳でチェック完了!
環境変数はもういらない
10 と 100、決め打ちでぴょん
.env からこっそり消えて
コードはすっきり、うさぎも満足 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PRのタイトルは環境変数を定数に置き換えるという主要な変更を簡潔に説明しており、変更内容に完全に関連している。
Description check ✅ Passed PR説明は必須セクション(概要・変更の種類・変更内容・テスト)をすべて記入しており、変更内容も詳細に説明されている。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 chore/remove-station-limit-env-vars

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 @coderabbitai help to get the list of available commands and usage tips.

@TinyKitten
TinyKitten merged commit 99e3530 into dev Jun 21, 2026
4 checks passed
@TinyKitten
TinyKitten deleted the chore/remove-station-limit-env-vars branch June 21, 2026 22:14
@TinyKitten TinyKitten mentioned this pull request Jun 21, 2026
6 of 9 tasks
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