Author SHA1 Message Date
harukin-expo-dev-env 7d9b6b140c Replace trainPair hardcodes with memoized timetable links 2026-10-08 00:16:26 +09:00
harukin-expo-dev-env ef9d1e2cc4 Model timetable train links and verify boundary extensions 2026-10-08 00:16:26 +09:00
harukin-expo-dev-env 355c037933 Support through-service records in train details and station readers 2026-10-08 00:12:21 +09:00
harukin-expo-dev-env 6752faf0e4 Merge commit '59a6b8ff25d159201deacfb50f564da89cf35662' into develop 2026-10-08 00:09:18 +09:00
harukin-expo-dev-env 59a6b8ff25 Keep delay badges above formation icons 2026-10-07 23:07:20 +09:00
harukin-expo-dev-env 814ba42380 Revalidate service plans on log changes with ETag 2026-10-07 21:33:20 +09:00
harukin-expo-dev-env 84322057bd Recheck service plans on each position snapshot 2026-10-07 12:56:03 +09:00
harukin-expo-dev-env 4c880f31a0 Keep large formation icons above small rear icons 2026-10-07 10:51:22 +09:00
harukin-expo-dev-env b99b0dafe5 Restore legacy endpoint layering for multiple formations 2026-10-07 10:47:28 +09:00
harukin-expo-dev-env 700c57efbb feat: alternate paired formation icons across transition cards 2026-10-07 09:02:04 +09:00
harukin-expo-dev-env af37b22c9c feat: blink changing vehicle icons instead of transition text badge 2026-10-07 08:42:37 +09:00
harukin-expo-dev-env 2afe460800 fix: retain legacy vehicle icons when current section has no formation 2026-10-07 07:57:54 +09:00
harukin-expo-dev-env 340718d714 fix: preserve parent-child vehicle icon layout for section states 2026-10-07 02:19:20 +09:00
harukin-expo-dev-env a4c482a1ac docs: fold shadow diagnostics and document section UI checks 2026-10-07 02:12:49 +09:00
harukin-expo-dev-env de3faa195b feat: redraw existing WebView vehicle icons from section components 2026-10-07 02:12:49 +09:00
harukin-expo-dev-env 84f1afd3b7 feat: show section formations with existing train detail icons 2026-10-07 02:12:13 +09:00
harukin-expo-dev-env d2e386b07d feat: show read-only shadow diagnostics in research tools 2026-10-07 01:34:41 +09:00
harukin-expo-dev-env 0be05a1910 fix: isolate malformed services and expose shadow diagnostic metadata 2026-10-07 01:34:41 +09:00
harukin-expo-dev-env b62d269982 feat: decorate existing WebView trains with native service states 2026-10-07 01:00:49 +09:00
harukin-expo-dev-env 810defe03e feat: add opt-in service formation display to train details 2026-10-07 01:00:49 +09:00
harukin-expo-dev-env 564d7e5919 feat: add service plan shadow pipeline scoped by backend and date 2026-10-07 01:00:48 +09:00
harukin-expo-dev-env 036f30e452 fix: resolve service state from all rows for each train 2026-10-07 00:32:40 +09:00
harukin-expo-dev-env a01f0f774a docs: sync service plan contract for duplicate train rows 2026-10-07 00:32:40 +09:00
harukin-expo-dev-env d622be4432 fix: scope playback operation logs to JST service date 2026-10-06 13:17:13 +09:00
harukin-expo-dev-env a58fe6e7e1 feat: add pure service state resolver with railway fixtures 2026-10-06 13:16:38 +09:00
harukin-expo-dev-env 026c6bfbb2 docs: preserve shared service-plan v1 contract 2026-10-06 13:13:20 +09:00
harukin-expo-dev-env b615dbab4f Merge commit '9f29ef7cee64dd2b6e71b4e47934c0d218b6d79e' into develop 2026-10-06 13:05:51 +09:00
Claude 9f29ef7cee fix: mock位置マスターをbackendの/api/v1/position-mastersから取得する
position-api(D1)側の位置マスターは更新が止まっているため、mockモードの
Pos補完をbackendの位置マスターに切り替える。レスポンス形式の差
({data:[]}包み、pos_numが文字列、pos_type→position_kind、pos_textのnull)
はpositionMasterParserで旧形式に変換する。

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01UFcahnwpdMNuf3ZmoSkJWq
2026-10-06 03:56:01 +00:00
harukin-expo-dev-env 9dcdb7ed52 Merge commit 'bb586fd318dd141fefc10ee1517f432d17275f71' into develop 2026-10-06 12:54:41 +09:00
harukin-expo-dev-envandClaude Opus 5.5 bb586fd318 perf: 在線の取得をサーバー更新周期に合わせ、時刻表と公式位置の不要な再取得を省く
- 在線: fetchedAtとDateヘッダーから次回取得をサーバー更新の約2秒後に合わせる。
  未更新なら2秒後に1回だけ再取得し、mock・録画・GAS fallbackは固定15秒を維持する。
  更新から反映までの遅れが平均約7.5秒から約2.5秒になる(本番APIで実測)。
- 公式位置メタデータ: 15秒ごとの強制再取得をやめ、5分のTTLにする。
  バックグラウンドからの復帰時は強制再取得し、内容が同じなら永続キャッシュを書き直さない。
- 時刻表: ETagで条件付き取得し、未変更ならパース・再描画・保存を省く。
  ETagをキャッシュにも保存し、起動直後の取得から304で済ませる。
- observedFetchにknownEtagとETag/Date/受信時刻を返すobservedFetchJsonWithMetaを追加。
- キャッシュ読込がネットワーク結果を上書きする競合を防ぐ。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 12:54:20 +09:00
harukin-expo-dev-envandClaude Opus 5.5 8f6633fc1b fix: 外部URLを開く失敗とAndroidウィジェットの取得失敗を処理する
- Linking.openURLをopenExternalUrlに置き換え、失敗時は未処理rejectにせずAlertで伝える
- Androidの運行情報・遅延情報ウィジェットで、取得失敗時に「通常運行」と誤表示しないようにする

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-03 00:14:41 +09:00
harukin-expo-dev-env ef50aa96f7 feat: telemetryのログ記録機能を追加し、通信失敗時のエラーハンドリングを改善 2026-10-02 22:53:42 +09:00
harukin-expo-dev-envandClaude Opus 5.5 ab48ae0f6e feat: fontSize/radiusのデザイントークンを追加し、未保存キー読込の未処理rejectを防ぐ
- lib/theme/tokens.tsにfontSize/radiusトークンを追加し、lib/themeから公開する
- 汎用UIのfontSize/borderRadius直書きをESLintで警告する(再現表示・ウィジェット等は対象外)
- storage.loadはキーが無いとNotFoundErrorでrejectするため、catchの無かった
  unyohubData/elesiteData、データソース設定、通知設定の読込にcatchを追加する
  (Sentry JR-SHIKOKU-UNOFFICIAL-APPS-1)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 13:15:24 +09:00
harukin-expo-dev-envandClaude Opus 5.5 586fcfe24d chore: Claude CodeがSentry MCPを読み込めるよう.mcp.jsonにtypeを追加
typeがないとClaude Codeはこのエントリを読み飛ばしていた。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 21:18:14 +09:00
harukin-expo-dev-envandClaude Opus 5.5 a666cb7d09 chore: リポジトリのSkillをClaude Codeからも使えるようにする
Codex向けの .agents/skills/ にある animate-expo / jr-shikoku-architecture /
jr-shikoku-data-model へ、.claude/skills/ から相対symlinkを張る。
正本は .agents/skills/ のまま。置き場所の運用をAGENTS.mdに追記。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 21:16:13 +09:00
harukin-expo-dev-env 7e50c30638 Merge commit '899e958d2fff0e0539397eedbcc6bd35caa53f5a' into develop 2026-09-30 21:14:42 +09:00
harukin-expo-dev-envandClaude Opus 5.5 899e958d2f fix: エラー画面の上余白をsafe areaに合わせ、スタックのパスを短縮する
実機確認で、タブ内のエラー画面のタイトルがステータスバーに重なっていた。

- 上下の余白をsafe areaのinsetから計算する。ルートはSafeAreaProviderの
  外側なので起動時のinsetで代替する
- スタック各行の端末内フルパスを「ファイル名:行:列」に短縮し、
  コピーした報告を読みやすくする

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 17:44:08 +09:00
harukin-expo-dev-envandClaude Opus 5.5 8b8d865ff3 feat: 研究ツールにErrorBoundaryのエラー画面テストを追加
描画エラーは意図的に起こせず、エラー画面を実機で確認する手段がなかった。

- 研究ツール(開発ビルドまたは管理者のみ表示)から、アプリ全体/走行位置/
  トップメニュー/運行情報のいずれかで次の描画時に例外を投げる
- 各AppErrorBoundary内の仕掛けが指定scopeのときだけ例外を投げ、
  捕捉時に解除するので再表示で復帰できる
- Sentryには error_boundary_test: true のtag付きで送信し、本物と区別する

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 17:30:08 +09:00
harukin-expo-dev-envandClaude Opus 5.5 0b62157483 docs: A-3の実施状況をバックログに反映
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 17:18:14 +09:00
harukin-expo-dev-envandClaude Opus 5.5 e1d79c0d9f refactor: @ts-ignoreを除去し、型の抑制をライブラリ境界の@ts-expect-errorだけにする (A-3)
- 抑制対象の型エラーがなかった7件を削除
- 駅時刻表の一覧3種から駅詳細シートを開くpayloadに必須のgoToを明示
  (goToは"NearTrainDiagramView"か否かだけで使われ、undefinedと挙動は同じ)
- RNEUIのListItem/Chevronの型不足4件は理由付きの@ts-expect-errorに置換
  (ライブラリ側で型が直れば検出できる)

挙動変更なし。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 17:17:54 +09:00
harukin-expo-dev-envandClaude Opus 5.5 7b8de698d1 refactor: ルートのApps.tsxをAppContainer.tsxへ改名
components/Apps.tsx(走行位置画面)と名前が衝突していたため、
中身のexport名に合わせて改名する。挙動変更なし。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 17:15:21 +09:00
harukin-expo-dev-envandClaude Opus 5.5 25b4dbcf56 chore: 未使用のpackage.json退避ファイルを削除し、current.txtを対応不要に記録
- package.json.before-remove-resolutions はどこからも参照されていない
- current.txt は check.sh のダイヤ更新チェックに使うため残す

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 17:12:13 +09:00
harukin-expo-dev-envandClaude Opus 5.5 1f0cf82568 chore: 動作していないGitHub Actionsの検証workflowを削除
主なremoteはgit.pcgf.ioで、このworkflowは一度も実行されていなかった。
CIがあると誤解されないよう削除する。検証は手元の yarn verify で行う。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 17:05:02 +09:00
harukin-expo-dev-envandClaude Opus 5.5 55d1953b29 docs: Web版の復活(W-1)を将来の目標としてバックログに記録
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 16:24:50 +09:00
harukin-expo-dev-envandClaude Opus 5.5 927641bd08 chore: 動作しないWeb版の実装・設定・依存を削除
Web版は起動直後に落ちる状態で、公式サイトへのWebView注入に依存する
中心機能もブラウザでは実現できないため、いったん削除する。
復活は自前APIへの移行後の目標としてバックログに記録。

- Web入口(index.ts)、trainMenu.web.tsx、service worker、web-build/、
  public/_redirects、pushWeb / web:export scriptを削除
- app.jsonのplatformsからwebを除外
- Platform.OS === "web" 分岐を削除(ネイティブでは通らないコード)
  - ndViewのtabPress listenerはWeb専用の処理だけだったため削除
- 依存 react-dom / react-native-web / @lottiefiles/dotlottie-react を削除
  (@expo/metro-runtimeは開発時のネイティブのログ転送に使うため残す)
- OSSライセンス一覧を再生成

yarn verify、expo export (android / ios) 成功。androidの同梱asset 260件は不変。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 16:24:50 +09:00
harukin-expo-dev-envandClaude Opus 5.5 c2f43114f6 feat: 描画エラー時に白画面ではなく復帰・エラー内容コピー画面を出す
ErrorBoundaryがなく、描画中の例外1つでアプリ全体が白画面になっていた。

- AppErrorBoundary: 例外をSentryへ送り、代わりの画面を固定色で描画する
  - ルート: 再読み込み(Updates.reloadAsync)
  - タブ(走行位置/トップメニュー/運行情報): 再表示。他のタブは使える
  - エラー内容・発生箇所・アプリ/端末情報・Sentry Event IDをコピー可能
- formatErrorReport: コピー用テキストの組み立てを純粋関数にしてテスト

イベントハンドラ・非同期処理・ネイティブのクラッシュは対象外。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 16:15:37 +09:00
harukin-expo-dev-envandClaude Opus 5.5 d08e8f6906 fix: エラー応答でUnyohub/Elesite/乗り継ぎデータを上書き保存しないようにする
response.okを確認せずjson()の結果をstateとストレージへ書いていたため、
サーバーがエラーJSONを返すと正常データが上書き・永続化されていた。

- fetchJsonArray: HTTPエラーと配列以外の応答を例外にする
- parseStoredJsonArray: 保存済みデータが配列でなければ読み込まない
  (過去に保存されたエラー応答で.filter等が落ちるのを防ぐ)
- useBusAndTrainDataの取得失敗を未処理のrejectionにしない

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 16:06:02 +09:00
harukin-expo-dev-envandClaude Opus 5.5 f9d7f21d83 docs: 乗り継ぎデータが更新されない問題(B-1)を保留中の既知の問題として記録
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 16:06:02 +09:00
harukin-expo-dev-envandClaude Opus 5.5 6f57ffad0e refactor: 2階層以上の相対importを@/エイリアスに統一
from / require / 動的import のうち ../../ 以上の相対パス106箇所(45ファイル)を
ルート基準の @/ に置換。挙動変更なし。

