Skip to content

ライセンス画面に公共交通オープンデータ関連4事業者のライセンス表記を追加し、未使用のRxJSを削除 - #6361

Merged
TinyKitten merged 4 commits into
devfrom
feature/add-odpt-license-entries
Jul 5, 2026
Merged

TinyKitten merged 4 commits into
devfrom
feature/add-odpt-license-entries

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jul 5, 2026 •

Copy link
Copy Markdown
Member

概要

ライセンス画面に、公共交通オープンデータセンター(ODPT)経由で利用しているデータの出典として京都市交通局・横浜市交通局・西武バス・函館市企業局交通部のライセンス表記を追加しました。あわせて、コードから参照されなくなっていた RxJS を依存関係とライセンス表記の両方から削除しました。

変更の種類

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

変更内容

  • ライセンス画面に以下の4項目を追加
    • 京都市交通局・横浜市交通局・西武バス — 公共交通オープンデータ基本ライセンス
    • 函館市企業局交通部 — GTFS (公共交通オープンデータセンター)
  • 各項目に licenseUrl を明示的に持たせ、タップ時のアクションシートからライセンス本文ページを開けるようにした
    • 京都市・横浜市・西武バス: 公共交通オープンデータ基本ライセンス(developer.odpt.org)
    • 函館市企業局交通部: GTFSデータ利用規約 GTFS-RUL(ODPT)(ckan.odpt.org の函館市電データセットが指定するライセンス)
  • 翻訳済み表示文字列の部分一致でライセンスを判定していた getLicenseInfo を廃止(翻訳文言の変更でライセンスリンクが静かに壊れる構造を解消。アクションシートのラベルは常に画面表示と同じライセンス表記に統一)
  • 値がどこからも参照されない恒等マップ LICENSE_MAP を LicenseId union 型に置き換え
  • ja.json / en.json に事業者名とライセンス表記の翻訳キーを追加
  • どこからも import されていない rxjs を package.json から削除し、ライセンス画面の RxJS 項目も削除

テスト

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

関連Issue

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

Summary by CodeRabbit

  • New Features

    • ライセンス画面で、項目ごとに詳細ページへ直接アクセスできるようになりました。
    • 日本語・英語の表示文言に、自治体や交通事業者名、ライセンス/データ種別の新しい表記が追加されました。
  • 改善

    • ライセンス項目の表示と遷移がより安定し、正しい詳細情報を開きやすくなりました。

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

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 48 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1161bacc-4aea-4110-96cf-6c7819fe5591

📥 Commits

Reviewing files that changed from the base of the PR and between 1d5a99f and a10b43d.

📒 Files selected for processing (1)
  • src/screens/Licenses.tsx
📝 Walkthrough

Walkthrough

Licenses.tsx で LICENSE_MAP/getLicenseInfo による文字列解析ベースのURL解決を廃止し、LicenseItem に licenseUrl を直接付与する方式へ変更しました。en.json/ja.json にライセンス関連の翻訳キーを追加し、package.json から rxjs 依存を削除しました。

Changes

ライセンス画面のURL直指定化

Layer / File(s) Summary
LicenseItem型定義とURL定数の追加
src/screens/Licenses.tsx
LicenseId ユニオン型を導入し、LicenseItem に licenseUrl?: string を追加、ODPT/GTFS-RUL のURL定数を定義。
ライセンス項目データへのURL付与
src/screens/Licenses.tsx
京都市/横浜市/西武バス/函館市電などODPT/GTFS系、CC BY、Apache、MITの各エントリに licenseUrl を明示的に設定。
押下時挙動とURL遷移処理の更新
src/screens/Licenses.tsx
handlePressLicenseItem の条件分岐と Linking.openURL の対象値を licenseUrl ベースに変更。

翻訳キー追加と依存関係整理

Layer / File(s) Summary
翻訳ファイルへの新規キー追加
assets/translations/en.json, assets/translations/ja.json
京都市交通局・横浜市交通局・西武バス・函館市企業局交通部・ODPT基本ライセンス・GTFS表記の翻訳キーを6件ずつ追加。
rxjs依存の削除
package.json
dependencies から rxjs (^7.3.0) を削除。

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant LicensesScreen
  participant ActionSheet
  participant Linking

  User->>LicensesScreen: ライセンス項目をタップ
  LicensesScreen->>LicensesScreen: item.license と item.licenseUrl を確認
  LicensesScreen->>ActionSheet: アクションシートを表示
  User->>ActionSheet: 遷移先を選択
  ActionSheet->>Linking: openURL(item.href または item.licenseUrl)
Loading

Poem

ぴょんと跳ねて URL 見つけたよ 🐇
文字列探すの もうやめた
licenseUrl に すぐ飛べる
京都も横浜も 函館も
みんな仲良く リンク先へ ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed ライセンス画面の表記追加と未使用RxJS削除という主要変更を適切に要約しています。
Description check ✅ Passed 必須セクションが揃っており、変更内容とテストも記載されているため十分に具体的です。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-odpt-license-entries

Comment @coderabbitai help to get the list of available commands.

@TinyKitten

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/screens/Licenses.tsx`:
- Around line 34-42: `LicenseItem` currently allows `license` and `licenseUrl`
to be set independently, so `handlePressLicenseItem` can silently skip the
license sheet when only one is present. Refactor `LicenseItem` in `Licenses.tsx`
to a discriminated union (or equivalent) that requires `license` and
`licenseUrl` together, and update any `LicenseItem` definitions/usages so
entries with license data must provide both fields while plain entries omit
both.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: e767d5d8-616e-45af-a81d-f74dca82b982

📥 Commits

Reviewing files that changed from the base of the PR and between a6f6cba and 1d5a99f.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • assets/translations/en.json
  • assets/translations/ja.json
  • package.json
  • src/screens/Licenses.tsx
💤 Files with no reviewable changes (1)
  • package.json

Comment thread src/screens/Licenses.tsx Resolved
@TinyKitten

Copy link
Copy Markdown
Member Author

Fixes Applied Successfully

Fixed 1 file(s) based on 1 CodeRabbit feedback item(s).

Files modified:

  • src/screens/Licenses.tsx — LicenseItem の license / licenseUrl を判別ユニオン型にし、片方だけ設定する不整合をコンパイル時に検出できるようにした

Commit: a10b43d7a

Validation: npx biome check ✓ / npm run typecheck ✓ / Jest 185 suites, 1958 tests ✓

The latest autofix changes are on the feature/add-odpt-license-entries branch.

@TinyKitten
TinyKitten merged commit 0a8b517 into dev Jul 5, 2026
0 of 5 checks passed
@TinyKitten
TinyKitten deleted the feature/add-odpt-license-entries branch July 5, 2026 12:41
@TinyKitten TinyKitten mentioned this pull request Jul 5, 2026
5 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