- yarn verify 成功
- expo export (android) 成功、同梱asset 260件のhashが変更前と一致

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 15:58:57 +09:00
harukin-expo-dev-envandClaude Opus 5.5 14d564b742 test: 公式位置編集URLの期待値をFrontendの実ルート(train-positions)に合わせる
b529360で実装側は /train-positions/:id/edit に変更されていたが、テストが
旧パスのまま残りyarn verifyが失敗していた。production/experimental/nightly
のFrontendバンドルで定義ルートが train-positions/:positionId/edit である
ことを確認済み。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 15:23:20 +09:00
harukin-expo-dev-envandClaude Opus 5.5 58d0e071fc docs: 急行・競技種別を対応不要項目としてバックログに記録
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BDYYpzQGabzZcAgz6NPKmK
2026-09-30 12:49:34 +09:00
harukin-expo-dev-envandClaude Opus 5.5 756a32356a fix: 急行・競技の型定義とWebView表示設定の不足を補完
- getTrainTypeのcolorStringに競技の色、trainTypeStringに「急行」を追加し、typecheckエラーを解消
- WebView注入用のTRAIN_TYPE_CONFIGにEXPRESS(急行)とCompetition(競技)を追加
- TRAIN_TYPE_CONFIGがtrainTypeIDを網羅しているかsatisfiesで型検査

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BDYYpzQGabzZcAgz6NPKmK
2026-09-30 12:44:34 +09:00
harukin-expo-dev-envandClaude Opus 5.5 6ffca91034 refactor: 未使用のnameToWidgetを削除
2024-05の静的分岐化以降参照されておらず、旧Info_Widgetキーも残っていたため削除。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BDYYpzQGabzZcAgz6NPKmK
2026-09-30 12:41:31 +09:00
harukin-expo-dev-envandClaude Opus 5.5 58feaa439b feat: 設定にオープンソースライセンス画面を追加
- scripts/generate-oss-licenses.mjs で dependencies の依存ツリーからライセンス一覧を生成(yarn licenses:generate)
- 同一ライセンス文の重複排除とMIT定型部分のテンプレート化で出力を約338KBに抑制
- 改変して同梱している expo-felica-reader を先頭に表示
- 一覧が dependencies と食い違う場合に yarn test で検出するテストを追加
- READMEに再生成手順を追記

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 12:38:47 +09:00
harukin-expo-dev-envandClaude Opus 5.5 cb5bdd6271 docs: READMEを現行仕様に更新し、expo-felica-readerの出典を明記
- READMEの技術スタック、セットアップ、構成、API、ディープリンク、ウィジェット、ビルド手順を現行コードに合わせて更新
- 怪レい列車ウィジェットを未公開(公開予定・データ取得先未整備)として記載
- ライセンス欄(非公開・All Rights Reserved)と開発者欄を記載し、貢献節を削除
- expo-felica-readerに元リポジトリ(7nohe/expo-felica-reader, MIT)のLICENSEを追加し、podspecの作者・homepageを修正

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 12:30:43 +09:00
harukin-expo-dev-env 5dfeb6362c feat: enhance train data handling with extended station management and improve nearby train logic 2026-09-29 11:38:56 +09:00
harukin-expo-dev-env 3db21846e2 fix: update version code to 7.2.2 2026-09-22 14:24:15 +09:00
harukin-expo-dev-env f657c7f223 Merge commit '3671427e5a15dcd6b97aa359a0ccc175048529b2' into develop 2026-09-22 14:07:32 +09:00
harukin-expo-dev-env 3671427e5a feat: add competition and express train types with corresponding data handling 2026-09-22 14:07:22 +09:00
harukin-expo-dev-env 6c8b7f0344 feat: enhance performance monitoring and caching in various components
- Added performance markers in `ndView.tsx` to track startup and rendering times.
- Implemented caching logic for custom train data in `useAllTrainDiagram.tsx` with timestamps for data readiness.
- Optimized station data retrieval in `useStationList.tsx` by creating indexes for faster access.
- Refactored train delay data handling in `useTrainDelayData.tsx` to improve cleanup on unmount.
- Introduced tests for shared in-flight requests and timetable cache functionality to ensure reliability.
2026-09-22 10:38:00 +09:00
harukin-expo-dev-env 91d49e1fb2 feat: conditionally render platform description in PositionBox component 2026-09-20 23:02:43 +09:00
harukin-expo-dev-env 32380471a4 refactor: replace howto navigation with generalWebView
- Removed the howto screen and replaced its usage with a generalWebView for displaying URLs.
- Introduced normalizeVehicleInfoUrl function to ensure valid URLs are passed to WebView.
- Updated various components and hooks to utilize the new generalWebView navigation.
- Refactored hooks to use useMemo for performance improvements and reduced unnecessary re-renders.
- Cleaned up unused state and effects in several hooks related to train data and positions.
- Updated type definitions to reflect the removal of howto parameters.
2026-09-20 22:58:32 +09:00
harukin-expo-dev-env 671de5255e feat: add icons to settings options for improved UI clarity 2026-09-18 20:59:22 +09:00
harukin-expo-dev-env 12bc621d25 feat: add connection status monitoring with health checks
- Implemented connection status checks in `connectionStatus.ts` to monitor various services.
- Created a client for fetching health check data in `connectionStatusClient.ts`.
- Added comprehensive tests for health check functionality in `connectionStatus.test.ts`, covering various scenarios and payload interpretations.
2026-09-18 20:46:10 +09:00
harukin-expo-dev-env 2f0b518f27 feat: Refactor PositionBox and TrainDataView components to streamline position data handling and improve layout responsiveness 2026-09-17 00:37:48 +09:00
harukin-expo-dev-env bb651b6a13 fix: update version code to 7.2.1 in SettingTopPage component 2026-09-16 09:53:07 +09:00
harukin-expo-dev-env 738ba45663 Merge commit '1d035f719d0879eeb7e217d80604b56f151499d6' into develop 2026-09-15 23:42:04 +09:00
harukin-expo-dev-env 1d035f719d feat: Enhance position description handling in TrainDataView and TrainPosition components 2026-09-15 23:39:48 +09:00
harukin-expo-dev-env 1ecd026908 feat: Implement official position metadata handling and caching
- Add `currentTrainMetadata.ts` to manage carrying forward official position metadata between train snapshots.
- Introduce `lineDisplayName.ts` for mapping line IDs to display names.
- Create `officialPositionCache.ts` for parsing and serializing official position data with cache validation.
- Enhance `officialPositionService.ts` to support persistent caching of official positions and improve resolver functionality.
- Update `requestCoordinator.ts` to allow cancellation of polling requests without disposing of the coordinator.
- Modify `trainTimeFiltering.ts` to incorporate line ID context when checking for duplicate train data.
- Refactor `useCurrentTrain.tsx` to support polling for current train data with official position enrichment.
- Add tests for new features, including persistent cache behavior and handling of ambiguous train data.
2026-09-15 13:48:21 +09:00
harukin-expo-dev-env bb21cf84b2 refactor: clean up imports and improve code structure in multiple files 2026-09-15 02:03:29 +09:00
harukin-expo-dev-env 209e147618 refactor: remove unused trainInfo state and related logic in multiple components 2026-09-15 00:51:17 +09:00
harukin-expo-dev-env 53de8bcce4 feat: refactor EachTrainInfo and related components to streamline trainNum handling 2026-09-15 00:05:44 +09:00
harukin-expo-dev-env 71e0baf6ff feat: add trainNum to payload in various components for improved data handling 2026-09-14 23:49:04 +09:00
harukin-expo-dev-env b529360a77 refactor: improve code readability and formatting in multiple components 2026-09-14 15:05:14 +09:00
harukin-expo-dev-env ebee4bc988 fix: streamline data parsing in useBusAndTrainData 2026-09-14 01:27:41 +09:00
harukin-expo-dev-env 48c8512cd4 refactor: remove train pair data type and related state management 2026-09-14 01:11:14 +09:00
harukin-expo-dev-env 64da704dc1 feat: add train pair data and improve error handling in hooks 2026-09-14 00:50:05 +09:00
harukin-expo-dev-env f6eab3bfc5 Merge commit 'fa81ee0f6f57c54453f45a043f97ebb116a41368' into feature/migration 2026-09-13 23:26:42 +09:00
harukin-expo-dev-env fa81ee0f6f fix: update OfficialPosition edit URL and adjust related components 2026-09-13 22:43:15 +09:00
harukin-expo-dev-env 97be486389 feat: add OfficialPosition edit links 2026-09-13 18:35:59 +09:00
harukin-expo-dev-env a203a47f18 refactor: remove legacy n8n OfficialPosition source 2026-09-13 17:57:22 +09:00
harukin-expo-dev-env 001439fb9f feat: resolve native position metadata via OfficialPosition backend 2026-09-13 16:23:39 +09:00
harukin-expo-dev-env 19b280a467 feat: implement startup icon font preloading and improve loading checks in AppContainer
refactor: simplify CarouselTypeChanger by removing redundant onPressIn handlers
fix: enhance MenuLED memoization for better performance
refactor: optimize EachData component with useMemo for derived values
fix: improve error handling in TrainPosition data fetching
refactor: streamline AddressText component's API call with abort controller
refactor: update Menu component to manage selected station state more effectively
2026-09-13 15:09:37 +09:00
harukin-expo-dev-env 9f26492f80 Refactor useCurrentTrain hook into useCurrentTrainData and useCurrentTrainView
- Split the existing useCurrentTrain hook into two separate hooks: useCurrentTrainData for accessing train data and useCurrentTrainView for accessing view-related properties.
- Updated all components and hooks to use the new hooks accordingly, ensuring that the functionality remains intact.
- This change improves the separation of concerns and enhances the maintainability of the codebase.
2026-09-12 23:02:43 +09:00
harukin-expo-dev-env 94f3807d81 Refactor train data management and recording functionality
- Split the useAllTrainDiagram hook into three separate hooks: useTrainDiagram, useCustomTrainData, and useOperationLogs for better modularity and performance.
- Update components to utilize the new hooks, ensuring that all references to the old hook are replaced.
- Refactor the TrainMenu context to include a new TrainRecording context, encapsulating recording-related state and functions.
- Adjust components to use the new useTrainRecording hook for playback and recording functionalities.
- Clean up imports and state management across various components to align with the new structure.
2026-09-12 15:47:42 +09:00
harukin-expo-dev-env d87ef809d1 feat: Add changelog for major features and improvements from version 7.1 to 7.2
- Introduced voice announcements by Rikka-chan for train departures and station approaches.
- Enhanced top screen layout for easier access to map, station list, and LED display.
- Improved reliability of operation information and train position displays.
- Added customizable vehicle and launcher icons for the Railway Operation Hub.
- Streamlined navigation from notifications and external links to specific screens.
- Enhanced support for larger screens and background audio playback.
- Implemented internal improvements for app stability and performance.
2026-09-05 17:01:18 +09:00
harukin-expo-dev-env 30f101e2e6 feat: implement startup deep link handling and unyohub data selectors; add tests for new functionality 2026-09-04 11:07:55 +09:00
harukin-expo-dev-env fba0c81301 feat: update audio mode settings to enable background playback on iOS 2026-09-04 11:07:41 +09:00
harukin-expo-dev-env 54abf94b86 feat: update splash screen image and add resize mode; enhance permission handling for crew role 2026-09-03 01:31:58 +09:00
harukin-expo-dev-env f210ca4d77 feat: Add loading states and map functionality to the menu
- Implemented StationListLoadingState component for loading messages.
- Created MenuLED component to display LED information with loading animations.
- Developed MenuMap component for interactive map features, including user location markers and station markers.
- Introduced LEDFrame component for consistent styling of LED displays.
- Enhanced LED_vision component to support embedded rendering and content readiness.
- Added menuStationSelectors for managing nearby and favorite station groups.
- Updated Menu component to integrate new loading states and map functionalities.
- Added tests for menuStationSelectors to ensure correct grouping and selection logic.
2026-09-02 21:24:41 +09:00
harukin-expo-dev-env 26e9b9d90a feat: refactor AppContainer logic and add TabBarBackground component for improved navigation handling 2026-09-02 00:34:53 +09:00
harukin-expo-dev-env 2014876066 feat: update layout settings to use new hub icon and increment version code to 7.2 2026-09-01 23:18:31 +09:00
harukin-expo-dev-env 568275ba89 Merge commit 'befaa2f583dd4896995c8a479e4b1fd5f67cec7e' into develop 2026-09-01 22:51:24 +09:00
harukin-expo-dev-env befaa2f583 feat: add support for resizable activity in Android manifest 2026-09-01 22:34:00 +09:00
harukin-expo-dev-env 1cd666d68e feat: implement display metrics synchronization for DeX and improve font scaling logic 2026-09-01 17:35:52 +09:00
harukin-expo-dev-env 16c36fc2ce refactor: restructure app initialization and navigation handling with new hooks 2026-09-01 02:01:15 +09:00
harukin-expo-dev-env 16914df312 refactor: simplify URL routing logic and improve readability 2026-09-01 01:23:20 +09:00
harukin-expo-dev-env 974c162a9e refactor: migrate from Sentry to custom telemetry for observability
- Replaced Sentry breadcrumbs and context setting with a custom telemetry implementation across various components including Apps, WebView, CarouselBox, and ndView.
- Introduced a new telemetry module to encapsulate observability logic and provide a unified API for logging events, messages, and exceptions.
- Updated documentation to reflect changes in observability architecture, consolidating Sentry initialization and telemetry usage.
- Enhanced error handling and logging in data fetching and application lifecycle management.
2026-09-01 01:11:13 +09:00
harukin-expo-dev-env e52c146278 docs: align SDK57 runtime and transport guidance 2026-08-31 16:44:23 +09:00
harukin-expo-dev-env a112a6c926 feat: add StartupOverlay component for improved splash screen handling 2026-08-31 15:37:47 +09:00
harukin-expo-dev-env f23da6978a chore: prepare beta7.2 release build 2026-08-31 12:57:12 +09:00
harukin-expo-dev-env 428650cf5e Merge codex/nitro-fetch-sdk57 into develop 2026-08-31 12:47:00 +09:00
harukin-expo-dev-env a17d73af38 docs: require explicit merge commits 2026-08-31 12:46:36 +09:00
harukin-expo-dev-env 19260c8d6c revert: remove Nitro Fetch experiment 2026-08-31 11:57:25 +09:00
harukin-expo-dev-env 5375577446 fix: keep standard fetch as Nitro fallback 2026-08-31 11:36:15 +09:00
harukin-expo-dev-env 14df124d2d test: align Nitro transport kill switch comments 2026-08-31 10:58:52 +09:00
harukin-expo-dev-env dcde17c970 test: disable Nitro transport for both native platforms 2026-08-31 10:44:52 +09:00
harukin-expo-dev-env 75a686e27a test: disable iOS Nitro transport for crash isolation 2026-08-31 10:32:03 +09:00
harukin-expo-dev-env bf5c40fe56 docs: record iOS Nitro build start 2026-08-31 10:04:09 +09:00
harukin-expo-dev-env 1350957506 docs: record Nitro Fetch SDK57 validation 2026-08-31 09:52:38 +09:00
harukin-expo-dev-env d6a6e50eca feat: probe Nitro Fetch for current positions 2026-08-31 09:52:11 +09:00
harukin-expo-dev-env 9b275ec011 docs: record Android keep-awake verification 2026-08-30 23:40:20 +09:00
harukin-expo-dev-env 0298cea6f6 docs: record remaining SDK57 runtime checks 2026-08-30 23:36:27 +09:00
harukin-expo-dev-env 050fcb91dc docs: record Android SDK57 runtime verification 2026-08-30 23:33:18 +09:00
harukin-expo-dev-env 4e783a51b8 docs: record verified iOS native features 2026-08-30 23:19:25 +09:00
harukin-expo-dev-env 236d04a78d docs: record iOS SDK57 runtime verification 2026-08-30 23:14:00 +09:00
harukin-expo-dev-env a7435efa9a docs: record Android SDK migration toolchain 2026-08-30 18:53:03 +09:00
harukin-expo-dev-env 4f405d5e0e docs: finalize Expo SDK 57 migration verification 2026-08-30 18:49:19 +09:00
harukin-expo-dev-env 263a27a700 ci: allow Sentry upload failure in non-production builds 2026-08-30 18:15:11 +09:00
harukin-expo-dev-env 1fb99e6577 docs: record Expo SDK 57 migration verification 2026-08-30 18:11:47 +09:00
harukin-expo-dev-env 954fd052a8 fix: align local iOS modules with SDK 57 target 2026-08-30 17:55:26 +09:00
harukin-expo-dev-env b898c12dc7 chore: migrate to Expo SDK 57 dependencies 2026-08-30 17:38:13 +09:00
harukin-expo-dev-env b742d51db2 chore: migrate to Expo SDK 56 2026-08-30 17:21:25 +09:00
harukin-expo-dev-env b63c04ad81 docs: record credential handling boundary 2026-08-30 01:00:20 +09:00
harukin-expo-dev-env 0fda6e8750 docs: add architecture agent rules 2026-08-30 00:55:52 +09:00
harukin-expo-dev-env e50308c4e6 feat: add railway domain contracts 2026-08-30 00:55:39 +09:00
harukin-expo-dev-env 92818bbd11 fix: make delay data refresh explicit 2026-08-30 00:55:26 +09:00
harukin-expo-dev-env f136aade56 fix: coordinate current train polling 2026-08-30 00:55:04 +09:00
harukin-expo-dev-env 66efe56732 ci: add verification baseline 2026-08-30 00:53:51 +09:00
harukin-expo-dev-env 9d20fd3de3 docs: define native runtime release policy 2026-08-30 00:52:32 +09:00
harukin-expo-dev-env f7c1a70031 feat: Add animate-expo skill documentation and guidelines for animation implementation in React Native 2026-08-29 23:39:08 +09:00
harukin-expo-dev-env 68f66d0109 feat: Add CI/CD release audit documentation and refactor roadmap
- Introduced comprehensive CI/CD release audit documentation detailing current repository automation, EAS configuration, manual workflows, and recommended PR pipelines.
- Added a structured refactor roadmap outlining phases for improving API boundaries, domain model integration, and CI/CD automation.
- Proposed specific skills for project management to enhance understanding of application-specific knowledge and maintainability.
- Updated package.json to include expo-sqlite dependency and modified yarn.lock accordingly.
2026-08-29 22:43:44 +09:00
harukin-expo-dev-env e8d7fd7dd7 refactor: テキストの色を背景に合わせて調整 2026-08-29 22:35:51 +09:00
harukin-expo-dev-env c2fdb16879 feat: add unyoHub icons and conversion script
- Introduced a new TypeScript file `icons.ts` containing a list of unyoHub icons with their respective IDs, names, and image paths.
- Added a new utility `jrDataSystemIconUrl.ts` to handle icon URL management for the JR data system, including a function to append icon queries.
- Created a bash script `convert-unyohub-icons.sh` to convert WebP icons to PNG format, resizing them to 1024x1024 pixels and saving them in the specified output directory.
2026-08-26 13:27:08 +00:00
harukin-expo-dev-env 800536577f refactor: 時刻の正規化処理を追加し、時間データの一貫性を向上 2026-08-25 04:30:48 +00:00
harukin-expo-dev-env f1632edb17 refactor: 時刻のフォーマットをHH:mmに統一し、時間解析の柔軟性を向上
新しい位置ルックアップモジュールを追加し、WebView XHRインターセプターでの依存関係を整理
2026-08-25 03:49:14 +00:00
harukin-expo-dev-env 67c706b1a3 Add support for generating WebInject bookmarklet
- Created a new documentation file for the WebInject bookmarklet usage.
- Implemented bookmarklet generation in the compile-web-script, encoding the JavaScript for safe URL usage.
- Updated the output log to include the generated bookmarklet file path and size.
2026-08-25 03:49:04 +00:00
harukin-expo-dev-env bcfa24f30a Refactor navigation types and improve type safety across components
- Removed usage of `any` in navigation hooks and replaced with specific types.
- Added type definitions for navigation parameters in `navigation.ts`.
- Updated components to utilize the new navigation types for better type safety.
- Enhanced `SwitchArea` component with generic type support for boolean and string values.
- Introduced type checks and parsing functions for API responses in `mockApi` to ensure data integrity.
- Created a refactoring backlog document to track future improvements and refactoring tasks.
- Removed unused functions and cleaned up code in various components for better maintainability.
2026-08-20 23:51:09 +00:00
harukin-expo-dev-env b0161bf5b5 Merge commit '292fb96106b917a8d3d1dd576c6454afdaf0bf85' into develop 2026-08-20 05:08:16 +00:00
445 changed files with 28055 additions and 6959 deletions
+385
View File
@@ -0,0 +1,385 @@
# Expo Animation Recipes
Ready-to-build implementations for the cases that come up most in a React Native app. Start from the recipe, then adapt.
---
## Setup the recipes assume
```bash
npx expo install react-native-reanimated react-native-worklets react-native-gesture-handler expo-haptics
```
(`react-native-keyboard-controller` only for the keyboard recipe.) `expo install`, not `npm install` — it resolves the versions that match the SDK. The worklets Babel plugin is configured by `babel-preset-expo` automatically.
`GestureHandlerRootView` wraps the app once — in Expo Router, the root `_layout`:
```jsx
import { GestureHandlerRootView } from 'react-native-gesture-handler';
export default function RootLayout() {
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<Stack />
</GestureHandlerRootView>
);
}
```
Imports and constants every recipe below shares:
```js
import { useState, useEffect, useMemo } from 'react';
import Animated, {
useSharedValue, useAnimatedStyle, useAnimatedScrollHandler, useAnimatedReaction,
withSpring, withTiming, interpolate, Extrapolation, Easing,
FadeInDown, FadeOutDown, LinearTransition,
} from 'react-native-reanimated';
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
import { scheduleOnRN } from 'react-native-worklets';
import * as Haptics from 'expo-haptics';
const EASE_OUT = Easing.bezier(0.23, 1, 0.32, 1); // strong ease-out for UI
const EASE_IN_OUT = Easing.bezier(0.77, 0, 0.175, 1); // on-screen movement
const EASE_SHEET = Easing.bezier(0.32, 0.72, 0, 1); // iOS sheet curve
```
Three conventions, explained once here instead of in every recipe:
- **Shared values are read and written with `.get()` / `.set()`**, the form the Reanimated docs recommend for React Compiler support. `.value` still works, but the compiler can't see through it.
- **`scheduleOnRN(fn, ...args)` replaces the deprecated `runOnJS(fn)(...args)`** for calling back to the React Native runtime from a worklet.
- **Gestures are wrapped in `useMemo`.** Rebuilding a gesture on every render can reattach the recognizer and drop a drag that's mid-flight.
**Gesture Handler v3:** Expo installs v2, and the recipes use its `Gesture.Pan()` builder. If the project is already on v3, the builder is legacy — each gesture is a hook taking one config object, with `onStart` → `onActivate`, `onEnd` → `onDeactivate`, and the `success` flag replaced by `event.canceled` (inverted). The hook manages its own identity, so drop the `useMemo`:
```jsx
const pan = usePanGesture({
activeOffsetY: [-10, 10],
onActivate: () => { context.set(translateY.get()); },
onUpdate: (e) => { translateY.set(context.get() + e.translationY); },
onDeactivate: (e) => { /* settle with withSpring as below */ },
});
```
---
## Two worklets you'll need everywhere
Momentum projection decides *where a flick was going*, so a fast short swipe commits and a slow long one doesn't. Rubber-banding makes a boundary resist instead of stopping dead.
```js
// Where the finger would come to rest if it kept decelerating.
// Apple's exponential-decay form — not the v²/2a from physics class.
function project(velocity, decelerationRate = 0.998) {
'worklet';
return ((velocity / 1000) * decelerationRate) / (1 - decelerationRate);
}
// The further past the edge, the less the element follows.
function rubberband(overshoot, dimension, constant = 0.55) {
'worklet';
return (overshoot * dimension * constant) / (dimension + constant * Math.abs(overshoot));
}
```
---
## Press feedback
Every pressable in the app. This passes the frequency gate only because it's near-imperceptible: 120ms and a 3% scale is the ceiling for something touched this often — anything longer or larger belongs to rarer moments, per step 1 in SKILL.md. No gesture, no shared value — a CSS transition is the whole implementation.
```jsx
import Animated from 'react-native-reanimated';
import { Pressable, StyleSheet } from 'react-native';
function PressableScale({ onPress, children }) {
const [pressed, setPressed] = useState(false);
return (
<Pressable
onPress={onPress}
onPressIn={() => setPressed(true)}
onPressOut={() => setPressed(false)}
hitSlop={12}
pressRetentionOffset={16}
>
<Animated.View style={[styles.box, pressed && styles.pressed]}>{children}</Animated.View>
</Pressable>
);
}
const styles = StyleSheet.create({
box: {
transform: [{ scale: 1 }],
transitionProperty: 'transform',
transitionDuration: '120ms',
transitionTimingFunction: 'cubic-bezier(0.23, 1, 0.32, 1)',
},
pressed: { transform: [{ scale: 0.97 }] },
});
```
`setState` is fine here — it fires twice per press, not per frame. `hitSlop` brings a small icon up to the 44pt target without growing it; `pressRetentionOffset` stops a slight finger drift from cancelling.
---
## Bottom sheet you can drag to dismiss
Before writing this: if the sheet is its own destination, use `presentation: 'formSheet'` (see **Screen transitions**) and get the platform's real sheet for free. Build this only when the sheet has to live inside an existing screen.
```jsx
const translateY = useSharedValue(0);
const context = useSharedValue(0);
const pan = useMemo(() => Gesture.Pan()
.activeOffsetY([-10, 10]) // let a horizontal swipe win; require intent before committing
.onStart(() => {
context.set(translateY.get()); // start from the current on-screen value, not from 0
})
.onUpdate((e) => {
const next = context.get() + e.translationY;
// downward is free; upward past the top resists
translateY.set(next >= 0 ? next : rubberband(next, HEIGHT));
})
.onEnd((e) => {
const projected = translateY.get() + project(e.velocityY);
if (projected > HEIGHT * 0.4) {
translateY.set(withSpring(HEIGHT, {
duration: 300, dampingRatio: 1, velocity: e.velocityY, overshootClamping: true,
}, (finished) => { if (finished) scheduleOnRN(onClose); }));
} else {
translateY.set(withSpring(0, { duration: 300, dampingRatio: 0.8, velocity: e.velocityY }));
scheduleOnRN(Haptics.impactAsync, Haptics.ImpactFeedbackStyle.Light); // it snapped home
}
}), [onClose]);
const sheetStyle = useAnimatedStyle(() => ({ transform: [{ translateY: translateY.get() }] }));
```
The four details that separate this from a bad drag:
- **`onStart` captures the current value.** Without it, grabbing a sheet mid-animation teleports it — the animation must continue from where the eye last saw it.
- **Velocity decides, not distance.** `project()` means a quick flick dismisses even a few pixels down. Requiring 40% travel makes the sheet feel heavy.
- **Velocity is handed to the spring**, so there's no seam between the finger releasing and the animation continuing. This is the single detail that most separates "fluid" from "fine".
- **`overshootClamping` on dismissal** — otherwise the sheet springs past the bottom of the screen and flashes a gap.
The backdrop derives from the same value, so it's always in sync and costs nothing:
```jsx
const backdropStyle = useAnimatedStyle(() => ({
opacity: interpolate(translateY.get(), [0, HEIGHT], [1, 0], Extrapolation.CLAMP),
}));
```
---
## Swipe to delete a row
Before writing this: gesture-handler ships [`ReanimatedSwipeable`](https://docs.swmansion.com/react-native-gesture-handler/docs/components/reanimated_swipeable/), which already does swipe-to-reveal actions — thresholds, overshoot, open/close methods — on the UI thread. Reach for it when the row reveals action buttons. Build the gesture yourself only when the interaction is different in kind: swipe-to-commit with momentum projection, like this one.
```jsx
const x = useSharedValue(0);
const context = useSharedValue(0);
const pan = useMemo(() => Gesture.Pan()
.activeOffsetX([-10, 10]) // must declare the axis, or it fights the vertical scroll
.onStart(() => { context.set(x.get()); }) // grab mid-spring continues from where the row is, not from 0
.onUpdate((e) => { x.set(Math.min(0, context.get() + e.translationX)); })
.onEnd((e) => {
const projected = x.get() + project(e.velocityX);
if (projected < -SWIPE_THRESHOLD) {
x.set(withTiming(-WIDTH, { duration: 200, easing: EASE_OUT }, (f) => {
if (f) scheduleOnRN(onDelete, id);
}));
} else {
x.set(withSpring(0, { duration: 300, dampingRatio: 1, velocity: e.velocityX }));
}
}), [onDelete, id]);
```
Closing the gap the deleted row left is the list's job, not the row's:
```jsx
const ROW_CLOSE = LinearTransition.duration(200); // module scope — builders rebuilt in render cost every re-render
<Animated.FlatList data={items} itemLayoutAnimation={ROW_CLOSE} ... />
```
`activeOffsetX` is the mobile-specific part. A pan handler inside a scroll view with no axis declared will steal vertical scrolls, and the list will feel broken in a way that looks like a scrolling bug rather than a gesture bug.
---
## Collapsing header on scroll
```jsx
const scrollY = useSharedValue(0);
const onScroll = useAnimatedScrollHandler((e) => { scrollY.set(e.contentOffset.y); });
const titleStyle = useAnimatedStyle(() => ({
opacity: interpolate(scrollY.get(), [0, 60], [1, 0], Extrapolation.CLAMP),
transform: [{ translateY: interpolate(scrollY.get(), [0, 60], [0, -12], Extrapolation.CLAMP) }],
}));
<Animated.ScrollView onScroll={onScroll} scrollEventThrottle={16}>
```
**Never animate the header's `height` to collapse it.** That runs a layout pass on the header and everything below it on every scroll frame — the one animation guaranteed to stutter, because it's competing with the scroll itself. Give the container a fixed height and translate the content inside it, clipping with `overflow: 'hidden'`.
`Extrapolation.CLAMP` is not optional: without it, scrolling past 60 keeps driving opacity negative and the header reappears inverted at the bottom of a long list.
---
## List entrances
```jsx
// The Reanimated docs recommend building layout animations outside components,
// or in useMemo — an inline chain in JSX rebuilds the builder on every render.
// A per-index delay can't live at module scope, so the row memoizes its own:
function Row({ item, index }) {
const entering = useMemo(() => FadeInDown.duration(250).delay(index * 40), [index]);
return <Animated.View entering={entering}>{/* ... */}</Animated.View>;
}
{items.map((item, i) => <Row key={item.id} item={item} index={i} />)}
```
Stagger 30–80ms. Longer feels slow, shorter reads as simultaneous.
**Never put `entering` on a row inside `FlatList`, `FlashList`, or any virtualized list.** Rows are recycled, so the animation re-fires every time one scrolls back into view — the list appears to flicker while the user scrolls. Animate the list container once on mount, or use `itemLayoutAnimation` for reflow only.
Entrance animations are for content the user asked for and is waiting on. A list they scroll past all day should already be there.
---
## Keyboard-synced UI
Needs its own module and a one-time provider ([Expo keyboard guide](https://docs.expo.dev/guides/keyboard-handling/)):
```bash
npx expo install react-native-keyboard-controller
```
```jsx
import { KeyboardProvider } from 'react-native-keyboard-controller';
// Root _layout, next to GestureHandlerRootView — hooks below do nothing without it.
<KeyboardProvider>
<Stack />
</KeyboardProvider>
```
```jsx
import { useReanimatedKeyboardAnimation } from 'react-native-keyboard-controller';
const { height } = useReanimatedKeyboardAnimation(); // 0 → -keyboardHeight, on the UI thread
const footerStyle = useAnimatedStyle(() => ({ transform: [{ translateY: height.get() }] }));
```
Never build this from `Keyboard.addListener` plus a timing animation. The keyboard rides a private system curve, the event arrives on the JS thread after the keyboard has already started moving, and any duration you pick will visibly lag or lead it. The UI must be driven by the keyboard's actual position, frame by frame.
---
## Tab / segmented indicator
Measure once, then animate transforms.
```jsx
const [layouts, setLayouts] = useState({}); // measured with onLayout, not per frame
const x = useSharedValue(0);
const w = useSharedValue(0);
useEffect(() => {
const l = layouts[active];
if (!l) return;
x.set(withTiming(l.x, { duration: 250, easing: EASE_IN_OUT }));
w.set(withTiming(l.width, { duration: 250, easing: EASE_IN_OUT }));
}, [active, layouts]);
const pillStyle = useAnimatedStyle(() => ({
transform: [{ translateX: x.get() }],
width: w.get(),
}));
```
This is the sanctioned `width` animation: the pill is absolutely positioned with no children, so nothing else re-lays-out, and its corner radius survives — `scaleX` would smear the corners into ovals.
`ease-in-out`, because the pill is moving across the screen rather than entering or leaving it. Fire `Haptics.selectionAsync()` on the press, not when the pill lands.
---
## Screen transitions (Expo Router)
Configure the native stack. Never rebuild a screen transition in JS: the native one runs on the platform side, keeps the interactive back gesture, and matches every other app on the device.
```jsx
<Stack screenOptions={{ animation: reduced ? 'fade' : 'default' }}>
<Stack.Screen name="settings" options={{ animation: 'slide_from_right', animationMatchesGesture: true }} />
<Stack.Screen name="compose" options={{ presentation: 'modal' }} />
<Stack.Screen name="filter" options={{
presentation: 'formSheet',
sheetAllowedDetents: 'fitToContents',
sheetGrabberVisible: true,
}} />
</Stack>
```
| Navigation | Option |
| --- | --- |
| Deeper into a hierarchy | `animation: 'default'` — the platform push, unmodified |
| A self-contained task the user can abandon | `presentation: 'modal'` |
| A short interruption: picker, filter, share | `presentation: 'formSheet'` with detents |
| Between tabs | `animation: 'none'` |
| Reduced motion | `animation: 'fade'` |
`animationMatchesGesture: true` makes the iOS back swipe run your transition in reverse under the finger, instead of the default push. Set it whenever you set a custom `animation`, or dragging back looks like a different app than pushing forward.
`formSheet` is native on both platforms, but not the same on both — the [Expo modal docs](https://docs.expo.dev/router/advanced/modals/#form-sheet-presentation) have the full list:
- **Android caps detents at three.** A longer `sheetAllowedDetents` array works on iOS and silently truncates on Android — design for three.
- **`sheetGrabberVisible` is iOS-only.** Android shows no grabber; don't rely on it as the only "this is draggable" affordance.
- **Android form sheets can't host native headers or nested stacks.** Keep the sheet's content a single screen; if it needs its own navigation, use `presentation: 'modal'` instead.
- **`fitToContents` needs explicitly sized content.** A `flex: 1` root has no intrinsic height to fit — size the content, or the detent is wrong.
---
## Toast
```jsx
// Module scope — layout-animation builders live outside the component.
const TOAST_ENTER = FadeInDown.duration(300).easing(EASE_OUT);
const TOAST_EXIT = FadeOutDown.duration(250).easing(EASE_OUT);
<Animated.View
entering={TOAST_ENTER}
exiting={TOAST_EXIT}
style={{ position: 'absolute', bottom: insets.bottom + 16, left: 16, right: 16 }}
/>
```
- **The 300ms cap holds here too.** A toast isn't an exception — it's uninvited, so if anything it should be quicker and quieter than motion the user asked for.
- **It exits the way it entered.** Entering from the bottom and leaving to the side reads as two unrelated elements.
- **Exit ~20% faster than entry.** The user has finished reading; the arrival deserves the time, the departure doesn't.
- **Safe area insets, always.** A toast at `bottom: 16` sits under the home indicator on every modern iPhone.
If toasts stack and the list reflows, add `itemLayoutAnimation` and expect to tune the opacity against the reflow by eye — there's no formula for that pair. Look at it again the next day.
---
## Firing something once at a threshold
When a crossing point matters — a detent, a snap, a pull-to-refresh arming — don't poll it from JS and don't `scheduleOnRN` every frame.
```jsx
const armed = useSharedValue(false);
useAnimatedReaction(
() => pullDistance.get() > REFRESH_THRESHOLD,
(isArmed, wasArmed) => {
if (isArmed !== wasArmed) {
armed.set(isArmed);
scheduleOnRN(Haptics.impactAsync, Haptics.ImpactFeedbackStyle.Light);
}
}
);
```
The comparison runs on the UI thread every frame; the JS call happens twice per pull. That's the pattern for every "do something when the animation reaches X".
+255
View File
@@ -0,0 +1,255 @@
---
name: animate-expo
description: Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use `animate`.
---
# Building Animations in Expo
A construction skill for React Native. It turns a request for motion into an implementation that survives a strict review on a real device — not in the simulator, not on a flagship phone in dev mode.
Mobile changes three things about animation, and everything in this skill follows from them:
1. **There is no hover.** Every affordance the web puts in hover has to live in press, position, or nothing.
2. **There are two runtimes.** Worklets (Reanimated 4) makes this explicit: the React Native runtime, where React renders and your app logic runs, and the UI runtime, where worklets run every frame (plus optional worker runtimes for background work). An animation that touches the RN runtime stutters the moment the app does anything else. The whole craft is keeping motion on the UI runtime.
3. **The user's finger is on the element.** Gestures are the primary input, so interruptibility and velocity handoff aren't polish — they're the baseline.
## Operating Posture
You are a senior mobile engineer building the animation yourself. Make the call, state the reasoning in one line, write the code. Never present motion options as a menu.
Two failure modes, and the first is worse:
1. **Animating something that shouldn't animate.** The gate below exists to produce zero lines of code sometimes.
2. **Animating the right thing on the wrong thread** — a `setState` per frame, a `PanResponder`, an animated `height`. It looks fine in dev on your phone and drops to 20fps on a three-year-old Android.
## Hard Rules
1. **Run the sequence in order.** Steps 1 and 2 gate everything.
2. **Reanimated, not core `Animated`.** Core `Animated` can't be driven by a gesture without crossing the bridge, and `useNativeDriver` refuses anything but transform and opacity anyway. Reanimated worklets run on the UI thread and keep running while JS is busy.
3. **No approximated values.** Curves and spring configs come from the tables below.
4. **Reduced motion ships with the animation**, not as a follow-up.
5. **Feel is judged on a release build on the slowest device you support.** Nothing else counts as verified.
## The Build Sequence
### 1. Should this animate at all?
| Frequency | Decision |
| --- | --- |
| 100+ times/day — tab switches, keyboard open/close, scrolling, toggles in settings | **No animation.** Platform default or nothing. Stop here. |
| Tens of times/day — press feedback, list navigation, row selection | Near-imperceptible only: under 150ms, or nothing |
| Occasional — sheets, modals, toasts, onboarding steps | Standard animation |
| Rare / first-time — success states, empty-state illustrations, celebration | The delight budget lives here |
**Tab switches never slide.** Tabs are peers, not a hierarchy — sliding implies depth that isn't there, and the user pays for it dozens of times a session. `animation: 'none'`.
If the request fails this gate, say so and don't write it.
### 2. What is the purpose?
Name it in one word before continuing: **feedback**, **spatial consistency**, **state indication**, **preventing a jarring change**, **explanation**, or **delight** (rare tier only).
Can't name it? Don't build it.
### 3. Pick the tool — cheapest that works
Walk down; stop at the first that fits.
| Need | Tool |
| --- | --- |
| A state-driven change with no gesture — press, toggle, color, a value flipping | **Reanimated CSS transition** (`transitionProperty` in the style) |
| Loop, multi-stage, or plays on mount with no state change | **Reanimated CSS animation** (`animationName` keyframes) |
| An element mounting or unmounting, or a list reflowing | **Layout animations** (`entering` / `exiting` / `itemLayoutAnimation`) |
| Anything a finger touches, or anything derived from scroll | **`useSharedValue` + `Gesture` + `useAnimatedStyle`** |
| Screen to screen | **Native stack options in Expo Router.** Never hand-roll this |
| A bottom sheet that is its own screen | **`presentation: 'formSheet'`** — it's a real UISheetPresentationController, free and correct |
| Tab bar | **`NativeTabs`** (from `expo-router/unstable-native-tabs`) — the platform's real tab bar, its behaviors and transitions included |
| Context menu, press-and-hold preview | **`Link.Menu` / `Link.Preview`** (Expo Router, iOS-only) — native menus and peek, never rebuilt in JS |
| Header that collapses into a large title | **`headerLargeTitleEnabled`** on the native stack (iOS-only; `headerLargeTitle` is deprecated) — not a scroll worklet |
| Pull to refresh | **`RefreshControl`** — hand-roll only when it's a signature interaction (see the threshold recipe) |
| UI that tracks the keyboard | **`react-native-keyboard-controller`** — the keyboard's real position, frame by frame, on the UI thread |
| Vector illustration, celebration, empty state | **Lottie** — for illustration only, never for UI state |
| A huge animated scene, freeform drawing | **`@shopify/react-native-skia`** — a canvas, for when the view hierarchy itself is the bottleneck |
Reach for a shared value only when the value is continuous or interruptible. A press scale is a CSS transition; a drag is a shared value. Using a worklet for a two-state toggle is the mobile equivalent of installing a motion library for a fade.
**Dependencies.** Install with `npx expo install <package>` — it resolves the version that matches the project's SDK, which plain `npm install` won't:
| Need | Package |
| --- | --- |
| Animation | `react-native-reanimated` + `react-native-worklets` |
| Gestures | `react-native-gesture-handler` |
| Navigation, sheets, native tabs, menus | `expo-router` |
| Haptics | `expo-haptics` |
| Keyboard-following UI | `react-native-keyboard-controller` (needs `KeyboardProvider` at the root — see the keyboard recipe) |
| Illustration, celebration | `lottie-react-native` |
| Very large animated scenes, custom drawing | `@shopify/react-native-skia` |
### 4. Pick the properties
- **`transform` and `opacity` are free.** Everything else is a layout pass. `width`, `height`, `margin`, `padding`, `flex`, `top`, `left`, `gap` re-run Yoga on every frame for that node *and its siblings*.
- **The one exception: an absolutely positioned element with no children** — a tab pill, a progress bar fill. It's out of flow, so nothing else re-lays-out, and animating `width` keeps the corner radius that `scaleX` would smear.
- **Never `scale(0)`.** Start from `scale(0.9–0.97)` + `opacity: 0`. Nothing in the real world appears from nothing.
- **`transform` is an array and order matters** — `[{ translateY }, { scale }]` scales after moving; reversed, the translate gets scaled too. Keep translate first unless you want the multiplication.
- **Android shadows are `elevation`, and animating elevation re-renders the shadow every frame.** Animate opacity of a pre-shadowed layer instead.
- **Never animate `BlurView` intensity.** On Android it re-renders the blur each frame. Crossfade the opacity of a static `BlurView` instead.
- **Percentages work in `translate`** and are relative to the element's own size — `translateY('100%')` moves a sheet by its own height whatever its content.
### 5. Timing or spring
**If a finger was involved, use a spring.** Springs carry velocity through an interruption; timing curves restart. Everything else uses timing.
Reanimated's spring takes Apple's two designer parameters directly — use this form, not mass/stiffness/damping:
| Interaction | Config |
| --- | --- |
| Default settle, no overshoot | `{ duration: 400, dampingRatio: 1 }` |
| Reposition / snap back after a drag | `{ duration: 400, dampingRatio: 0.8, velocity }` |
| Sheet, drawer | `{ duration: 300, dampingRatio: 0.8, velocity }` |
| Must not pass a hard edge | add `overshootClamping: true` |
**Bounce only when the gesture carried momentum.** Overshoot on a menu that faded in feels wrong; overshoot on a card you flicked feels right.
**Easing**, for everything without a finger on it:
| Situation | Easing |
| --- | --- |
| Entering or exiting | `ease-out` |
| Moving / morphing on screen | `ease-in-out` |
| Constant motion (progress, marquee) | `linear` |
| Default | `ease-out` |
**Never `ease-in` on UI.** It starts slow, delaying the exact moment the user is watching. Reanimated's built-ins are as weak as CSS's — use these:
```js
import { Easing } from 'react-native-reanimated';
const EASE_OUT = Easing.bezier(0.23, 1, 0.32, 1); // strong ease-out for UI
const EASE_IN_OUT = Easing.bezier(0.77, 0, 0.175, 1); // on-screen movement
const EASE_SHEET = Easing.bezier(0.32, 0.72, 0, 1); // iOS sheet curve
```
**Duration:**
| Element | Duration |
| --- | --- |
| Press feedback | 100–150ms |
| Toggle, chip, small state change | 150–200ms |
| Sheet, modal, drawer | spring, ~300ms perceived |
| Screen transition | the platform default — don't override it |
Mobile UI animations stay under 300ms, same as web. The platform's own transitions are longer (iOS push is 350ms); match the platform for navigation, beat it everywhere else.
### 6. Keep it off the JS thread
This is the mobile-specific craft, and it's where most React Native motion dies.
- **Never `setState` from a gesture or scroll handler.** One React render per frame is the single biggest cause of jank in RN apps. Shared value → `useAnimatedStyle`, and React never re-renders at all.
- **Never schedule back to the RN runtime inside `onUpdate` or a scroll handler.** `scheduleOnRN(fn, ...args)` from `react-native-worklets` — the Reanimated 4 replacement for the deprecated `runOnJS(fn)(...args)` — queues an RN-runtime call, and in `onUpdate` that's 60–120× per second. It belongs in `onEnd`, or in a `useAnimatedReaction` that fires when a value crosses a threshold.
- **Never read a shared value during render** (`translateY.get()` in JSX). It's a snapshot that never updates and it silently desyncs. **Never write one during render either** — it fires mid-reconciliation, and a re-render you didn't cause replays the write. Touch shared values only in worklets, handlers, and effects.
- **Use `.get()` / `.set()`, not `.value`.** Same API, but direct `.value` access is the form the React Compiler can't see through — the Reanimated docs call `get`/`set` the compiler-safe way. `set` also takes a functional update: `sv.set((v) => v + 1)`.
- **Functions called from a worklet need `'worklet'`** as their first line, or they throw at runtime on device while working fine in the debugger.
### 7. Press, not hover
Every hover affordance from the web has to be redesigned, not ported.
- **Feedback on press-in, commit on press-out.** Waiting for the tap to complete before showing anything feels dead — this is the latency the user actually perceives.
- **`scale: 0.97` in 100–150ms** on any pressable, `Pressable` + a CSS transition. `scale` takes the label and icons with it, which is what makes it read as physical.
- **44×44pt minimum touch target** (48dp Android). If the visual is smaller, add `hitSlop` — don't grow the visual.
- **`pressRetentionOffset`** so a finger drifting a few pixels doesn't cancel a press the user meant.
- **Android ripple only in a Material-styled app.** In a custom-designed app, the same scale on both platforms is more coherent than a ripple on one.
### 8. Haptics
Mobile has a sense the web doesn't. Use it sparingly and it becomes the thing that makes the app feel expensive; use it everywhere and users turn it off.
| Moment | Call |
| --- | --- |
| A value ticks past a step — picker, slider detent, segmented control | `Haptics.selectionAsync()` |
| Something snaps home, a sheet detent catches, a drag commits | `Haptics.impactAsync(ImpactFeedbackStyle.Light)` |
| A heavy object lands, a destructive action fires | `Haptics.impactAsync(ImpactFeedbackStyle.Medium)` |
| Operation succeeded or failed | `Haptics.notificationAsync(NotificationFeedbackType.Success / Error)` |
Three rules, and they're absolute:
- **Same frame as the visual.** A haptic that lags its animation reads as a glitch, not as feedback. Fire it at the causal moment — the detent catching — not when the animation finishes.
- **One per user action.** Never on scroll, never per frame, never on an entrance animation the user didn't cause.
- **Never the only feedback.** Haptics are off system-wide for many users, and silent on most Android hardware. The visual has to stand alone.
From a worklet, haptics must be scheduled back to the RN runtime: `scheduleOnRN(Haptics.selectionAsync)`.
### 9. Reduced motion and accessibility
```jsx
import { useReducedMotion, ReduceMotion, withSpring } from 'react-native-reanimated';
const reduced = useReducedMotion();
const y = useSharedValue(reduced ? 0 : SHEET_HEIGHT);
// or let each animation decide
withSpring(0, { duration: 300, dampingRatio: 0.8, reduceMotion: ReduceMotion.System });
```
Reduced motion means **fewer and gentler**, not zero: keep opacity and color changes that explain a state change, drop translation, scale, parallax and overshoot. Screen transitions become `animation: 'fade'`.
**Text scales.** `allowFontScaling` is on by default, so any height you measured at default type size is wrong at 200%. Never animate to a hardcoded height — measure with `onLayout`, or animate a transform instead.
## Setup that silently breaks motion
Check these first when "the animation just doesn't run":
- Install through Expo so versions match the SDK: `npx expo install react-native-reanimated react-native-worklets`. In an Expo project, `babel-preset-expo` configures the worklets Babel plugin automatically — no `babel.config.js` step. Only a bare RN project without that preset adds the plugin manually, and there it must be last in the list. A missing or misplaced plugin doesn't silently fall back anymore — it throws `Failed to create a worklet` at runtime.
- `GestureHandlerRootView` must wrap the app, or gestures do nothing with no error.
- Reanimated 4 requires the New Architecture.
- **Expo Go is not a performance environment.** Judge feel in a release build; a dev build's JS thread is slow enough to hide exactly the problems you're looking for.
## 120fps
On ProMotion iPhones, third-party animations are capped at 60fps unless `CADisableMinimumFrameDurationOnPhone` is set. Recent Expo SDKs set it by default — confirm it's there, and add it if not:
```json
{ "expo": { "ios": { "infoPlist": { "CADisableMinimumFrameDurationOnPhone": true } } } }
```
Then the frame budget is 8ms, not 16. This is also why a UI-thread animation matters more on mobile than it does on web.
## Recipes
For ready-to-build implementations — press feedback, drag-to-dismiss sheet, swipe-to-delete, collapsing header, list entrances, keyboard-synced UI, tab indicator, screen transitions — see [RECIPES.md](RECIPES.md). Load it whenever the request matches one; start from the recipe rather than from a blank file.
## Never Ship
| Never | Instead |
| --- | --- |
| `PanResponder` | `Gesture.Pan()` from gesture-handler |
| `setState` in a gesture or scroll handler | shared value + `useAnimatedStyle` |
| `runOnJS` (deprecated in Reanimated 4) | `scheduleOnRN` from `react-native-worklets` |
| `scheduleOnRN` per frame | `onEnd`, or `useAnimatedReaction` at a threshold |
| Reading or writing a shared value during render | `.get()` / `.set()` in worklets, handlers, effects |
| Core `Animated` for anything a finger touches | Reanimated |
| Animating `height` / `width` / `margin` / `flex` / `top` | `transform` + `opacity` (absolute, childless elements exempt) |
| Animating `BlurView` intensity or Android `elevation` | crossfade a static layer |
| `entering` on a virtualized list row | animate the container, or `itemLayoutAnimation` |
| A screen transition rebuilt in JS | native stack `animation` |
| Sliding between tabs | `animation: 'none'` |
| `Easing.in(...)` on a UI element | `Easing.bezier(0.23, 1, 0.32, 1)` |
| `scale(0)` entrance | `scale(0.95)` + `opacity: 0` |
| Distance-only dismissal threshold | velocity **or** distance — a flick is enough |
| Hard stop at a boundary | rubber-band resistance |
| A haptic per frame, or as the only feedback | one per commit, always paired with a visual |
| Judging feel in Expo Go or the simulator | release build, slowest supported device |
## Output
Write the code. Then, in at most a few lines:
- **The gate result** — frequency tier and named purpose. Say what you rejected and why.
- **The ingredients** — tool, properties, spring or curve + duration, thread.
- **What to feel-check on device** — gestures, velocity handoff and haptic timing cannot be judged from code. Name what to try: flick it, interrupt it mid-flight, reverse it, run it on the slowest Android you have.
The code is the deliverable. Don't pad it into a report.
## Tone
Opinionated and brief. When the honest answer is "this shouldn't animate," or "this needs a real device before I can tell you if it's right," give it.
@@ -0,0 +1,44 @@
---
name: jr-shikoku-architecture
description: Apply JR Shikoku app architecture, release, OTA/native compatibility, navigation, and data-boundary rules when changing this repository. Use for refactors, release planning, CI safety, network ownership, or native compatibility reviews.
---
# JR四国アプリ architecture skill
このskillは、現在のversionやchannelを固定するためではなく、変更判断の順序と恒久ルールを提供する。
## 先に確認するsource of truth
実装前に次を現行ファイル・read-only状態として確認する。
- `AGENTS.md`
- `package.json`、`yarn.lock`、`app.json`、`eas.json`
- `docs/refactor-audit/`の該当資料
- `docs/architecture/adr/`と`docs/release/release-matrix.md`
- 必要な場合はEASのbinary、runtime、channel、profile、Updateの実測
SDK、app version、build number、runtimeVersion、channel名はskillへ埋め込まない。現在値はsource of truthから読み、変更後の値と確認日を報告する。
## 恒久ルール
- React Navigationを明示的な依頼なしにExpo Routerへ移行しない。
- Navigation workaroundを削除・変更する前にgit historyと回帰テストを確認する。
- API responseをScreenから直接長期保持せず、通信・parser・domain adapterの境界を置く。
- 既存fallback API、observability、native lifecycle workaroundを理由なく削除しない。
- polling requestはowner、source、generation、fetchedAtを明示し、重複・late response・unmount後commitを防ぐ。
- Native module、target、config plugin、permission、entitlement、native依存を変えるときは、OTAだけで配信せずruntime/build互換性を確認する。
- JS-only変更でも、対象binaryが必要なnative APIとassetを持つことを確認してからOTAする。
## 変更手順
1. 監査Findingと対象コードの現状を再確認する。
2. ADRまたは小さなcontractを先に書き、変更範囲を限定する。
3. 既存navigation、fallback、mock/recording、observabilityを保った小さな実装にする。
4. typecheck、lint、unit testを実行し、必要ならexpo-doctorをinformationalに実行する。
5. native変更の有無、対象runtime、必要なDevelopment/Preview/Production Build、OTA可否を報告する。
## 関連文書
- `docs/architecture/adr/001-runtime-version-policy.md`
- `docs/release/release-matrix.md`
- `docs/architecture/domain-model.md`
@@ -0,0 +1,41 @@
---
name: jr-shikoku-data-model
description: Apply JR Shikoku railway data contracts for station identity, train identity, service date, wall-clock time, service minute, legacy adapters, and backend ownership. Use when adding parsers, repositories, fixtures, or domain mappings.
---
# JR四国アプリ data-model skill
このskillは全データ移行を指示するものではない。identityと時刻の境界を先に決め、既存legacy処理を段階的にadapterへ寄せるために使う。
## 正本
- 型とpure helper: `lib/domain/railway.ts`
- 契約書: `docs/architecture/domain-model.md`
- fixture: `tests/domainModel.test.ts`
- Backendとの正式なmapping/schema: Backend/domain master。アプリ内の駅一覧からcanonical IDを推測しない。
## Station identity
- Physical Stationは現実の駅施設を表し、`PhysicalStationId`はBackend/domain masterが発行する。
- Station Stopは路線・運行文脈ごとの停車点で、Physical Stationと別物である。
- Station Numberは`Y00`、`T28`、`M12`などのlegacy/line-specific referenceであり、単独のcanonical IDにしない。
- `adaptLegacyStationNumber()`は未解決の`physicalStationId: null`を返す。
- legacy lookupが複数候補を返したとき、最初の候補を勝手に採用しない。line/backend mappingを確認する。
## Train identity
列車番号だけを長期keyにしない。少なくとも`trainNumber`、`serviceDate`、`lineId`、`source`を使い、必要ならoperatorやservice variantを加える。`trainIdentityKey()`の複合keyをfixtureで守る。
## Railway time
- Calendar Date、Service Date、Wall Clock Time、Service Minuteを別型・別責務にする。
- `Wall Clock Time`は`00:00`〜`23:59`。24時台表記をJavaScript `Date`へ直接渡さない。
- `parseServiceMinute()`は`00:00 = 0`、`24:30 = 1470`、`25:15 = 1515`のextended表記を整数分にする。
- `serviceMinuteFromWallClock()`と`serviceDateFromCalendarDate()`は営業日境界を一つのpolicyとして扱う。既定値や境界時刻はBackend/運行ルールと照合する。
## 実装時のガードレール
- 既存`StationNumber`検索、WebView注入、運行情報parserを一括移行しない。
- canonical mappingがない欠損・曖昧データを推測で結合しない。
- API responseをScreenに長期保持せず、parser/adapterでcontractへ入れる。
- contract変更には小さなfixture testを追加し、legacy adapterとBackend責任分界を文書化する。
+1
View File
@@ -0,0 +1 @@
../../.agents/skills/animate-expo
+1
View File
@@ -0,0 +1 @@
../../.agents/skills/jr-shikoku-architecture
+1
View File
@@ -0,0 +1 @@
../../.agents/skills/jr-shikoku-data-model
+2 -1
View File
@@ -1,7 +1,8 @@
{
"mcpServers": {
"Sentry": {
"type": "http",
"url": "https://mcp.sentry.dev/mcp/xprocess-m5/jr-shikoku-unofficial-apps"
}
}
}
}
+2
View File
@@ -0,0 +1,2 @@
# Auto-generated by qwen-code.
worktrees/
+2 -1
View File
@@ -10,7 +10,8 @@
"Read(//home/ubuntu/.qwen/debug/**)",
"Bash(curl *)",
"mcp__sentry__search_events",
"mcp__sentry__find_organizations"
"mcp__sentry__find_organizations",
"Skill(jr-shikoku-architecture)"
]
}
}
+93
View File
@@ -0,0 +1,93 @@
# 開発エージェント向け指示
## 適用順序
このリポジトリでは、次の優先順位で判断してください。
1. ユーザーの明示的な依頼と安全上の制約
2. 実際の `package.json`、`yarn.lock`、`app.json`、既存コードの現在の構成
3. この `AGENTS.md` にあるJR四国アプリ固有のガードレール
4. `.agents/skills/animate-expo/` にある外部Skillの一般的な設計指針
Skillの例や推奨と実際のプロジェクト構成が衝突する場合は、アプリの構成とこのファイルを優先してください。互換性が不明な場合は、依存関係やnavigationを変更せず、まず現在のバージョンで利用可能なAPIを確認してください。
## animate-expo Skill
- Expo / React Nativeのanimation、gesture、sheet、screen transition、press feedback、hapticsを実装またはレビューするときは、まず `.agents/skills/animate-expo/SKILL.md` を読み、該当する場合は `RECIPES.md` も読みます。
- これは開発エージェント向けのinstruction-only Skillです。アプリのruntime依存関係ではありません。Skill内のインストール例を理由に、依存関係、native設定、Babel設定、navigationを自動変更しないでください。
- 導入元は [emilkowalski/skills](https://github.com/emilkowalski/skills) の `animate-expo`、確認時点の固定コミットは `d23d7f88a2e21c9e4b1418c7abe420f5c1052ba7`(2026-08-29)です。今回導入するSkillは `animate-expo` の2ファイルだけです。
- `animate`、`ask-sonner`、`pick-ui-library` など他のSkillは、このリポジトリへ導入済みとは扱いません。
## Skillの置き場所
- リポジトリのSkillの正本は `.agents/skills/` です(Codexが読む場所)。
- Claude Code向けに、`.claude/skills/` に `.agents/skills/` の各Skillへの相対symlinkを置いています。Skillを編集するときは `.agents/skills/` 側を変更し、Skillを追加したときは `.claude/skills/` にもsymlinkを追加してください。
## 現在の構成(current valuesは正本から確認)
- 現行の主要世代は Expo SDK 57、React Native 0.86系、React 19系です。patch/minorをこのファイルへ固定せず、正確な値は `package.json` と `yarn.lock` から確認してください。
- Reanimated、Worklets、Gesture Handlerなどのnative依存も、宣言値は `package.json`、解決値は `yarn.lock` を正本とします。
- Expo Routerは未導入です。現行はReact Navigation 7(`NavigationContainer`、bottom tabs、stack)を直接構成しています。
- Expo SDK 57 / React Native 0.86ではNew Architectureが既定です。現在の `app.json` に `newArchEnabled` の明示設定はありません。
- ルートの `App.tsx` には既に `GestureHandlerRootView` があります。
- `babel.config.js` には既存の `babel-preset-expo` と `react-native-reanimated/plugin` の設定があります。既存設定をSkillの説明だけで置き換えないでください。
- `expo-haptics` は依存していますが、ソースコードでのruntime使用は確認できていません。依存の正確なversionは正本から確認してください。
### animate-expo導入時のHistorical note
animate-expo Skill導入時に参照したSDK・依存関係の基準は過去の検証記録です。現在のversionを示すものではなく、現在値は必ず `package.json` / `yarn.lock` を確認してください。
## Source of truth
- Expo、React、React Native、Reanimated、Worklets、その他の依存関係は、宣言値を `package.json`、解決値を `yarn.lock` で確認する。AGENTS.mdへpatch/minor versionを転記して正本にしない。
- app version、iOS build number、Android versionCode、runtimeVersion、permission、entitlement、target、config pluginは `app.json` を確認する。
- EAS profile、distribution、channel、environmentは `eas.json` を確認する。
- 実際に配布されたbinary、runtime、channel、Update、audienceは、確認日付きのEAS CLI / EAS Dashboard観測を正本とする。リポジトリ設定からlive状態を推測しない。
## JR四国アプリ固有のanimation / compatibilityガードレール
- animationは目的ではなくUX改善の手段です。頻度、目的、情報理解への効果を確認し、不要なら追加しないでください。
- 100回/日以上使う操作(タブ切替、スクロール、設定toggle、頻繁なデータ更新)に目立つanimationを追加しないでください。列車走行位置、運行情報、駅・列車データの更新や表示をanimationで遅延させないでください。
- Reduced Motion / accessibilityを考慮し、translation、scale、parallax、overshootを含むanimationにはシステム設定に応じた低減経路を用意してください。既存のfont scaling制御もanimation導入のついでに変更しないでください。
- gesture / scrollのframeごとにReactの`setState`、RN runtimeへのcallback、hapticsを実行しないでください。JS threadを不要にブロックせず、連続値はUI runtime側で処理します。
- 高頻度更新UIでは再レンダリング、worklet、layout pass、メモリ、WebView負荷を確認し、animationを足す前後で体感と計測を比較してください。
- 既存のReanimated、core `Animated`、`LayoutAnimation`、WebView内CSS animationは、それぞれの互換性・用途を確認せず一括移行しないでください。特に既存のcore `Animated`や `runOnJS` / `.value` の書き換えは別タスクとして扱います。
- 新規のgesture / scroll連動の連続animationでは、現在のReanimated / Gesture HandlerのAPIを確認してUI thread駆動を優先します。現在のGesture Handlerはv2系なので、Skillのv3専用APIへ移行しないでください。
- 既存のキーボード回避実装(`lib/useKeyboardAvoid.ts`)は、iOS/Androidのタイミング対策を含む保護された挙動です。`react-native-keyboard-controller` の追加や置き換えは、明示的な別依頼と実機検証なしに行わないでください。
- 既存のnavigation設定とクラッシュ回避策を壊さないでください。とくに `App.tsx` のnative screens設定、`lib/stackOption.ts` のAndroid stack animation無効化、WebViewのライフサイクル制御をanimation改善だけで変更しないでください。
- Expo Routerへの移行、native tabs / `formSheet` / `Link.Menu` の導入、navigationの大規模変更は今回のSkill適用範囲外です。
- Expo SDK、React Native、Reanimatedのmajor version、New Architecture、既存navigationを、UI改善やSkill適用だけを理由に変更しないでください。新しい依存関係を追加する場合は、明示的な依頼と現在のSDKに対する互換性確認が必要です。
- 画面遷移は既存のReact Navigation構成とプラットフォーム別設定を基準にし、既存のAndroid `animationEnabled: false` をSkillのRouter例で上書きしないでください。
- hapticsは必要なユーザー操作に限り、視覚的なfeedbackの代替ではなく補助として1操作1回までにしてください。現在 `expo-haptics` は依存済みですが、今回の導入で使用箇所を新設しないでください。
## 変更範囲
animate-expo Skill導入時の変更範囲は、上記Skillファイルとこの `AGENTS.md` だけでした。各タスクの変更範囲は、現在のユーザー依頼と対象ファイルを基準に決め、未依頼のアプリコード、Expo設定、dependencies、lockfile、native treeを変更しないでください。
## Phase 0〜1.5で確定した恒久アーキテクチャルール
- React Navigationを、明示的な依頼なしにExpo Routerへ移行しない。
- Navigation workaroundを削除・変更する前に、git historyと回帰テストを確認する。
- API responseをScreenから直接長期保持しない。通信・parser・domain adapterの境界を通し、Screenは必要な表示状態だけを購読する。
- `station number`をPhysical Stationのcanonical IDとして新規利用しない。Physical Station、Station Stop、Station Numberを分離する。
- 列車番号だけを長期的なcanonical train identityとして新規利用しない。少なくともService Date、line、sourceを組み合わせる。
- Native code、local module、target、config plugin、permission、entitlementの変更時は、OTA互換性を確認する。
- Native変更を含む場合は、runtimeVersionと対象binary/buildの互換性を確認してからreleaseする。
- 既存fallback APIを、代替経路と観測・回帰確認なしに削除しない。
- pollingやsource切替のrequestは所有者を一つにし、in-flight重複、late response、unmount後のcommitを防ぐ。
- 24時台・25時台などの鉄道時刻をJavaScript `Date`だけで表現しない。Calendar Date、Service Date、Wall Clock Time、Service Minuteを分離する。
- release/runtimeの現在値は`app.json`、`eas.json`、package manifest/lockfile、EASの実測を確認する。現在のversionをskillの恒久ルールへ固定しない。
- architecture/domainの契約変更は、`docs/architecture/`とpure fixture testを先に更新し、全データ移行を同じ変更へ混ぜない。
## Network transport policy
- 現在の通信baselineは標準の `fetch` です。Nitro Fetch用のdependency、runtime code、共通transport実装は現行treeにありません。
- `react-native-nitro-fetch` / `react-native-nitro-modules` はSDK57で別branch・別binaryの検証を行いましたが、Nitro経路を有効にしたiOS/Android双方で起動時クラッシュを確認したため、7.2では採用しませんでした。
- Nitro Fetchを明示的な新規検証依頼なしに再導入しないでください。過去の検証文書はactive roadmapではなく、historical experiment recordとして扱います。
- これは永久禁止ではありません。library、Expo、React Native側の互換性が変わり、クラッシュ原因を隔離できる専用検証を行える場合に限り、標準fetchをbaselineとして別branch・別binaryで再評価します。
## Git運用
- ブランチを`develop`へ統合するときは、原則として明示的なマージコミットを作成する。`git merge --no-ff`を使用し、fast-forwardだけで統合しない。
- マージ前に対象ブランチ、ベースコミット、作業ツリーの状態を確認し、既存の変更履歴をrebaseやsquashで書き換えない。
+32 -290
View File
@@ -1,77 +1,21 @@
import React, { useEffect } from "react";
import {
IS_LOW_DENSITY,
DEX_SCALE,
useRealWindowDimensions,
} from "./utils/dexDimensionOverride";
import { Linking, Platform, UIManager, View } from "react-native";
import React from "react";
import { LogBox, Platform, UIManager } from "react-native";
import { enableFreeze, enableScreens } from "react-native-screens";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import "./utils/disableFontScaling"; // グローバルなフォントスケーリング無効化
import { AppContainer } from "./Apps";
import { UpdateAsync } from "./UpdateAsync";
import { LogBox } from "react-native";
import { FavoriteStationProvider } from "./stateBox/useFavoriteStation";
import { CurrentTrainProvider } from "./stateBox/useCurrentTrain";
import { AreaInfoProvider } from "./stateBox/useAreaInfo";
import { BusAndTrainDataProvider } from "./stateBox/useBusAndTrainData";
import { AllTrainDiagramProvider } from "./stateBox/useAllTrainDiagram";
import { SheetProvider, SheetManager } from "react-native-actions-sheet";
import "./components/ActionSheetComponents/sheets";
import { TrainDelayDataProvider } from "./stateBox/useTrainDelayData";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { DeviceOrientationChangeProvider } from "./stateBox/useDeviceOrientationChange";
import { TrainMenuProvider } from "./stateBox/useTrainMenu";
import { buildProvidersTree } from "./lib/providerTreeProvider";
import { StationListProvider } from "./stateBox/useStationList";
import { NotificationProvider } from "./stateBox/useNotifications";
import { UserPositionProvider } from "./stateBox/useUserPosition";
import "./utils/disableFontScaling"; // 実行時のフォントスケーリング判定
import { initializeSentry, wrapWithSentry } from "./lib/observability/sentry";
import { useAppLifecycleObservability } from "./lib/observability/useAppLifecycleObservability";
import { useAppBootstrap } from "./lib/useAppBootstrap";
import { useStartupDeepLinkNavigation } from "./lib/useStartupDeepLinkNavigation";
import { AppRootLayout } from "./components/AppRootLayout";
import { AppErrorBoundary } from "./components/AppErrorBoundary";
import {
markStartupExplicitTarget,
resolveStartupNavigationSource,
rootNavigationRef,
stackAwareNavigate,
} from "./lib/rootNavigation";
import { AppThemeProvider } from "./lib/theme";
import StatusbarDetect from "./StatusbarDetect";
import * as Sentry from "@sentry/react-native";
import {
startAppLifecycleCrashSentinel,
stopAppLifecycleCrashSentinel,
} from "./lib/observability/appLifecycleCrashSentinel";
import { migrateLegacyVoicepeakSettings } from "./lib/migrateLegacyVoicepeakSettings";
markStartup,
markStartupOnce,
scheduleStartupReports,
} from "./lib/devStartupPerformance";
Sentry.init({
dsn: "https://1090312e4cf501f5a455d523eff2d538@o4511646874664960.ingest.us.sentry.io/4511646880432128",
// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,
// Enable Logs
enableLogs: true,
// Configure Session Replay
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1,
integrations: [
Sentry.mobileReplayIntegration(),
Sentry.feedbackIntegration(),
],
tracesSampleRate: __DEV__ ? 1.0 : 0.05,
beforeSend(event) {
const dataFetch = event.contexts?.data_fetch as any;
if (dataFetch?.responseHead && typeof dataFetch.responseHead === "string") {
dataFetch.responseHead = dataFetch.responseHead.slice(0, 300);
}
return event;
},
// uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: __DEV__,
});
initializeSentry();
markStartupOnce("app-module-ready", "app module ready");
LogBox.ignoreLogs([
"ViewPropTypes will be removed",
@@ -80,6 +24,11 @@ LogBox.ignoreLogs([
const nativeScreensDisabled =
Platform.OS === "ios" || Platform.OS === "android";
const nativeScreensMode = nativeScreensDisabled
? "screens-disabled"
: "default";
const rootTabSceneMode =
Platform.OS === "android" ? "opacity-fixed-z-v1" : "default";
if (nativeScreensDisabled) {
enableFreeze(false);
@@ -92,227 +41,20 @@ if (Platform.OS === "android") {
}
}
export default Sentry.wrap(function App() {
useEffect(() => {
const nativeScreensMode = nativeScreensDisabled
? "screens-disabled"
: "default";
const rootTabSceneMode =
Platform.OS === "android" ? "opacity-fixed-z-v1" : "default";
Sentry.setTag("native_screens_mode", nativeScreensMode);
Sentry.setTag("root_tab_scene_mode", rootTabSceneMode);
Sentry.setContext("runtime_navigation_flags", {
platform: Platform.OS,
nativeScreensMode,
rootTabSceneMode,
});
Sentry.addBreadcrumb({
category: "runtime.flags",
level: "info",
message: "runtime navigation flags applied",
data: {
platform: Platform.OS,
nativeScreensMode,
rootTabSceneMode,
},
});
void startAppLifecycleCrashSentinel({ nativeScreensMode });
return () => {
stopAppLifecycleCrashSentinel();
};
export default wrapWithSentry(function App() {
markStartupOnce("app-render", "App render");
scheduleStartupReports();
useAppLifecycleObservability({ nativeScreensMode, rootTabSceneMode });
useAppBootstrap();
useStartupDeepLinkNavigation();
React.useEffect(() => {
markStartup("App effect committed");
}, []);
useEffect(() => {
UpdateAsync();
}, []);
useEffect(() => {
void migrateLegacyVoicepeakSettings();
}, []);
useEffect(() => {
const openFelicaPage = (retryCount = 0) => {
if (!rootNavigationRef.isReady()) {
if (retryCount < 8) {
setTimeout(() => openFelicaPage(retryCount + 1), 250);
}
return;
}
stackAwareNavigate("topMenu", {
screen: "setting",
params: {
screen: "FelicaHistoryPage",
},
});
};
const navigateWhenReady = (
callback: () => void,
url: string,
retryCount = 0,
) => {
if (!rootNavigationRef.isReady()) {
if (retryCount < 8) {
setTimeout(
() => navigateWhenReady(callback, url, retryCount + 1),
250,
);
}
return;
}
callback();
};
const routeFromUrl = (url: string, retryCount = 0) => {
const normalized = (url || "").toLowerCase();
if (!normalized) return false;
if (
normalized.includes("felicahistorypage") ||
normalized.includes("open/felica")
) {
markStartupExplicitTarget();
navigateWhenReady(() => openFelicaPage(), url, retryCount);
return true;
}
if (normalized.includes("open/traininfo")) {
markStartupExplicitTarget();
navigateWhenReady(
() => {
stackAwareNavigate("topMenu", { screen: "menu" });
setTimeout(() => {
SheetManager.show("JRSTraInfo");
}, 450);
},
url,
retryCount,
);
return true;
}
if (normalized.includes("open/operation")) {
markStartupExplicitTarget();
navigateWhenReady(
() => {
stackAwareNavigate("information");
},
url,
retryCount,
);
return true;
}
if (normalized.includes("open/settings")) {
markStartupExplicitTarget();
navigateWhenReady(
() => {
stackAwareNavigate("topMenu", {
screen: "setting",
});
},
url,
retryCount,
);
return true;
}
if (normalized.includes("open/topmenu")) {
markStartupExplicitTarget();
navigateWhenReady(
() => {
stackAwareNavigate("topMenu", {
screen: "menu",
});
},
url,
retryCount,
);
return true;
}
if (normalized.includes("positions/apps")) {
markStartupExplicitTarget();
navigateWhenReady(
() => {
stackAwareNavigate("positions");
},
url,
retryCount,
);
return true;
}
return false;
};
Linking.getInitialURL()
.then((url) => {
if (url) routeFromUrl(url);
})
.finally(() => {
resolveStartupNavigationSource();
});
const sub = Linking.addEventListener("url", ({ url }) => {
routeFromUrl(url);
});
return () => {
sub.remove();
};
}, []);
const ProviderTree = buildProvidersTree([
AllTrainDiagramProvider,
NotificationProvider,
UserPositionProvider,
StationListProvider,
FavoriteStationProvider,
TrainDelayDataProvider,
TrainMenuProvider, // CurrentTrainProvider より先に置くことで useTrainMenu が使える
CurrentTrainProvider,
AreaInfoProvider,
BusAndTrainDataProvider,
SheetProvider,
]);
return (
<AppThemeProvider>
<DeviceOrientationChangeProvider>
<SafeAreaProvider>
<StatusbarDetect />
<DensityScaleWrapper>
<GestureHandlerRootView style={{ flex: 1 }}>
<ProviderTree>
<AppContainer />
</ProviderTree>
</GestureHandlerRootView>
</DensityScaleWrapper>
</SafeAreaProvider>
</DeviceOrientationChangeProvider>
</AppThemeProvider>
<AppErrorBoundary scope="root">
<AppRootLayout />
</AppErrorBoundary>
);
});
/**
* 低密度ディスプレイ(DeX等)で全体を transform scale で拡大。
* Dimensions.get をパッチ済みなので、コンポーネントは内部サイズに合わせてレイアウトする。
*/
function DensityScaleWrapper({ children }: { children: React.ReactNode }) {
const { width, height } = useRealWindowDimensions();
if (!IS_LOW_DENSITY) {
return <>{children}</>;
}
return (
<View style={{ width, height, overflow: "hidden" }}>
<View
style={{
width: width / DEX_SCALE,
height: height / DEX_SCALE,
transform: [{ scale: DEX_SCALE }],
transformOrigin: "top left",
}}
>
{children}
</View>
</View>
);
}
+490
View File
@@ -0,0 +1,490 @@
import React, {
useState,
useMemo,
useEffect,
createContext,
memo,
useContext,
} from "react";
import {
NavigationContainer,
DarkTheme,
DefaultTheme,
type EventArg,
} from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { ActivityIndicator, View } from "react-native";
import TNDView from "./ndView";
import { initIcon } from "./lib/initIcon";
import { Top } from "./Top";
import { MenuPage } from "./MenuPage";
import { AppErrorBoundary } from "./components/AppErrorBoundary";
import "./components/ActionSheetComponents/sheets";
import { rootNavigationRef } from "./lib/rootNavigation";
import WebView from "react-native-webview";
import { setAppLifecycleWebViewActive } from "./lib/observability/appLifecycleCrashSentinel";
import type { RootTabParamList } from "@/types/navigation";
import { useThemeColors } from "./lib/theme";
import { telemetry } from "./lib/observability/telemetry";
import { useAppContainerController } from "./lib/useAppContainerController";
import { useCurrentTrainPolling } from "./stateBox/useCurrentTrain";
import {
getTabBarAppearance,
TabBarBackground,
} from "./components/AppContainer/TabBarBackground";
import {
markStartup,
markStartupOnce,
markStartupState,
} from "./lib/devStartupPerformance";
import { PositionsStartupReadyContext } from "./lib/positionsStartupContext";
const startupPreloadTelemetry = telemetry.scope("startup.preload");
const positionsRootTelemetry = telemetry.scope("positions.root");
const operationRootTelemetry = telemetry.scope("operation.root");
const Tab = createBottomTabNavigator<RootTabParamList>();
const HiddenStartupPreloadWebViews = ({
shouldPreloadInformation,
onInformationLoadStart,
onInformationLoadSettled,
}: {
shouldPreloadInformation: boolean;
onInformationLoadStart: () => void;
onInformationLoadSettled: () => void;
}) => {
const [informationLoaded, setInformationLoaded] = useState(false);
useEffect(() => {
telemetry.context("startup_hidden_preload", {
shouldPreloadInformation,
informationLoaded,
});
}, [
informationLoaded,
shouldPreloadInformation,
]);
const hiddenStyle = useMemo(
() => ({
position: "absolute" as const,
width: 1,
height: 1,
opacity: 0,
left: -1000,
top: -1000,
pointerEvents: "none" as const,
}),
[],
);
const showInformation = shouldPreloadInformation && !informationLoaded;
useEffect(() => {
markStartupState(
"hidden-startup-preload-state",
"hidden startup preload state",
{
showInformation,
informationLoaded,
},
);
}, [
informationLoaded,
showInformation,
]);
if (!showInformation) return null;
return (
<View pointerEvents="none" style={hiddenStyle}>
{showInformation ? (
<WebView
source={{ uri: "https://www.jr-shikoku.co.jp/info/" }}
originWhitelist={["https://www.jr-shikoku.co.jp"]}
javaScriptEnabled
setSupportMultipleWindows={false}
onLoadStart={() => {
onInformationLoadStart();
setAppLifecycleWebViewActive("startup_hidden_operation", true);
startupPreloadTelemetry.info("operation hidden preload loadStart");
}}
onLoadEnd={() => {
onInformationLoadSettled();
setAppLifecycleWebViewActive("startup_hidden_operation", false);
startupPreloadTelemetry.info("operation hidden preload loadEnd");
setInformationLoaded(true);
}}
onError={() => {
onInformationLoadSettled();
setAppLifecycleWebViewActive("startup_hidden_operation", false);
startupPreloadTelemetry.error("operation hidden preload error");
}}
/>
) : null}
</View>
);
};
const ContextData = {
shouldActivate: false,
isRootFocused: false,
};
const PositionsRootGateContext = createContext(ContextData);
const InformationRootGateContext = createContext(ContextData);
type DeferredRootProps = {
shouldActivate: boolean;
isRootFocused: boolean;
};
const DeferredPositionsRoot = (props: DeferredRootProps) => {
const { shouldActivate, isRootFocused } = props;
const [hasActivated, setHasActivated] = useState(false);
useEffect(() => {
markStartupState("positions-root-gate", "positions root gate state", {
focused: isRootFocused,
activated: hasActivated,
shouldActivate,
});
telemetry.context("positions_root_gate", {
focused: isRootFocused,
activated: hasActivated,
shouldActivate,
});
}, [hasActivated, isRootFocused, shouldActivate]);
useEffect(() => {
if (!shouldActivate || hasActivated) return;
markStartup("positions root activation scheduled", {
focused: isRootFocused,
});
positionsRootTelemetry.breadcrumb({
message: "positions root activation",
data: {
reason: "first_root_visit",
},
});
markStartupOnce(
"positions-root-activated",
"positions root activation committed",
);
setHasActivated(true);
}, [hasActivated, shouldActivate]);
if (!hasActivated) {
return <View style={{ flex: 1 }} />;
}
return (
<AppErrorBoundary scope="positions">
<Top />
</AppErrorBoundary>
);
};
const PositionsTabScreen = memo(() => {
const { shouldActivate, isRootFocused } = useContext(
PositionsRootGateContext,
);
return (
<DeferredPositionsRoot
shouldActivate={shouldActivate}
isRootFocused={isRootFocused}
/>
);
});
PositionsTabScreen.displayName = "PositionsTabScreen";
const DeferredInformationRoot = (props: DeferredRootProps) => {
const { shouldActivate, isRootFocused } = props;
const [hasActivated, setHasActivated] = useState(false);
useEffect(() => {
markStartupState("operation-root-gate", "operation root gate state", {
focused: isRootFocused,
activated: hasActivated,
shouldActivate,
});
telemetry.context("operation_root_gate", {
focused: isRootFocused,
activated: hasActivated,
shouldActivate,
});
}, [hasActivated, isRootFocused, shouldActivate]);
useEffect(() => {
if (!shouldActivate || hasActivated) return;
markStartup("operation root activation scheduled", {
focused: isRootFocused,
});
operationRootTelemetry.breadcrumb({
message: "operation root activation",
data: {
reason: isRootFocused ? "first_focus" : "background_prewarm",
},
});
markStartupOnce(
"operation-root-activated",
"operation root activation committed",
);
setHasActivated(true);
}, [hasActivated, isRootFocused, shouldActivate]);
if (!hasActivated) {
return <View style={{ flex: 1 }} />;
}
return (
<AppErrorBoundary scope="information">
<TNDView />
</AppErrorBoundary>
);
};
const MenuTabScreen = () => (
<AppErrorBoundary scope="topMenu">
<MenuPage />
</AppErrorBoundary>
);
const InformationTabScreen = memo(() => {
const { shouldActivate, isRootFocused } = useContext(
InformationRootGateContext,
);
return (
<DeferredInformationRoot
shouldActivate={shouldActivate}
isRootFocused={isRootFocused}
/>
);
});
InformationTabScreen.displayName = "InformationTabScreen";
export function AppContainer() {
markStartupOnce("app-container-render", "AppContainer render");
const controller = useAppContainerController();
const {
areaInfo,
areaIconBadgeText,
isInfo,
selectedLine,
isExtraWindowOpen,
startupInitialRoute,
hasVisitedPositions,
hasVisitedInformation,
positionsInitialLoadReady,
currentRootRoute,
fontLoaded,
startupIconFontsLoaded,
shouldPreloadInformation,
handlePositionsInitialLoadReady,
handlePositionsStackReady,
handlePositionsWebViewLoadStarted,
handleOperationWebViewLoadStarted,
handleOperationWebViewLoadSettled,
positionsStackReady,
positionsWebViewLoadStarted,
operationWebViewPreloadActive,
operationWebViewLoadStarted,
operationWebViewLoadSettled,
} = controller;
// トップメニューの列車情報だけは、画面のmountや走行位置WebViewを待たず
// 既存のCurrentTrainProviderを購読して初回取得を開始する。
useCurrentTrainPolling(
startupInitialRoute === "topMenu" &&
(currentRootRoute === null || currentRootRoute === "topMenu"),
);
const { isDark } = useThemeColors();
const operationWebViewPreloadPending =
operationWebViewPreloadActive;
useEffect(() => {
markStartupState("app-container-gate", "AppContainer gate state", {
fontLoaded,
startupIconFontsLoaded,
startupInitialRoute,
navigationReady: controller.navigationReady,
});
}, [
controller.navigationReady,
fontLoaded,
startupIconFontsLoaded,
startupInitialRoute,
]);
const linking = {
prefixes: ["jrshikoku://"],
config: {
screens: {
positions: {
screens: {},
},
topMenu: {
screens: {
menu: "topMenu/menu",
setting: {
screens: {
settingTopPage: "topMenu/setting",
FelicaHistoryPage: "topMenu/setting/FelicaHistoryPage",
},
},
},
},
information: "information",
},
},
};
const getTabProps = (
name: keyof RootTabParamList,
label: string,
icon: string,
iconFamily: "Ionicons" | "AntDesign",
tabBarBadge?: string,
isInfo?: boolean,
) => ({
name,
options: {
tabBarLabel: label,
headerShown: false,
gestureEnabled: true,
unmountOnBlur: false,
tabBarIcon: initIcon(icon as any, iconFamily, tabBarBadge, isInfo),
},
});
if (!fontLoaded || !startupInitialRoute) {
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<ActivityIndicator size="large" />
</View>
);
}
return (
<NavigationContainer
ref={rootNavigationRef}
linking={linking}
theme={isDark ? DarkTheme : DefaultTheme}
onReady={controller.handleNavigationReady}
onStateChange={controller.handleNavigationStateChange}
>
<PositionsStartupReadyContext.Provider
value={{
stackReady: positionsStackReady,
webViewLoadStarted: positionsWebViewLoadStarted,
initialLoadReady: positionsInitialLoadReady,
operationWebViewPreloadPending,
operationWebViewLoadStarted,
operationWebViewLoadSettled,
notifyInitialLoadReady: handlePositionsInitialLoadReady,
notifyStackReady: handlePositionsStackReady,
notifyWebViewLoadStarted: handlePositionsWebViewLoadStarted,
notifyOperationWebViewLoadStarted: handleOperationWebViewLoadStarted,
notifyOperationWebViewLoadSettled: handleOperationWebViewLoadSettled,
}}
>
<PositionsRootGateContext.Provider
value={{
shouldActivate: hasVisitedPositions,
isRootFocused: currentRootRoute === "positions",
}}
>
<InformationRootGateContext.Provider
value={{
shouldActivate: hasVisitedInformation,
isRootFocused: currentRootRoute === "information",
}}
>
<Tab.Navigator
id="rootTabs"
detachInactiveScreens={false}
initialRouteName={startupInitialRoute}
screenListeners={({ route }) => ({
tabPress: (event: EventArg<"tabPress", true>) => {
controller.handleRootTabPress(route.name, event);
},
focus: () => {
controller.handleRootTabFocus(route.name);
},
blur: () => {
controller.handleRootTabBlur(route.name);
},
state: (event) => {
controller.handleRootTabState(route.name, event.type);
},
})}
screenOptions={({ route }) => {
const tabBarBackgroundProps = {
routeName: route.name,
selectedLine,
isDark,
isExtraWindowOpen,
};
const {
defaultBg,
activeTintColor,
inactiveTintColor,
} = getTabBarAppearance(tabBarBackgroundProps);
return {
lazy: false,
freezeOnBlur: false,
sceneContainerStyle: { backgroundColor: defaultBg },
tabBarActiveTintColor: activeTintColor,
tabBarInactiveTintColor: inactiveTintColor,
tabBarStyle: { backgroundColor: "transparent" },
tabBarBackground: () => (
<TabBarBackground {...tabBarBackgroundProps} />
),
};
}}
>
<Tab.Screen
{...getTabProps(
"positions",
"走行位置",
"bar-chart",
"AntDesign",
)}
component={PositionsTabScreen}
listeners={{
tabPress: controller.activatePositionsFromTabPress,
focus: controller.activatePositionsFromFocus,
blur: controller.preservePositionsOnBlur,
}}
/>
<Tab.Screen
{...getTabProps("topMenu", "トップメニュー", "radio", "Ionicons")}
component={MenuTabScreen}
/>
<Tab.Screen
{...getTabProps(
"information",
"運行情報",
"train",
"Ionicons",
areaInfo ? areaIconBadgeText : undefined,
isInfo,
)}
component={InformationTabScreen}
listeners={{
tabPress: controller.activateInformationFromTabPress,
focus: controller.activateInformationFromFocus,
blur: controller.preserveInformationOnBlur,
}}
/>
</Tab.Navigator>
</InformationRootGateContext.Provider>
</PositionsRootGateContext.Provider>
</PositionsStartupReadyContext.Provider>
<HiddenStartupPreloadWebViews
shouldPreloadInformation={shouldPreloadInformation}
onInformationLoadStart={handleOperationWebViewLoadStarted}
onInformationLoadSettled={handleOperationWebViewLoadSettled}
/>
</NavigationContainer>
);
}
-755
View File
@@ -1,755 +0,0 @@
import React from "react";
import { NavigationContainer, DarkTheme, DefaultTheme, type EventArg } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { Animated, Platform, ActivityIndicator, View, StyleSheet, StatusBar, useWindowDimensions, InteractionManager } from "react-native";
import { useNavigationState } from "@react-navigation/native";
import { useFonts } from "expo-font";
import { LinearGradient } from "expo-linear-gradient";
import TNDView from "./ndView";
import { initIcon } from "./lib/initIcon";
import { Top } from "./Top";
import { MenuPage } from "./MenuPage";
import { useAreaInfo } from "./stateBox/useAreaInfo";
import { useTrainMenu } from "./stateBox/useTrainMenu";
import lineColorList from "./assets/originData/lineColorList";
import { stationIDPair } from "./lib/getStationList";
import "./components/ActionSheetComponents/sheets";
import { lastObservedRootRouteRef, positionsLifecycleRef, rootNavigationRef } from "./lib/rootNavigation";
import {
startupExplicitTargetRef,
waitForStartupNavigationResolution,
} from "./lib/rootNavigation";
import { fixedColors } from "./lib/theme/colors";
import { useThemeColors } from "./lib/theme";
import * as Sentry from "@sentry/react-native";
import WebView from "react-native-webview";
import { AS } from "./storageControl";
import { STORAGE_KEYS } from "./constants/storage";
import {
recordAppLifecycleRootNavigation,
setAppLifecycleWebViewActive,
} from "./lib/observability/appLifecycleCrashSentinel";
type RootTabParamList = {
positions: undefined;
topMenu: undefined;
information: undefined;
};
type TabProps = {
name: string;
label: string;
icon: string;
iconFamily: string;
tabBarBadge?: string;
isInfo?: boolean;
};
const Tab = createBottomTabNavigator<RootTabParamList>();
const HiddenStartupPreloadWebViews = ({
shouldPreloadPositions,
shouldPreloadInformation,
}: {
shouldPreloadPositions: boolean;
shouldPreloadInformation: boolean;
}) => {
const [positionsLoaded, setPositionsLoaded] = React.useState(false);
const [informationLoaded, setInformationLoaded] = React.useState(false);
React.useEffect(() => {
Sentry.setContext("startup_hidden_preload", {
shouldPreloadPositions,
shouldPreloadInformation,
positionsLoaded,
informationLoaded,
});
}, [informationLoaded, positionsLoaded, shouldPreloadInformation, shouldPreloadPositions]);
const hiddenStyle = React.useMemo(() => ({
position: "absolute" as const,
width: 1,
height: 1,
opacity: 0,
left: -1000,
top: -1000,
pointerEvents: "none" as const,
}), []);
const showPositions = shouldPreloadPositions && !positionsLoaded;
const showInformation = shouldPreloadInformation && !informationLoaded;
if (!showPositions && !showInformation) return null;
return (
<View pointerEvents="none" style={hiddenStyle}>
{showPositions ? (
<WebView
source={{ uri: "https://train.jr-shikoku.co.jp/" }}
originWhitelist={["https://train.jr-shikoku.co.jp"]}
javaScriptEnabled
setSupportMultipleWindows={false}
onLoadStart={() => {
setAppLifecycleWebViewActive("startup_hidden_positions", true);
Sentry.addBreadcrumb({
category: "startup.preload",
level: "info",
message: "positions hidden preload loadStart",
});
}}
onLoadEnd={() => {
setAppLifecycleWebViewActive("startup_hidden_positions", false);
Sentry.addBreadcrumb({
category: "startup.preload",
level: "info",
message: "positions hidden preload loadEnd",
});
setPositionsLoaded(true);
}}
onError={() => {
setAppLifecycleWebViewActive("startup_hidden_positions", false);
Sentry.addBreadcrumb({
category: "startup.preload",
level: "error",
message: "positions hidden preload error",
});
}}
/>
) : null}
{showInformation ? (
<WebView
source={{ uri: "https://www.jr-shikoku.co.jp/info/" }}
originWhitelist={["https://www.jr-shikoku.co.jp"]}
javaScriptEnabled
setSupportMultipleWindows={false}
onLoadStart={() => {
setAppLifecycleWebViewActive("startup_hidden_operation", true);
Sentry.addBreadcrumb({
category: "startup.preload",
level: "info",
message: "operation hidden preload loadStart",
});
}}
onLoadEnd={() => {
setAppLifecycleWebViewActive("startup_hidden_operation", false);
Sentry.addBreadcrumb({
category: "startup.preload",
level: "info",
message: "operation hidden preload loadEnd",
});
setInformationLoaded(true);
}}
onError={() => {
setAppLifecycleWebViewActive("startup_hidden_operation", false);
Sentry.addBreadcrumb({
category: "startup.preload",
level: "error",
message: "operation hidden preload error",
});
}}
/>
) : null}
</View>
);
};
const PositionsRootGateContext = React.createContext({
shouldActivate: false,
isRootFocused: false,
});
const InformationRootGateContext = React.createContext({
shouldActivate: false,
isRootFocused: false,
});
const DeferredPositionsRoot = ({ shouldActivate, isRootFocused }: { shouldActivate: boolean; isRootFocused: boolean }) => {
const [hasActivated, setHasActivated] = React.useState(false);
React.useEffect(() => {
Sentry.setContext("positions_root_gate", {
focused: isRootFocused,
activated: hasActivated,
shouldActivate,
});
}, [hasActivated, isRootFocused, shouldActivate]);
React.useEffect(() => {
if (!shouldActivate || hasActivated) return;
Sentry.addBreadcrumb({
category: "positions.root",
level: "info",
message: "positions root activation",
data: {
reason: "first_root_visit",
},
});
setHasActivated(true);
}, [hasActivated, shouldActivate]);
if (!hasActivated) {
return <View style={{ flex: 1 }} />;
}
return <Top />;
};
const PositionsTabScreen = React.memo(() => {
const { shouldActivate, isRootFocused } = React.useContext(PositionsRootGateContext);
return (
<DeferredPositionsRoot
shouldActivate={shouldActivate}
isRootFocused={isRootFocused}
/>
);
});
PositionsTabScreen.displayName = "PositionsTabScreen";
const DeferredInformationRoot = ({ shouldActivate, isRootFocused }: { shouldActivate: boolean; isRootFocused: boolean }) => {
const [hasActivated, setHasActivated] = React.useState(false);
React.useEffect(() => {
Sentry.setContext("operation_root_gate", {
focused: isRootFocused,
activated: hasActivated,
shouldActivate,
});
}, [hasActivated, isRootFocused, shouldActivate]);
React.useEffect(() => {
if (!shouldActivate || hasActivated) return;
Sentry.addBreadcrumb({
category: "operation.root",
level: "info",
message: "operation root activation",
data: {
reason: isRootFocused ? "first_focus" : "background_prewarm",
},
});
setHasActivated(true);
}, [hasActivated, isRootFocused, shouldActivate]);
if (!hasActivated) {
return <View style={{ flex: 1 }} />;
}
return <TNDView />;
};
const InformationTabScreen = React.memo(() => {
const { shouldActivate, isRootFocused } = React.useContext(InformationRootGateContext);
return (
<DeferredInformationRoot
shouldActivate={shouldActivate}
isRootFocused={isRootFocused}
/>
);
});
InformationTabScreen.displayName = "InformationTabScreen";
export function AppContainer() {
const { areaInfo, areaIconBadgeText, isInfo } = useAreaInfo();
const { selectedLine } = useTrainMenu();
const { width, height } = useWindowDimensions();
const [isExtraWindowOpen, setIsExtraWindowOpen] = React.useState(false);
const [startupInitialRoute, setStartupInitialRoute] = React.useState<keyof RootTabParamList | null>(null);
const [hasVisitedPositions, setHasVisitedPositions] = React.useState(false);
const [hasVisitedInformation, setHasVisitedInformation] = React.useState(false);
const [currentRootRoute, setCurrentRootRoute] = React.useState<keyof RootTabParamList | null>(null);
const [navigationReady, setNavigationReady] = React.useState(false);
const startupPrewarmAttemptedRef = React.useRef(false);
const informationStartupPrewarmAttemptedRef = React.useRef(false);
// フェードアニメーション用 (0=通常, 1=追加ウィンドウ青)
const fadeAnim = React.useRef(new Animated.Value(0)).current;
React.useEffect(() => {
Animated.timing(fadeAnim, {
toValue: isExtraWindowOpen ? 1 : 0,
duration: 300,
useNativeDriver: false,
}).start();
}, [isExtraWindowOpen]);
const lineColor = selectedLine && stationIDPair[selectedLine]
? lineColorList[stationIDPair[selectedLine]]
: null;
const darkenHex = (hex: string, factor: number) => {
const h = hex.replace("#", "");
const r = Math.round(parseInt(h.slice(0, 2), 16) * factor);
const g = Math.round(parseInt(h.slice(2, 4), 16) * factor);
const b = Math.round(parseInt(h.slice(4, 6), 16) * factor);
return `#${[r, g, b].map((v) => Math.min(255, v).toString(16).padStart(2, "0")).join("")}`;
};
const { isDark } = useThemeColors();
const lastRootNavStateRef = React.useRef("");
const lineColorDark = lineColor ? darkenHex(lineColor, 0.78) : null;
React.useEffect(() => {
let cancelled = false;
void (async () => {
await waitForStartupNavigationResolution();
if (cancelled) return;
let nextInitialRoute: keyof RootTabParamList = "topMenu";
if (!startupExplicitTargetRef.current) {
try {
const startPage = await AS.getItem(STORAGE_KEYS.START_PAGE);
if (startPage === "true") {
nextInitialRoute = "positions";
}
} catch {
// Keep the default route when the setting is unset or unreadable.
}
}
if (cancelled) return;
setStartupInitialRoute(nextInitialRoute);
setHasVisitedPositions(nextInitialRoute === "positions");
Sentry.addBreadcrumb({
category: "nav.root",
level: "info",
message: "startup initial root route resolved",
data: {
startupExplicitTarget: startupExplicitTargetRef.current,
initialRoute: nextInitialRoute,
},
});
})();
return () => {
cancelled = true;
};
}, []);
const linking = {
prefixes: ["jrshikoku://"],
config: {
screens: {
positions: {
screens: {},
},
topMenu: {
screens: {
menu: "topMenu/menu",
setting: {
screens: {
settingTopPage: "topMenu/setting",
FelicaHistoryPage: "topMenu/setting/FelicaHistoryPage",
},
},
},
},
information: "information",
},
},
};
const getTabProps = (
name: keyof RootTabParamList,
label: string,
icon: string,
iconFamily: "Ionicons" | "AntDesign",
tabBarBadge?: string,
isInfo?: boolean
) => ({
name,
options: {
tabBarLabel: label,
headerShown: false,
gestureEnabled: true,
unmountOnBlur: false,
tabBarIcon: initIcon(icon as any, iconFamily, tabBarBadge, isInfo),
},
});
const applyRootNavigationState = React.useCallback((state: any, source: "ready" | "change") => {
const activeRoute = state?.routes?.[state?.index ?? 0];
const hasExtra = (activeRoute?.state?.index ?? 0) > 0;
const nestedState = activeRoute?.state;
const nestedRoute = nestedState?.routes?.[nestedState.index ?? 0]?.name ?? null;
const signature = JSON.stringify({
rootIndex: state?.index ?? 0,
rootRoute: activeRoute?.name ?? null,
nestedIndex: nestedState?.index ?? 0,
nestedRoute,
hasExtra,
});
if (lastRootNavStateRef.current !== signature) {
lastRootNavStateRef.current = signature;
Sentry.addBreadcrumb({
category: "nav.root",
level: "info",
message: source === "ready" ? "root state initialized" : "root state change",
data: {
rootIndex: state?.index ?? 0,
rootRoute: activeRoute?.name ?? null,
nestedIndex: nestedState?.index ?? 0,
nestedRoute,
hasExtra,
source,
},
});
}
const rootRouteName = (activeRoute?.name ?? null) as keyof RootTabParamList | null;
if (rootRouteName) {
lastObservedRootRouteRef.current = rootRouteName;
}
recordAppLifecycleRootNavigation({
rootIndex: state?.index ?? 0,
rootRoute: rootRouteName,
nestedIndex: nestedState?.index ?? 0,
nestedRoute,
source,
});
Sentry.setTag("root_tab", rootRouteName ?? "unknown");
Sentry.setContext("root_navigation", {
rootIndex: state?.index ?? 0,
rootRoute: rootRouteName,
nestedIndex: nestedState?.index ?? 0,
nestedRoute,
hasExtra,
source,
operationOrientation: width > height ? "landscape" : "portrait",
hasVisitedPositions,
hasVisitedInformation,
});
setCurrentRootRoute(rootRouteName);
setIsExtraWindowOpen(hasExtra);
}, [hasVisitedInformation, hasVisitedPositions, width, height]);
const [fontLoaded, error] = useFonts({
"JR-Nishi": require("./assets/fonts/jr-nishi.otf"),
"JR-WEST-PLUS": require("./assets/fonts/JR-WEST-PLUS.otf"),
Zou: require("./assets/fonts/DelaGothicOne-Regular.ttf"),
"JNR-font": require("./assets/fonts/JNRfont_pict.ttf"),
"DiaPro": require("./assets/fonts/DiaPro-Regular.otf"),
});
React.useEffect(() => {
if (!navigationReady || !fontLoaded) return;
if (startupPrewarmAttemptedRef.current) return;
if (hasVisitedPositions) {
startupPrewarmAttemptedRef.current = true;
return;
}
if (currentRootRoute === null || currentRootRoute === "positions") return;
startupPrewarmAttemptedRef.current = true;
Sentry.addBreadcrumb({
category: "positions.root",
level: "info",
message: "positions startup prewarm scheduled",
data: {
currentRootRoute,
},
});
let cancelled = false;
const timer = setTimeout(() => {
if (cancelled || hasVisitedPositions) return;
Sentry.addBreadcrumb({
category: "positions.root",
level: "info",
message: "positions startup prewarm activated",
data: {
currentRootRoute,
},
});
setHasVisitedPositions(true);
}, 500);
return () => {
cancelled = true;
clearTimeout(timer);
};
}, [currentRootRoute, fontLoaded, hasVisitedPositions, navigationReady]);
React.useEffect(() => {
if (!navigationReady || !fontLoaded) return;
if (informationStartupPrewarmAttemptedRef.current) return;
if (hasVisitedInformation) {
informationStartupPrewarmAttemptedRef.current = true;
return;
}
if (currentRootRoute === null || currentRootRoute === "information") return;
informationStartupPrewarmAttemptedRef.current = true;
Sentry.addBreadcrumb({
category: "operation.root",
level: "info",
message: "operation startup prewarm scheduled",
data: {
currentRootRoute,
},
});
let cancelled = false;
const timer = setTimeout(() => {
if (cancelled || hasVisitedInformation) return;
Sentry.addBreadcrumb({
category: "operation.root",
level: "info",
message: "operation startup prewarm activated",
data: {
currentRootRoute,
},
});
setHasVisitedInformation(true);
}, 500);
return () => {
cancelled = true;
clearTimeout(timer);
};
}, [currentRootRoute, fontLoaded, hasVisitedInformation, navigationReady]);
if (!fontLoaded || !startupInitialRoute) {
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<ActivityIndicator size="large" />
</View>
);
}
return (
<NavigationContainer
ref={rootNavigationRef}
linking={linking}
theme={isDark ? DarkTheme : DefaultTheme}
onReady={() => {
Sentry.addBreadcrumb({
category: "nav.root",
level: "info",
message: "navigation ready",
});
applyRootNavigationState(rootNavigationRef.getRootState?.() ?? rootNavigationRef.getState?.(), "ready");
setNavigationReady(true);
}}
onStateChange={(state) => {
applyRootNavigationState(state, "change");
}}
>
<PositionsRootGateContext.Provider
value={{
shouldActivate: hasVisitedPositions,
isRootFocused: currentRootRoute === "positions",
}}
>
<InformationRootGateContext.Provider
value={{
shouldActivate: hasVisitedInformation,
isRootFocused: currentRootRoute === "information",
}}
>
<Tab.Navigator
id="rootTabs"
detachInactiveScreens={false}
initialRouteName={startupInitialRoute}
screenListeners={({ route }) => ({
tabPress: (event: EventArg<"tabPress", true>) => {
const rootState = rootNavigationRef.getState();
const activeRootRouteName =
(rootState?.routes?.[rootState.index ?? 0]?.name as keyof RootTabParamList | undefined) ??
currentRootRoute ??
null;
const leavingUnstablePositions =
route.name !== "positions" &&
positionsLifecycleRef.current.isUnstable;
const blockingUnstableExit =
route.name !== "positions" &&
positionsLifecycleRef.current.blockTabExit;
Sentry.addBreadcrumb({
category: "nav.tab",
level: "info",
message: blockingUnstableExit
? "root tabPress blocked while positions unstable"
: leavingUnstablePositions
? "root tabPress intercepted for unstable positions"
: "root tabPress",
data: {
route: route.name,
currentRootRoute,
activeRootRouteName,
unstablePositions: positionsLifecycleRef.current.isUnstable,
blockTabExit: positionsLifecycleRef.current.blockTabExit,
},
});
if (blockingUnstableExit) {
event.preventDefault();
positionsLifecycleRef.current.resetBeforeLeave?.();
requestAnimationFrame(() => {
setTimeout(() => {
rootNavigationRef.navigate(route.name as never);
}, 0);
});
return;
}
if (leavingUnstablePositions) {
event.preventDefault();
positionsLifecycleRef.current.resetBeforeLeave?.();
requestAnimationFrame(() => {
setTimeout(() => {
rootNavigationRef.navigate(route.name as never);
}, 0);
});
Sentry.addBreadcrumb({
category: "positions.root",
level: "info",
message: "positions root exit reset and continued while session unstable",
data: {
route: route.name,
},
});
}
},
focus: () => {
Sentry.addBreadcrumb({
category: "nav.tab",
level: "info",
message: "root tab focus",
data: { route: route.name },
});
},
blur: () => {
Sentry.addBreadcrumb({
category: "nav.tab",
level: "info",
message: "root tab blur",
data: { route: route.name },
});
},
state: (event) => {
Sentry.addBreadcrumb({
category: "nav.tab",
level: "info",
message: "root tab state",
data: {
route: route.name,
stateType: event.type,
},
});
},
})}
screenOptions={({ route }) => {
const showGradient = route.name === "positions" && !!lineColor && !!lineColorDark;
const defaultBg = isDark ? "#1c1c1e" : "white";
const defaultActive = isDark ? "#ffffff" : "#007AFF";
const defaultInactive = isDark ? "#8e8e93" : "#8e8e93";
return {
lazy: false,
freezeOnBlur: false,
sceneContainerStyle: { backgroundColor: defaultBg },
tabBarActiveTintColor: (showGradient || isExtraWindowOpen) ? "white" : defaultActive,
tabBarInactiveTintColor: (showGradient || isExtraWindowOpen) ? "rgba(255,255,255,0.75)" : defaultInactive,
tabBarStyle: { backgroundColor: "transparent" },
tabBarBackground: () => (
<View style={{ flex: 1 }}>
{/* 路線カラー or デフォルト背景 */}
{showGradient ? (
<LinearGradient
colors={[lineColor!, lineColorDark!]}
start={{ x: 0, y: 0 }}
end={{ x: 0, y: 1 }}
style={{ ...StyleSheet.absoluteFillObject }}
/>
) : (
<View style={{ ...StyleSheet.absoluteFillObject, backgroundColor: defaultBg }} />
)}
{/* 追加ウィンドウ時の青グラデーション(フェードイン/アウト) */}
<Animated.View style={{ ...StyleSheet.absoluteFillObject, opacity: fadeAnim }}>
<LinearGradient
colors={[fixedColors.primary, fixedColors.primaryDark]}
start={{ x: 0, y: 0 }}
end={{ x: 0, y: 1 }}
style={{ flex: 1 }}
/>
</Animated.View>
</View>
),
};
}}
>
<Tab.Screen
{...getTabProps("positions", "走行位置", "bar-chart", "AntDesign")}
component={PositionsTabScreen}
listeners={{
tabPress: () => {
Sentry.addBreadcrumb({
category: "positions.root",
level: "info",
message: "positions root tabPress activation",
});
setHasVisitedPositions(true);
},
focus: () => {
Sentry.addBreadcrumb({
category: "positions.root",
level: "info",
message: "positions root focus activation",
});
setHasVisitedPositions(true);
},
blur: () => {
Sentry.addBreadcrumb({
category: "positions.root",
level: "info",
message: "positions root blur preserved",
});
},
}}
/>
<Tab.Screen
{...getTabProps("topMenu", "トップメニュー", "radio", "Ionicons")}
component={MenuPage}
/>
<Tab.Screen
{...getTabProps(
"information",
"運行情報",
"train",
"Ionicons",
areaInfo ? areaIconBadgeText : undefined,
isInfo
)}
component={InformationTabScreen}
listeners={{
tabPress: () => {
Sentry.addBreadcrumb({
category: "operation.root",
level: "info",
message: "operation root tabPress activation",
});
setHasVisitedInformation(true);
},
focus: () => {
Sentry.addBreadcrumb({
category: "operation.root",
level: "info",
message: "operation root focus activation",
});
setHasVisitedInformation(true);
},
blur: () => {
Sentry.addBreadcrumb({
category: "operation.root",
level: "info",
message: "operation root blur preserved",
});
},
}}
/>
</Tab.Navigator>
</InformationRootGateContext.Provider>
</PositionsRootGateContext.Provider>
<HiddenStartupPreloadWebViews
shouldPreloadPositions={navigationReady && fontLoaded && currentRootRoute === "topMenu" && !hasVisitedPositions}
shouldPreloadInformation={navigationReady && fontLoaded && currentRootRoute === "topMenu" && !hasVisitedInformation}
/>
</NavigationContainer>
);
}
+53 -21
View File
@@ -9,13 +9,13 @@ import { useFocusEffect, useNavigation } from "@react-navigation/native";
import { useThemeColors } from "@/lib/theme";
import { AS } from "./storageControl";
import { STORAGE_KEYS } from "@/constants";
import { useTrainMenu } from "@/stateBox/useTrainMenu";
import { useTrainMenu, useTrainRecording } from "@/stateBox/useTrainMenu";
import {
DEFAULT_JR_DATA_SYSTEM_ENV,
normalizeJrDataSystemEnvironment,
rewriteJrDataSystemUrl,
} from "@/lib/jrDataSystemEnvironment";
import { withJrDataSystemIconQuery } from "@/lib/jrDataSystemIconUrl";
const RECORDING_DOWNLOAD_BRIDGE_SCRIPT = `
(() => {
if (window.__JRS_RECORDING_DOWNLOAD_BRIDGE__) return true;
@@ -119,10 +119,12 @@ export default ({ route }) => {
uri,
useExitButton = true,
importRecordingDownloads = false,
onExit,
} = route.params;
const { goBack } = useNavigation();
const { fixed } = useThemeColors();
const { importRecordingsFromText } = useTrainMenu();
const { iconSetting } = useTrainMenu();
const { importRecordingsFromText } = useTrainRecording();
const webViewRef = React.useRef<WebView>(null);
const [canGoBack, setCanGoBack] = React.useState(false);
const nativeCanGoBackRef = React.useRef(false);
@@ -131,6 +133,8 @@ export default ({ route }) => {
DEFAULT_JR_DATA_SYSTEM_ENV,
);
const [resolvedUri, setResolvedUri] = React.useState("");
const [webViewSourceUri, setWebViewSourceUri] = React.useState("");
const resolvedUriRef = React.useRef("");
const [isEnvironmentReady, setIsEnvironmentReady] = React.useState(false);
const hasAlerted = React.useRef(false);
const [isLoading, setIsLoading] = React.useState(true);
@@ -147,6 +151,11 @@ export default ({ route }) => {
const blankCountRef = React.useRef(0);
const remount = React.useCallback(() => {
// 現在のURLは復元用に使うが、通常のナビゲーションではsourceへ戻さない。
// sourceの更新はWebViewの再読込になるため、フィルター操作中に行うと状態が消える。
if (resolvedUriRef.current) {
setWebViewSourceUri(resolvedUriRef.current);
}
lastPongAt.current = Date.now(); // remount直後に誤検知しないようリセット
maxBodyLenRef.current = 0;
blankCountRef.current = 0;
@@ -168,11 +177,15 @@ export default ({ route }) => {
nativeCanGoBackRef.current = false;
setCanGoBack(false);
setSelectedEnvironment(nextEnvironment);
setResolvedUri(
importRecordingDownloads
? rawUri
: rewriteJrDataSystemUrl(rawUri, nextEnvironment),
);
const nextUri = importRecordingDownloads
? rawUri
: rewriteJrDataSystemUrl(rawUri, nextEnvironment);
const initialUri = importRecordingDownloads
? nextUri
: withJrDataSystemIconQuery(nextUri, iconSetting);
resolvedUriRef.current = initialUri;
setResolvedUri(initialUri);
setWebViewSourceUri(initialUri);
setIsEnvironmentReady(true);
};
@@ -183,9 +196,12 @@ export default ({ route }) => {
return () => {
isMounted = false;
};
}, [uri, importRecordingDownloads]);
}, [iconSetting, uri, importRecordingDownloads]);
const handleReload = () => {
if (resolvedUriRef.current) {
setWebViewSourceUri(resolvedUriRef.current);
}
lastPongAt.current = Date.now();
setHasError(false);
hasErrorRef.current = false;
@@ -215,7 +231,9 @@ export default ({ route }) => {
stack.pop();
const previousUrl = stack[stack.length - 1];
if (!previousUrl) return false;
resolvedUriRef.current = previousUrl;
setResolvedUri(previousUrl);
setWebViewSourceUri(previousUrl);
syncCanGoBack(false);
remount();
return true;
@@ -229,6 +247,14 @@ export default ({ route }) => {
return handlePseudoBack();
}, [handlePseudoBack]);
const handleExit = React.useCallback(() => {
try {
void onExit?.();
} finally {
goBack();
}
}, [goBack, onExit]);
const handleImportRecordingText = React.useCallback(
async (content: string) => {
try {
@@ -273,20 +299,20 @@ export default ({ route }) => {
if (canGoBack) {
if (handleWebViewBack()) return true;
}
goBack();
handleExit();
return true;
};
const subscription = BackHandler.addEventListener("hardwareBackPress", onHardwareBack);
return () => subscription.remove();
}, [canGoBack, goBack, handleWebViewBack])
}, [canGoBack, handleExit, handleWebViewBack])
);
return (
<View style={{ height: "100%", backgroundColor: fixed.primary }}>
{isEnvironmentReady && (
<WebView
key={webViewKey}
source={{ uri: resolvedUri }}
source={{ uri: webViewSourceUri }}
contentMode="mobile"
allowsBackForwardNavigationGestures
setSupportMultipleWindows={false}
@@ -345,12 +371,14 @@ export default ({ route }) => {
}
if (!importRecordingDownloads) {
const rewrittenUrl = rewriteJrDataSystemUrl(
request.url,
selectedEnvironment,
const rewrittenUrl = withJrDataSystemIconQuery(
rewriteJrDataSystemUrl(request.url, selectedEnvironment),
iconSetting,
);
if (rewrittenUrl !== request.url) {
resolvedUriRef.current = rewrittenUrl;
setResolvedUri(rewrittenUrl);
setWebViewSourceUri(rewrittenUrl);
return false;
}
}
@@ -367,7 +395,11 @@ export default ({ route }) => {
if (navState.url) {
const nextUrl = importRecordingDownloads
? navState.url
: rewriteJrDataSystemUrl(navState.url, selectedEnvironment);
: withJrDataSystemIconQuery(
rewriteJrDataSystemUrl(navState.url, selectedEnvironment),
iconSetting,
);
resolvedUriRef.current = nextUrl;
setResolvedUri((current) => (current === nextUrl ? current : nextUrl));
if (nextUrl !== "https://unyohub.2pd.jp/integration/succeeded.php") {
pushHistoryEntry(nextUrl);
@@ -441,7 +473,7 @@ export default ({ route }) => {
return;
}
if (type === "back") return handleWebViewBack();
if (type === "windowClose") return goBack();
if (type === "windowClose") return handleExit();
}}
/>
)}
@@ -459,26 +491,26 @@ export default ({ route }) => {
<Text style={wvStyles.reloadButtonText}>再読み込み</Text>
</TouchableOpacity>
{useExitButton && (
<TouchableOpacity style={wvStyles.backButton} onPress={goBack}>
<TouchableOpacity style={wvStyles.backButton} onPress={handleExit}>
<Text style={wvStyles.backButtonText}>閉じる</Text>
</TouchableOpacity>
)}
</View>
)}
{useExitButton && !hasError && <BigButton onPress={goBack} string="閉じる" />}
{useExitButton && !hasError && <BigButton onPress={handleExit} string="閉じる" />}
</View>
);
};
const wvStyles = StyleSheet.create({
loadingOverlay: {
...StyleSheet.absoluteFillObject,
...StyleSheet.absoluteFill,
alignItems: "center",
justifyContent: "center",
backgroundColor: "rgba(0,0,0,0.25)",
},
errorOverlay: {
...StyleSheet.absoluteFillObject,
...StyleSheet.absoluteFill,
alignItems: "center",
justifyContent: "center",
backgroundColor: "#1a1a2e",
+68 -45
View File
@@ -1,59 +1,64 @@
import React, { useEffect, useRef, useState } from "react";
import { useEffect, useRef, useState } from "react";
import { createStackNavigator } from "@react-navigation/stack";
import { useWindowDimensions, Platform, useColorScheme } from "react-native";
import Constants from "expo-constants";
import { useResponsive } from "@/lib/responsive";
import { Dimensions, StatusBar } from "react-native";
import { SheetManager } from "react-native-actions-sheet";
import { AS } from "@/storageControl";
import { STORAGE_KEYS } from "@/constants";
import { logger } from "@/utils/logger";
import TrainBase from "@/components/trainbaseview";
import HowTo from "@/howto";
import { Menu } from "@/menu";
import News from "@/components/news";
import Setting from "@/components/Settings/settings";
import { optionData } from "@/lib/stackOption";
import { AllTrainDiagramView } from "@/components/AllTrainDiagramView";
import { useNavigation, useIsFocused } from "@react-navigation/native";
import { useCurrentTrainPolling } from "@/stateBox/useCurrentTrain";
import type { BottomTabNavigationProp } from "@react-navigation/bottom-tabs";
import { news } from "@/config/newsUpdate";
import { useBottomTabBarHeight } from "@react-navigation/bottom-tabs";
import GeneralWebView from "@/GeneralWebView";
import { StationDiagramView } from "@/components/StationDiagram/StationDiagramView";
import * as Sentry from "@sentry/react-native";
const Stack = createStackNavigator();
import { telemetry } from "@/lib/observability/telemetry";
import {
markStartup,
markStartupOnce,
markStartupState,
} from "@/lib/devStartupPerformance";
import type { StackNavigationProp } from "@react-navigation/stack";
import type {
RootTabParamList,
TopMenuStackParamList,
} from "@/types/navigation";
const Stack = createStackNavigator<TopMenuStackParamList>();
const topMenuScreenTelemetry = telemetry.scope("topMenu.screen");
export function MenuPage() {
markStartupOnce("top-menu-render", "top menu render");
const { height, width } = useWindowDimensions();
const { verticalScale } = useResponsive();
const tabBarHeight = useBottomTabBarHeight();
const navigation = useNavigation<any>();
const navigation = useNavigation<BottomTabNavigationProp<RootTabParamList>>();
const { addListener } = navigation;
const isFocused = useIsFocused();
useCurrentTrainPolling(isFocused);
const isDark = useColorScheme() === "dark";
const bgColor = isDark ? "#1c1c1e" : "#ffffff";
useEffect(() => {
Sentry.addBreadcrumb({
category: "topMenu.screen",
level: "info",
message: "top menu mounted",
});
markStartupOnce("top-menu-mounted", "top menu mounted");
topMenuScreenTelemetry.info("top menu mounted");
return () => {
Sentry.addBreadcrumb({
category: "topMenu.screen",
level: "info",
message: "top menu unmounted",
});
topMenuScreenTelemetry.info("top menu unmounted");
};
}, []);
useEffect(() => {
Sentry.addBreadcrumb({
category: "topMenu.screen",
level: "info",
markStartupState("top-menu-focus", "top menu focus state", {
focused: isFocused,
});
topMenuScreenTelemetry.breadcrumb({
message: isFocused ? "top menu focused" : "top menu blurred",
data: {
width,
@@ -64,16 +69,40 @@ export function MenuPage() {
useEffect(() => {
//ニュース表示
markStartup("top menu startup storage checks start");
AS.getItem(STORAGE_KEYS.NEWS_STATUS)
.then((d) => {
if (d != news) navigation.navigate("topMenu", { screen: "news" });
markStartup("top menu news status read end", {
hasValue: d !== null && d !== undefined,
isCurrent: d === news,
});
if (d !== news) {
markStartup("top menu startup navigation attempt", {
target: "news",
reason: "news_status",
});
navigation.navigate("topMenu", { screen: "news" });
}
})
.catch(() => navigation.navigate("topMenu", { screen: "news" }));
.catch(() => {
markStartup("top menu news status read error");
markStartup("top menu startup navigation attempt", {
target: "news",
reason: "news_status_error",
});
navigation.navigate("topMenu", { screen: "news" });
});
AS.getItem(STORAGE_KEYS.ICON_SETTING)
.then((isSetIcon) => {
if (isSetIcon == "true") SheetManager.show("TrainIconUpdate");
markStartup("top menu icon setting read end", {
hasValue: isSetIcon !== null && isSetIcon !== undefined,
});
if (isSetIcon === "true") SheetManager.show("TrainIconUpdate");
})
.catch((error) => logger.error("Error fetching icon setting:", error));
.catch((error) => {
markStartup("top menu icon setting read error");
logger.error("Error fetching icon setting:", error);
});
return undefined;
}, []);
@@ -81,7 +110,7 @@ export function MenuPage() {
const scrollRef = useRef(null);
const [mapMode, setMapMode] = useState(false);
useEffect(() => {
Sentry.setContext("top_menu_screen", {
telemetry.context("top_menu_screen", {
focused: isFocused,
width,
height,
@@ -94,7 +123,7 @@ export function MenuPage() {
const MapHeight =
height -
tabBarHeight +
(Platform.OS == "android" ? Constants.statusBarHeight : 0) -
(Platform.OS === "android" ? Constants.statusBarHeight : 0) -
verticalScale(100) -
((((width / 100) * 80) / 20) * 9 + verticalScale(10) + verticalScale(30));
setMapHeight(MapHeight);
@@ -105,14 +134,12 @@ export function MenuPage() {
const MapFullHeight =
height -
tabBarHeight +
(Platform.OS == "android" ? Constants.statusBarHeight : 0);
(Platform.OS === "android" ? Constants.statusBarHeight : 0);
setMapFullHeight(MapFullHeight);
}, [height, tabBarHeight, width]);
useEffect(() => {
const unsubscribe = addListener("tabPress", (e: any) => {
Sentry.addBreadcrumb({
category: "topMenu.screen",
level: "info",
topMenuScreenTelemetry.breadcrumb({
message: "top menu tabPress handler",
data: {
focused: navigation.isFocused(),
@@ -128,7 +155,7 @@ export function MenuPage() {
}
}
scrollRef.current?.scrollTo({
y: mapHeightRef.current - verticalScale(80),
y: Math.max(0, mapHeightRef.current - verticalScale(80)),
animated: true,
});
setMapMode(false);
@@ -136,7 +163,9 @@ export function MenuPage() {
return unsubscribe;
}, [navigation]);
const stackNavRef = useRef<any>(null);
const stackNavRef = useRef<StackNavigationProp<TopMenuStackParamList> | null>(
null,
);
return (
<Stack.Navigator
@@ -147,25 +176,19 @@ export function MenuPage() {
stackNavRef.current = stackNav;
return {
focus: () => {
Sentry.addBreadcrumb({
category: "topMenu.screen",
level: "info",
topMenuScreenTelemetry.breadcrumb({
message: "top menu stack focus",
data: { route: route.name },
});
},
blur: () => {
Sentry.addBreadcrumb({
category: "topMenu.screen",
level: "info",
topMenuScreenTelemetry.breadcrumb({
message: "top menu stack blur",
data: { route: route.name },
});
},
state: () => {
Sentry.addBreadcrumb({
category: "topMenu.screen",
level: "info",
topMenuScreenTelemetry.breadcrumb({
message: "top menu stack state",
data: {
route: route.name,
@@ -183,7 +206,8 @@ export function MenuPage() {
gestureEnabled: true,
headerTransparent: true,
}}
children={() => (
>
{() => (
<Menu
scrollRef={scrollRef}
mapHeight={mapHeight}
@@ -192,7 +216,7 @@ export function MenuPage() {
setMapMode={setMapMode}
/>
)}
/>
</Stack.Screen>
<Stack.Screen
name="stDiagram"
options={{ ...optionData, gestureEnabled: false }}
@@ -218,7 +242,6 @@ export function MenuPage() {
options={{ ...optionData, gestureEnabled: false }}
component={AllTrainDiagramView}
/>
<Stack.Screen name="howto" options={optionData} component={HowTo} />
<Stack.Screen
name="generalWebView"
options={optionData}
+147 -56
View File
@@ -1,73 +1,109 @@
# JR四国 列車位置情報アプリ
JR四国の列車リアルタイム位置情報を表示するReact Nativeアプリケーション。
JR四国の列車リアルタイム位置情報を表示するReact Nativeアプリケーション(非公式)。
## 🚀 技術スタック
- **フレームワーク**: React Native (Expo SDK 52)
> 正確なバージョンは宣言値を `package.json`、解決値を `yarn.lock` で確認してください。
- **フレームワーク**: Expo SDK 57 / React Native 0.86系 / React 19系(New Architecture)
- **言語**: TypeScript / JavaScript
- **状態管理**: React Context API + カスタムフック
- **ストレージ**: AsyncStorage
- **地図表示**: WebView + JavaScript Injection
- **ナビゲーション**: React Navigation 7(bottom tabs + stack。Expo Routerは未使用)
- **状態管理**: React Context API + カスタムフック(`stateBox/`)
- **ストレージ**: AsyncStorage、expo-sqlite
- **地図表示**: WebView + JavaScript Injection、react-native-maps
- **シート**: react-native-actions-sheet、@gorhom/bottom-sheet
- **日付処理**: dayjs
- **アニメーション**: react-native-reanimated
- **アニメーション / ジェスチャー**: react-native-reanimated、react-native-gesture-handler(v2系)
- **監視**: Sentry
- **ウィジェット**: react-native-android-widget(Android)、`@bacons/apple-targets` によるWidgetKit拡張(iOS)
## 📦 プロジェクト構造
```
jrshikoku/
├── components/ # Reactコンポーネント
│ ├── Apps/ # アプリケーション機能
│ ├── Apps/ # 走行位置画面
│ │ └── FixedPositionBox/
│ │ └── hooks/ # カスタムフック
│ ├── AndroidWidget/ # Androidウィジェット
│ ├── ActionSheetComponents/
│ ├── atom/ # 基本UIコンポーネント
│ ├── Menu/ # メニュー関連
│ ├── Settings/ # 設定画面
│ └── TrainMenu/ # 列車メニュー
├── stateBox/ # グローバル状態管理
├── stateBox/ # グローバル状態管理(Context + hooks)
├── lib/ # ユーティリティライブラリ
│ └── eachTrainInfoCoreLib/ # 列車情報処理
│ ├── domain/ # 駅・列車identityのdomain型
│ ├── eachTrainInfoCoreLib/ # 列車情報処理
│ ├── observability/ # Sentry・テレメトリ
│ ├── theme/ # カラーテーマ
│ └── webview/ # WebView注入用データ
├── constants/ # 定数定義
│ ├── intervals.ts # 時間間隔定数
│ ├── api.ts # APIエンドポイント
│ ├── storage.ts # StorageKeys
│ └── index.ts
├── modules/ # ローカルExpoモジュール
│ ├── expo-felica-reader/ # FeliCa読み取り(iOS/Android)
│ └── expo-live-activity/ # Live Activities(iOS)
├── targets/widget/ # iOS WidgetKit拡張
├── types/ # TypeScript型定義
├── utils/ # ユーティリティ関数
│ ├── logger.ts # ロギング
│ └── seUtils.ts # SE判定処理
├── tests/ # pure関数のテスト(node:test)
├── docs/ # 設計・changelog・検証記録
│ └── architecture/ # domain契約・ADR
├── assets/ # 静的リソース
└── config/ # 設定ファイル
```
`android/` と `ios/` はprebuildで生成されるため、gitでは管理していません。
## 🛠️ セットアップ
### 必要環境
- Node.js 18以上
- npm または yarn
- Expo CLI
- Node.js(Expo SDK 57が対応するLTS。`yarn expo:doctor` で確認)
- Yarn(lockfileは `yarn.lock` のみ)
- EAS CLI(ビルドする場合)
### インストール
### インストールと起動
```bash
# 依存関係のインストール
npm install
# 依存関係のインストール(postinstallでpatch-packageが実行されます)
yarn install
# 開発サーバー起動
npm start
# 開発サーバー起動(dev client)
yarn start
# iOS実行
npm run ios
# ネイティブビルドして実行
yarn ios
yarn android
```
# Android実行
npm run android
### 検証
# Web実行
npm run web
```bash
yarn typecheck # tsc --noEmit
yarn lint # expo lint
yarn test # tests/*.test.ts
yarn verify # 上記3つをまとめて実行
yarn expo:doctor # Expo依存関係の整合性チェック
```
### 依存ライブラリのライセンス一覧
`dependencies` を追加・更新したら、アプリ内の「オープンソースライセンス」画面で使う一覧を再生成してください。再生成を忘れると `yarn test` が失敗します。
```bash
yarn licenses:generate # assets/licenses/oss-licenses.json を更新
```
## 📝 開発ガイドライン
開発エージェント向けの詳細なルールは [AGENTS.md](./AGENTS.md)、domain契約は [docs/architecture/](./docs/architecture/) を参照してください。
### 定数の使用
```typescript
@@ -120,18 +156,31 @@ AsyncStorage.getItem(STORAGE_KEYS.BUS_AND_TRAIN);
### 列車位置追跡
- リアルタイム列車位置表示
- 遅延情報の表示
- 遅延情報の表示(遅延速報EX)
- 次駅・着駅の予測
- 列車追従・駅固定モード(iOSではLive Activitiesに対応)
- 走行位置の記録と再生
### 駅情報
- 時刻表表示
- 駅詳細情報
- お気に入り駅登録
- お気に入り駅登録・並び替え
### カスタマイズ
- アイコン設定
- レイアウト設定
- 通知設定
### 運行情報・通知
- JR四国の運行情報表示
- プッシュ通知(遅延速報EX、運行情報など)
- サウンドによる案内(β)
### ICカード
- FeliCa対応ICカードの残高・履歴読み取り
### カスタマイズ(設定画面)
- 起動時に表示する画面、レイアウト設定
- カラーテーマ(ライト / 端末依存 / ダーク)
- アイコン設定、ランチャーアイコン変更
- サウンド設定(β)、運行情報設定(β)
- 通知設定、情報ソース設定、接続ステータス
- ウィジェット設定(Android)
## 🔧 カスタムフック
@@ -144,14 +193,22 @@ AsyncStorage.getItem(STORAGE_KEYS.BUS_AND_TRAIN);
- `useTrainDataWithThrough`: 通過駅を含む列車データ生成
- `useDestinationStation`: 行先駅データの管理
### グローバル状態フック
### グローバル状態フック(`stateBox/`)
- `useAllTrainDiagram`: 全列車ダイヤデータ
- `useAreaInfo`: 運行情報スナップショット(エリア情報)
- `useBusAndTrainData`: バス・列車データ
- `useCurrentTrain`: 現在選択中の列車
- `useCurrentTrain`: 現在の列車位置データ
- `useDeviceOrientationChange`: 画面の向き
- `useElesite`: えれサイト運用データ
- `useFavoriteStation`: お気に入り駅
- `useNotifications`: プッシュ通知と通知タップ時のルーティング
- `useStationList`: 全駅リスト
- `useTopMenu`: トップメニュー状態
- `useTrainDelayData`: 遅延情報
- `useTrainMenu`: 列車メニュー状態
- `useUnyohub`: 鉄道運用Hub運用データ
- `useUserPosition`: ユーザーの現在地
## 📊 リファクタリング実績
@@ -165,17 +222,24 @@ AsyncStorage.getItem(STORAGE_KEYS.BUS_AND_TRAIN);
## 🚦 API エンドポイント
エンドポイントは `constants/api.ts` の `API_ENDPOINTS` に集約しています。一覧と各URLは同ファイルを参照してください。
```typescript
// constants/api.ts
// constants/api.ts(抜粋)
const BASE_URL = 'https://jr-shikoku-api-data-storage.haruk.in';
export const API_ENDPOINTS = {
TRAIN_DATA_API: 'https://api.haruk.in/dev/jrshikoku/trainList',
DIAGRAM_TODAY: 'https://api.haruk.in/dev/jrshikoku/diagram/today',
STATION_LIST: 'https://storage.haruk.in/s/station.json',
// ... 他8個
DIAGRAM_TODAY: `${BASE_URL}/tmp/diagram-today.json`,
OPERATION_INFO: `${BASE_URL}/operation-info/jr-shikoku/latest.json`,
DELAY_INFO: `${BASE_URL}/derived/delays/latest.json`,
CURRENT_POSITIONS: `${BASE_URL}/tmp/currentPositions.json`,
// ...
};
```
## � 外部からのアプリ起動(ディープリンク)
データ取得の全体像は [docs/data-fetch-map.md](./docs/data-fetch-map.md) を参照してください。
## 🔗 外部からのアプリ起動(ディープリンク)
本アプリは複数の方法で外部から起動・画面遷移できます。
@@ -185,14 +249,14 @@ export const API_ENDPOINTS = {
| URL | 遷移先 |
|---|---|
| `jrshikoku://open/felica` | FeliCa履歴ページ |
| `jrshikoku://open/felica`(`felicahistorypage` も可) | FeliCa履歴ページ |
| `jrshikoku://open/traininfo` | 遅延速報EX |
| `jrshikoku://open/operation` | 運行情報 |
| `jrshikoku://open/settings` | 設定 |
| `jrshikoku://open/topmenu` | トップメニュー |
| `jrshikoku://positions/apps` | 走行位置 |
URLの処理は `App.tsx` の `routeFromUrl` で実装されています。
URLパターンの定義は `lib/startupDeepLink.ts`、遷移処理は `lib/useStartupDeepLinkNavigation.ts` の `routeFromUrl` で実装されています。
### Androidウィジェット
@@ -204,15 +268,32 @@ URLの処理は `App.tsx` の `routeFromUrl` で実装されています。
| `JR_shikoku_apps_shortcut` | クイックアクセス(各機能へのショートカットタイル) |
| `JR_shikoku_felica_balance` | ICカード残高表示 |
| `JR_shikoku_info` | 運行情報 |
| `JR_shikoku_train_strange` | 怪レい列車 |
ウィジェットのタップ時は `jrshikoku://` スキームでアプリ内画面へ遷移します。
実装: `components/AndroidWidget/widget-task-handler.tsx`
配置可能なウィジェットは `app.json` の `react-native-android-widget` プラグイン設定で登録し、描画は `components/AndroidWidget/widget-task-handler.tsx` で行います。
#### 未公開: 怪レい列車ウィジェット(`JR_shikoku_train_strange`)
公開する予定はありますが、現在は未完成のため `app.json` に登録しておらず、ホーム画面には配置できません。
- `components/AndroidWidget/StrangeTrainWidget.tsx` と `widget-task-handler.tsx` に描画処理はありますが、表示内容は固定文の仮実装です。
- ウィジェットに表示するデータの取得先(エンドポイント)がまだ用意されていません。
- タップ先は仮で `jrshikoku://open/traininfo`(遅延速報EX)になっています。
- 公開時は、データ取得の実装、プレビュー画像(`assets/widgetResource/`)の追加、`app.json` への登録が必要です。登録はネイティブ設定の変更になるため、OTAではなく新しいビルドで配布する必要があります。
怪レい列車の通知(通知設定、通知アクション `strange-train`)は、ウィジェットとは別に実装されています。
### iOSウィジェット(WidgetKit)
WidgetKit拡張としてホーム画面ウィジェットを提供しています。Live Activities にも対応しています。
設定: `targets/widget/Info.plist`
WidgetKit拡張として、次のホーム画面ウィジェットを提供しています。
- ショートカット
- ICカード残高
- 遅延速報
- 運行情報
Live Activitiesは、駅固定(StationLock)と列車追従(TrainFollow)に対応しています。
実装: `targets/widget/`
### プッシュ通知
@@ -228,30 +309,40 @@ WidgetKit拡張としてホーム画面ウィジェットを提供していま
### NFC(FeliCa)
NFC-Fを利用した交通系ICカードの読み取りに対応しています(Android)。アプリ内からスキャンを開始する形式です。
実装: `modules/expo-felica-reader/`
NFC-Fを利用した交通系ICカードの読み取りに、iOS・Androidとも対応しています。アプリ内からスキャンを開始する形式です。
実装: `modules/expo-felica-reader/`([7nohe/expo-felica-reader](https://github.com/7nohe/expo-felica-reader) をもとに改変、MIT)
## �📱 ビルド
## 📱 ビルド
EASのprofileとchannelは `eas.json` で管理しています。主なprofileは次のとおりです。
| profile | 用途 |
|---|---|
| `development` | dev client(internal配布) |
| `preview` | 内部配布 |
| `production<version>` / `beta<version>` | バージョン別の本番・ベータ(例: `production7.2`、`beta7.2`) |
```bash
# APKビルド(Android)
eas build --platform android
# IPAビルド(iOS)
eas build --platform ios
eas build --platform android --profile <profile>
eas build --platform ios --profile <profile>
```
## 🤝 貢献
プルリクエストを歓迎します。大きな変更を行う場合は、まずissueを開いて変更内容を議論してください。
runtimeVersionの方針は [docs/architecture/adr/001-runtime-version-policy.md](./docs/architecture/adr/001-runtime-version-policy.md) を参照してください。
ネイティブ設定(`app.json` のプラグイン、permission、entitlement、ローカルモジュールなど)を変更した場合は、OTAではなく新しいビルドが必要です。
## 📄 ライセンス
[ライセンス情報をここに記載]
本リポジトリは非公開です。無断での複製・再配布を禁止します(All Rights Reserved)。
- 同梱しているフォント・音声・ロゴなどの素材は、それぞれの権利者の規約に従います。
- 依存ライブラリのライセンスは、各パッケージの記載に従います。一覧はアプリの「設定 > オープンソースライセンス」で確認できます。
- `modules/expo-felica-reader/` は、Daiki Urata氏の [expo-felica-reader](https://github.com/7nohe/expo-felica-reader) 0.1.0(MIT License)をもとに改変したものです。ライセンス表記は `modules/expo-felica-reader/LICENSE` を参照してください。
本アプリはJR四国とは無関係の非公式アプリです。「JR四国」などの名称・商標は各権利者に帰属します。
## 👤 開発者
[開発者情報をここに記載]
harukin/Xprocess
## 🔗 関連リンク
+2
View File
@@ -1,5 +1,7 @@
# JR四国列車情報アプリ - リファクタリング記録
現在の残件は [docs/refactoring-backlog.md](docs/refactoring-backlog.md) のチェックリストで管理しています。
## 📋 最近のリファクタリング内容
### 2024年12月 - コード品質改善(第2弾)
+61 -57
View File
@@ -1,33 +1,60 @@
import React, { useCallback, useEffect, useRef, useState } from "react";
import { createStackNavigator } from "@react-navigation/stack";
import { useIsFocused, useNavigation } from "@react-navigation/native";
import type { BottomTabNavigationProp } from "@react-navigation/bottom-tabs";
import { useColorScheme } from "react-native";
import Apps from "./components/Apps";
import TrainBase from "./components/trainbaseview";
import HowTo from "./howto";
import News from "./components/news";
import TrainMenu from "./components/trainMenu";
import { FavoriteList } from "./components/FavoriteList";
import { optionData } from "./lib/stackOption";
import { useCurrentTrain } from "./stateBox/useCurrentTrain";
import { useCurrentTrainPolling, useCurrentTrainView } from "./stateBox/useCurrentTrain";
import {
useCustomTrainData,
useOperationLogs,
} from "./stateBox/useAllTrainDiagram";
import { useTrainMenu } from "./stateBox/useTrainMenu";
import { AS } from "./storageControl";
import { news } from "./config/newsUpdate";
import { InteractionManager, Linking, Platform, View } from "react-native";
import { InteractionManager, Platform, View } from "react-native";
import GeneralWebView from "./GeneralWebView";
import { StationDiagramView } from "@/components/StationDiagram/StationDiagramView";
import { positionsLifecycleRef, positionsStackNavRef } from "./lib/rootNavigation";
import * as Sentry from "@sentry/react-native";
const Stack = createStackNavigator();
import { telemetry } from "./lib/observability/telemetry";
import {
markStartup,
markStartupOnce,
markStartupState,
} from "./lib/devStartupPerformance";
import { usePositionsStartupReady } from "./lib/positionsStartupContext";
import type { PositionsStackParamList, RootTabParamList } from "@/types/navigation";
const Stack = createStackNavigator<PositionsStackParamList>();
const positionsStackTelemetry = telemetry.scope("positions.stack");
export const Top = () => {
const { webview } = useCurrentTrain();
const navigation = useNavigation<any>();
markStartupOnce("positions-stack-render", "positions Top render");
const { webview } = useCurrentTrainView();
const navigation = useNavigation<BottomTabNavigationProp<RootTabParamList>>();
const { navigate, addListener } = navigation;
const isTabFocused = useIsFocused();
const { notifyStackReady } = usePositionsStartupReady();
useCurrentTrainPolling(isTabFocused);
const { activateCustomTrainData } = useCustomTrainData();
const { activateOperationLogs } = useOperationLogs();
const isDark = useColorScheme() === "dark";
const bgColor = isDark ? "#1c1c1e" : "#ffffff";
const [hasActivatedStack, setHasActivatedStack] = useState(false);
useEffect(() => {
if (!isTabFocused) return;
activateCustomTrainData();
activateOperationLogs();
}, [
activateCustomTrainData,
activateOperationLogs,
isTabFocused,
]);
//地図用
const { mapSwitch } = useTrainMenu();
const mapSwitchRef = useRef(mapSwitch);
@@ -38,11 +65,7 @@ export const Top = () => {
const goToFavoriteList = (event?: any) => {
if (!hasActivatedStack) {
event?.preventDefault?.();
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
message: "positions tabLongPress ignored before stack activation",
});
positionsStackTelemetry.info("positions tabLongPress ignored before stack activation");
return;
}
navigate("positions", { screen: "favoriteList" });
@@ -54,25 +77,19 @@ export const Top = () => {
}, []);
useEffect(() => {
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
message: "positions stack mounted",
});
markStartupOnce("positions-stack-mounted", "positions stack mounted");
positionsStackTelemetry.info("positions stack mounted");
return () => {
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
message: "positions stack unmounted",
});
positionsStackTelemetry.info("positions stack unmounted");
};
}, []);
useEffect(() => {
if (hasActivatedStack) return;
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
markStartup("positions stack activation scheduled", {
focused: isTabFocused,
});
positionsStackTelemetry.breadcrumb({
message: "positions stack activation scheduled",
data: {
reason: isTabFocused ? "first_focus" : "background_prewarm",
@@ -81,15 +98,18 @@ export const Top = () => {
let cancelled = false;
const activate = () => {
if (cancelled) return;
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
markStartupOnce(
"positions-stack-activated",
"positions stack activation committed",
);
positionsStackTelemetry.breadcrumb({
message: "positions stack activation committed",
data: {
reason: isTabFocused ? "first_focus" : "background_prewarm",
},
});
setHasActivatedStack(true);
notifyStackReady();
};
if (isTabFocused) {
@@ -107,10 +127,14 @@ export const Top = () => {
cancelled = true;
clearTimeout(timer);
};
}, [hasActivatedStack, isTabFocused]);
}, [hasActivatedStack, isTabFocused, notifyStackReady]);
useEffect(() => {
Sentry.setContext("positions_stack", {
markStartupState("positions-stack-gate", "positions stack gate state", {
focused: isTabFocused,
activated: hasActivatedStack,
});
telemetry.context("positions_stack", {
focused: isTabFocused,
activated: hasActivatedStack,
mapSwitch,
@@ -134,9 +158,7 @@ export const Top = () => {
const goToTrainMenu = useCallback((e: any) => {
const stackNav = stackNavRef.current;
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
positionsStackTelemetry.breadcrumb({
message: "positions tabPress handler",
data: {
platform: Platform.OS,
@@ -145,16 +167,9 @@ export const Top = () => {
stackIndex: stackNav?.getState()?.index ?? null,
},
});
if (Platform.OS === "web") {
Linking.openURL("https://train.jr-shikoku.co.jp/");
setTimeout(() => navigate("topMenu", { screen: "menu" }), 100);
return;
}
if (!hasActivatedStack || !stackNav) {
e?.preventDefault?.();
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
positionsStackTelemetry.breadcrumb({
message: "positions tabPress ignored before stack activation",
data: {
focused: isTabFocused,
@@ -194,25 +209,19 @@ export const Top = () => {
stackNavRef.current = stackNav;
return {
focus: () => {
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
positionsStackTelemetry.breadcrumb({
message: "positions stack focus",
data: { route: route.name },
});
},
blur: () => {
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
positionsStackTelemetry.breadcrumb({
message: "positions stack blur",
data: { route: route.name },
});
},
transitionStart: () => {
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
positionsStackTelemetry.breadcrumb({
message: "positions stack transitionStart",
data: {
route: route.name,
@@ -221,9 +230,7 @@ export const Top = () => {
});
},
transitionEnd: () => {
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
positionsStackTelemetry.breadcrumb({
message: "positions stack transitionEnd",
data: {
route: route.name,
@@ -232,9 +239,7 @@ export const Top = () => {
});
},
state: () => {
Sentry.addBreadcrumb({
category: "positions.stack",
level: "info",
positionsStackTelemetry.breadcrumb({
message: "positions stack state",
data: {
route: route.name,
@@ -265,7 +270,6 @@ export const Top = () => {
options={{ ...optionData, gestureEnabled: false }}
component={StationDiagramView}
/>
<Stack.Screen name="howto" options={optionData} component={HowTo} />
<Stack.Screen
name="generalWebView"
options={optionData}
+864 -9
View File
@@ -5,17 +5,12 @@
"scheme": "jrshikoku",
"platforms": [
"ios",
"android",
"web"
"android"
],
"version": "7.2",
"userInterfaceStyle": "automatic",
"orientation": "default",
"icon": "./assets/icons/s8600.png",
"splash": {
"image": "./assets/splash.png",
"backgroundColor": "#00b8ff"
},
"updates": {
"fallbackToCacheTimeout": 0,
"url": "https://u.expo.dev/398abf60-57a7-11e9-970c-8f04356d08bf"
@@ -24,7 +19,7 @@
"**/*"
],
"ios": {
"buildNumber": "68",
"buildNumber": "75",
"supportsTablet": true,
"bundleIdentifier": "jrshikokuinfo.xprocess.hrkn",
"appleTeamId": "54CRDT797G",
@@ -54,7 +49,7 @@
},
"android": {
"package": "jrshikokuinfo.xprocess.hrkn",
"versionCode": 34,
"versionCode": 38,
"intentFilters": [
{
"action": "VIEW",
@@ -108,6 +103,8 @@
"plugins": [
"./plugins/with-android-local-properties",
"./plugins/with-nfc-widget-guard",
"./plugins/with-display-metrics-sync",
"./plugins/with-resizable-activity",
"@bacons/apple-targets",
[
"expo-font",
@@ -951,6 +948,854 @@
"foregroundImage": "./assets/icons/w141jg.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub10002",
"ios": "./assets/icons/unyohub/1000-2.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/1000-2.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub1000",
"ios": "./assets/icons/unyohub/1000.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/1000.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub1200Rn",
"ios": "./assets/icons/unyohub/1200-rn.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/1200-rn.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub1200",
"ios": "./assets/icons/unyohub/1200.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/1200.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub141",
"ios": "./assets/icons/unyohub/141.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/141.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub15001",
"ios": "./assets/icons/unyohub/1500-1.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/1500-1.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub15002",
"ios": "./assets/icons/unyohub/1500-2.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/1500-2.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub15007",
"ios": "./assets/icons/unyohub/1500-7.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/1500-7.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub1500",
"ios": "./assets/icons/unyohub/1500.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/1500.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub1853100",
"ios": "./assets/icons/unyohub/185-3100.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-3100.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub1859",
"ios": "./assets/icons/unyohub/185-9.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-9.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Ap",
"ios": "./assets/icons/unyohub/185-ap.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-ap.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185CenterGyaku",
"ios": "./assets/icons/unyohub/185-center-gyaku.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-center-gyaku.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Center",
"ios": "./assets/icons/unyohub/185-center.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-center.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Island",
"ios": "./assets/icons/unyohub/185-island.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-island.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185IyonadaGyaku",
"ios": "./assets/icons/unyohub/185-iyonada-gyaku.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-iyonada-gyaku.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Iyonada",
"ios": "./assets/icons/unyohub/185-iyonada.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-iyonada.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Jnr",
"ios": "./assets/icons/unyohub/185-jnr.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-jnr.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Shikoku",
"ios": "./assets/icons/unyohub/185-shikoku.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-shikoku.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185TosaGyaku",
"ios": "./assets/icons/unyohub/185-tosa-gyaku.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-tosa-gyaku.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Tosa",
"ios": "./assets/icons/unyohub/185-tosa.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-tosa.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Tsurugi",
"ios": "./assets/icons/unyohub/185-tsurugi.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-tsurugi.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Uu",
"ios": "./assets/icons/unyohub/185-uu.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-uu.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub185Yoshino",
"ios": "./assets/icons/unyohub/185-yoshino.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/185-yoshino.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2000",
"ios": "./assets/icons/unyohub/2000.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2000.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2001",
"ios": "./assets/icons/unyohub/2001.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2001.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2100",
"ios": "./assets/icons/unyohub/2100.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2100.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2100ap",
"ios": "./assets/icons/unyohub/2100ap.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2100ap.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2100ktLed",
"ios": "./assets/icons/unyohub/2100kt-led.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2100kt-led.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2100kt",
"ios": "./assets/icons/unyohub/2100kt.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2100kt.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2100led",
"ios": "./assets/icons/unyohub/2100led.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2100led.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2100mtLed",
"ios": "./assets/icons/unyohub/2100mt-led.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2100mt-led.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2100mt",
"ios": "./assets/icons/unyohub/2100mt.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2100mt.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub213La",
"ios": "./assets/icons/unyohub/213-la.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/213-la.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2150",
"ios": "./assets/icons/unyohub/2150.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2150.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2150ap",
"ios": "./assets/icons/unyohub/2150ap.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2150ap.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2150ktLed",
"ios": "./assets/icons/unyohub/2150kt-led.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2150kt-led.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2150kt",
"ios": "./assets/icons/unyohub/2150kt.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2150kt.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2150led",
"ios": "./assets/icons/unyohub/2150led.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2150led.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2150mtLed",
"ios": "./assets/icons/unyohub/2150mt-led.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2150mt-led.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2150mt",
"ios": "./assets/icons/unyohub/2150mt.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2150mt.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2235000",
"ios": "./assets/icons/unyohub/223-5000.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/223-5000.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2500",
"ios": "./assets/icons/unyohub/2500.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2500.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2600Ap",
"ios": "./assets/icons/unyohub/2600-ap.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2600-ap.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2600",
"ios": "./assets/icons/unyohub/2600.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2600.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2700Red",
"ios": "./assets/icons/unyohub/2700-red.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2700-red.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2700Yerrow",
"ios": "./assets/icons/unyohub/2700-yerrow.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2700-yerrow.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2700",
"ios": "./assets/icons/unyohub/2700.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2700.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2711",
"ios": "./assets/icons/unyohub/2711.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2711.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2751",
"ios": "./assets/icons/unyohub/2751.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2751.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub2752",
"ios": "./assets/icons/unyohub/2752.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/2752.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub285Led",
"ios": "./assets/icons/unyohub/285-led.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/285-led.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub320kei",
"ios": "./assets/icons/unyohub/32-0kei.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-0kei.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub32Ap",
"ios": "./assets/icons/unyohub/32-ap.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-ap.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub32Hobbygyaku",
"ios": "./assets/icons/unyohub/32-hobbygyaku.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-hobbygyaku.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub32Kado",
"ios": "./assets/icons/unyohub/32-kado.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-kado.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub32Kaiyodogyaku",
"ios": "./assets/icons/unyohub/32-kaiyodogyaku.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-kaiyodogyaku.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub32Kappa",
"ios": "./assets/icons/unyohub/32-kappa.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-kappa.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub32Kikuha",
"ios": "./assets/icons/unyohub/32-kikuha.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-kikuha.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub32Maru",
"ios": "./assets/icons/unyohub/32-maru.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-maru.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub32Onigyaku",
"ios": "./assets/icons/unyohub/32-onigyaku.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-onigyaku.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub32Yoshino",
"ios": "./assets/icons/unyohub/32-yoshino.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/32-yoshino.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub3600",
"ios": "./assets/icons/unyohub/3600.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/3600.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub40Shikoku",
"ios": "./assets/icons/unyohub/40-shikoku.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/40-shikoku.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub47Shutoken",
"ios": "./assets/icons/unyohub/47-shutoken.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/47-shutoken.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub5000",
"ios": "./assets/icons/unyohub/5000.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/5000.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub5101",
"ios": "./assets/icons/unyohub/5101.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/5101.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub54Ekichan",
"ios": "./assets/icons/unyohub/54-ekichan.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/54-ekichan.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub54Nanyogyaku",
"ios": "./assets/icons/unyohub/54-nanyogyaku.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/54-nanyogyaku.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub54Sampo",
"ios": "./assets/icons/unyohub/54-sampo.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/54-sampo.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub54Shiman",
"ios": "./assets/icons/unyohub/54-shiman.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/54-shiman.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub54",
"ios": "./assets/icons/unyohub/54.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/54.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub6000",
"ios": "./assets/icons/unyohub/6000.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/6000.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub7000",
"ios": "./assets/icons/unyohub/7000.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/7000.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub7100",
"ios": "./assets/icons/unyohub/7100.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/7100.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub7200",
"ios": "./assets/icons/unyohub/7200.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/7200.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub8000Ap",
"ios": "./assets/icons/unyohub/8000-ap.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/8000-ap.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub8000Aps",
"ios": "./assets/icons/unyohub/8000-aps.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/8000-aps.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub8000L",
"ios": "./assets/icons/unyohub/8000-l.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/8000-l.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub8000L1",
"ios": "./assets/icons/unyohub/8000-l1.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/8000-l1.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub8000Rn",
"ios": "./assets/icons/unyohub/8000-rn.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/8000-rn.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub8000Rnl",
"ios": "./assets/icons/unyohub/8000-rnl.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/8000-rnl.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub8000S",
"ios": "./assets/icons/unyohub/8000-s.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/8000-s.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub8600",
"ios": "./assets/icons/unyohub/8600.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/8600.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub9000",
"ios": "./assets/icons/unyohub/9000.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/9000.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub9640MoneGreen",
"ios": "./assets/icons/unyohub/9640形モネ号緑.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/9640形モネ号緑.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub9640MoneBlue",
"ios": "./assets/icons/unyohub/9640形モネ号青.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/9640形モネ号青.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub9640PalmToSunReverse",
"ios": "./assets/icons/unyohub/9640形手のひらを太陽に逆.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/9640形手のひらを太陽に逆.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubDEC741",
"ios": "./assets/icons/unyohub/DEC741.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/DEC741.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubEF2100",
"ios": "./assets/icons/unyohub/EF210-0.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/EF210-0.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubEF2100gray",
"ios": "./assets/icons/unyohub/EF210-0gray.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/EF210-0gray.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubEF2100new",
"ios": "./assets/icons/unyohub/EF210-0new.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/EF210-0new.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubEF210100gray",
"ios": "./assets/icons/unyohub/EF210-100gray.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/EF210-100gray.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubEF210100new",
"ios": "./assets/icons/unyohub/EF210-100new.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/EF210-100new.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubEF210300",
"ios": "./assets/icons/unyohub/EF210-300.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/EF210-300.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubEF210300gray",
"ios": "./assets/icons/unyohub/EF210-300gray.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/EF210-300gray.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubEF210300led",
"ios": "./assets/icons/unyohub/EF210-300led.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/EF210-300led.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubBusdaikoIyotetsuBluhy",
"ios": "./assets/icons/unyohub/busdaiko_iyotetsu_bluhy.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/busdaiko_iyotetsu_bluhy.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubN2000First",
"ios": "./assets/icons/unyohub/n2000-first.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/n2000-first.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubN2000led",
"ios": "./assets/icons/unyohub/n2000led.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/n2000led.png",
"backgroundColor": "#001413"
}
},
{
"name": "HubShimanto",
"ios": "./assets/icons/unyohub/shimanto.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/shimanto.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub964011",
"ios": "./assets/icons/unyohub/9640-11.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/9640-11.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub96401S",
"ios": "./assets/icons/unyohub/9640-1S.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/9640-1S.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub96402S",
"ios": "./assets/icons/unyohub/9640-2S.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/9640-2S.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub9640Hanshin",
"ios": "./assets/icons/unyohub/9640-hanshin.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/9640-hanshin.png",
"backgroundColor": "#001413"
}
},
{
"name": "Hub9640",
"ios": "./assets/icons/unyohub/9640.png",
"android": {
"foregroundImage": "./assets/icons/unyohub/9640.png",
"backgroundColor": "#001413"
}
}
]
],
@@ -961,7 +1806,7 @@
"kotlinVersion": "2.1.20"
},
"ios": {
"deploymentTarget": "16.2"
"deploymentTarget": "16.4"
}
}
],
@@ -992,6 +1837,16 @@
"project": "jr-shikoku-unofficial-apps",
"organization": "xprocess-m5"
}
],
"expo-sqlite",
"expo-status-bar",
[
"expo-splash-screen",
{
"image": "./assets/icons/s8600.png",
"backgroundColor": "#00b8ff",
"resizeMode": "contain"
}
]
]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 39 KiB

+2 -1
View File
@@ -4,7 +4,7 @@ export const series: { key: string; title: string; ids: string[] }[] = [
{ key: "40", title: "キハ40", ids: ["40s", "40w"] },
{ key: "185", title: "キハ185系", ids: ["185mrt", "185cm", "185g", "185tu", "185tu_uzu", "185iyor", "185iyoy", "185toai", "185mm1", "185mm2", "185ym1", "185ym2", "185ap1"] },
{ key: "1000", title: "1000形", ids: ["1000"] },
{ key: "1200", title: "1200形・1201形", ids: ["1200", "1201"] },
{ key: "1200", title: "1200形・1201形", ids: ["1200", "1201", "1200n"] },
{ key: "1500", title: "1500形", ids: ["1501", "1550", "1551"] },
{ key: "2000", title: "2000系・N2000系", ids: ["2000asi", "2000uwa", "N2000", "2000nl", "2000-3", "2000ganp1", "2002a"] },
{ key: "2600", title: "2600系", ids: ["2600", "2600apr", "2600apb"] },
@@ -63,6 +63,7 @@ export default () =>{
//{ "id": "1200n", "name": "1200形", "icon": require("./s1200n.png") },
{ "id": "1200", "name": "1200形(旧塗装)", "icon": require("./s1200.png") },
{ "id": "1201", "name": "1201形", "icon": require("./s1201.png") },
{ "id": "1200n", "name": "1200形リニュ", "icon": require("./s1200n.png") },
//{ "id": "1500", "name": "1500形", "icon": require("./s1500.png") },
{ "id": "1501", "name": "1500形 1501", "icon": require("./s1501.png") },
{ "id": "1550", "name": "1500形 1550", "icon": require("./s1550.png") },
Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Some files were not shown because too many files have changed in this diff Show More