Repository navigation
Expo 55へのアップグレードとnpm移行 - #5464
Conversation
📝 WalkthroughWalkthroughパッケージマネージャーを pnpm から npm に切替え、react-native-reanimated の利用を React Native の標準 Animated(RNAnimated)へ置換しつつ、Expo/React Native 系依存の一括アップグレードとネイティブ / CI 設定の更新を行いました。 Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/components/CustomModal.test.tsx (1)
17-21:⚠️ Potential issue | 🟡 Minor
jest.clearAllMocks()は afterEach に置くルールに合わせたいいまは
beforeEachでjest.clearAllMocks()していますが、ガイドライン通りafterEachに寄せたいです(特に timingSpy を restore した後に clear すると意図が明確)。修正案
describe('CustomModal', () => { - beforeEach(() => { - jest.clearAllMocks(); - }); + afterEach(() => { + jest.clearAllMocks(); + }); it('visible=true の場合、childrenがレンダリングされる', () => { const { getByText } = render( <CustomModal visible={true}> @@ describe('CustomModal - onCloseAnimationEnd', () => { let timingSpy: jest.SpyInstance; beforeEach(() => { - jest.clearAllMocks(); timingSpy = jest .spyOn(Animated, 'timing') @@ }); afterEach(() => { timingSpy.mockRestore(); + jest.clearAllMocks(); });As per coding guidelines, Call
jest.clearAllMocks()inafterEachblocks in all test files.Also applies to: 55-74
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/CustomModal.test.tsx` around lines 17 - 21, Move the jest.clearAllMocks() call out of the beforeEach block and into an afterEach block within the describe('CustomModal') suite: remove or stop calling jest.clearAllMocks() inside the existing beforeEach, add an afterEach(() => { jest.clearAllMocks(); }) alongside any existing lifecycle hooks so mocks are cleared after tests (this keeps timingSpy.restore and other teardown semantics intact).src/hooks/useHeaderAnimation.ts (1)
20-23:⚠️ Potential issue | 🟡 MinorJSDoc の利用コンポーネント一覧が実態とズレていそう
コメントに
HeaderTokyoMetroが含まれていますが(Line 22)、このPR内では TokyoMetro 側が独自実装に寄っているので、説明が古くなっていそうです。メンテのため更新しておきたいです。修正案
- * HeaderTokyoMetro, HeaderTY, HeaderSaikyo, HeaderJRKyushuで使用 + * HeaderTY, HeaderSaikyo, HeaderJRKyushuで使用🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/hooks/useHeaderAnimation.ts` around lines 20 - 23, The JSDoc on useHeaderAnimation is outdated (it still lists HeaderTokyoMetro) so update the comment to reflect the current consumers: remove or mark HeaderTokyoMetro as not using this hook and list only the actual components using it (e.g., HeaderTY, HeaderSaikyo, HeaderJRKyushu or whichever components import useHeaderAnimation in this PR); edit the header comment above the useHeaderAnimation function to accurately describe its purpose and the current component list so future maintainers can find where it is used.
🧹 Nitpick comments (6)
src/components/Marquee.tsx (1)
94-120: アニメーション作成ロジックの重複を検討してください。
useEffect内のアニメーション作成コード(Lines 105-112)がstartScroll(Lines 51-58)と重複しています。依存関係の循環を避けるための意図的な設計と理解しますが、共通ロジックを抽出することでメンテナンス性が向上します。♻️ 共通ロジックの抽出案
+const createLoopAnimation = useCallback( + (contentWidth: number) => { + const totalDistance = dim.width + contentWidth; + const duration = (totalDistance / PIXELS_PER_SECOND) * 1000; + return Animated.loop( + Animated.timing(offsetX, { + toValue: -contentWidth, + duration, + easing: Easing.linear, + useNativeDriver: true, + }) + ); + }, + [dim.width, offsetX] +);その後、
startScrollとuseEffectの両方でこの関数を使用できます。🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/Marquee.tsx` around lines 94 - 120, The animation creation logic in the effect duplicates the code in startScroll; extract the shared logic into a new helper function (e.g., createAndStartAnimation) that takes offsetX, width (w), dim.width and PIXELS_PER_SECOND and returns/assigns the Animated.loop instance to animationRef.current and starts it (or sets offsetX appropriately when w <= dim.width). Replace the duplicated blocks in both startScroll and the useEffect with calls to this helper and keep the existing stop logic (animationRef.current?.stop()) in cleanup to preserve behavior.src/__mocks__/react-native-reanimated-mock.js (1)
1-59: モックの ESM 互換性のため__esModule: trueを付けるのがおすすめ
moduleNameMapperや Babel の interop 経由で default import されるケースを考えると、__esModuleを付けてdefaultを明示した形に寄せておくと安全です。修正案
- module.exports = ReanimatedMock; - module.exports.default = ReanimatedMock; + module.exports = { + __esModule: true, + ...ReanimatedMock, + default: ReanimatedMock, + };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/__mocks__/react-native-reanimated-mock.js` around lines 1 - 59, The mock currently exports ReanimatedMock and sets module.exports.default but doesn't declare ESM compatibility; update the export so the module includes __esModule: true and exposes default as ReanimatedMock (e.g., ensure the final export object has __esModule: true, default: ReanimatedMock and the rest of ReanimatedMock's properties) by changing the module.exports assignment that references ReanimatedMock and module.exports.default.src/components/CustomModal.tsx (1)
31-85: 高速トグル時の競合回避に、開始前のopacity.stopAnimation()と cleanup を入れるのが無難Reanimated 側にあった cancel 系のガードが消えているので、
visibleの連打/高速トグルでタイミング次第に “古い close 完了 callback” が走るのを確実に潰すなら、開始前にopacity.stopAnimation()を入れておく方が安全です(ついでに unmount 時の setState も回避)。修正案
useEffect(() => { + opacity.stopAnimation(); + if (visible) { setIsMounted(true); Animated.timing(opacity, { toValue: 1, duration: animationDuration, useNativeDriver: true, }).start(); return; } - Animated.timing(opacity, { + const anim = Animated.timing(opacity, { toValue: 0, duration: animationDuration, useNativeDriver: true, - }).start(({ finished }) => { + }); + anim.start(({ finished }) => { if (finished && !visible) { setIsMounted(false); onCloseAnimationEnd?.(); } }); + + return () => { + anim.stop(); + }; }, [animationDuration, opacity, visible, onCloseAnimationEnd]);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/CustomModal.tsx` around lines 31 - 85, The useEffect animation can leak when visible toggles quickly: before starting any Animated.timing call on opacity call opacity.stopAnimation() to cancel previous animations, and add a cleanup that calls opacity.stopAnimation() and avoids calling setIsMounted/onCloseAnimationEnd after unmount by tracking a mounted flag or cancelling callbacks; update the effect around Animated.timing(opacity, ...) and the callback that sets setIsMounted(false) / calls onCloseAnimationEnd to be guarded by this mounted flag or cancelled in cleanup so stale close callbacks don't run.package.json (1)
28-115: npm移行・Jest mapper・overrides は良い。Expo SDK固定の semver と doctor 設定だけ再確認したい
overrides採用でreact-native-skeleton-placeholderとmasked-viewの差分吸収をしているのは現実的で良いです。- 一方で Expo 系は SDK 追従がシビアなので、
expo-audio(Line 36)だけ^になっている意図と、expo.doctorでappConfigFieldsNotSyncedCheckを無効化している意図(Line 120-122)は、将来の追従コストが上がらないかだけ見ておきたいです。- ついでに、過去の経緯的に
expo-audioを本当に使い続ける必要があるか(背景再生要件など)も再確認ポイントです。Based on learnings, After dependency upgrades or Expo SDK migrations, run
expo-doctor,pnpm lint,pnpm test, andpnpm typecheck, then capture results indocs/changelog.md
Based on learnings, Android background audio issue with expo-audio can cause the app to suspend/stop audio when Android suspends the app. In TrainLCD/MobileApp, prefer using expo-av for audio playback to handle background behavior correctly. Review dependencies and refactor code to use expo-av (or ensure expo-audio is not required for background playback) where appropriate.Also applies to: 118-130, 146-162
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 28 - 115, Review and lock Expo-related deps: change the lone careted expo-audio to the fixed SDK-compatible version (or remove it) to match other expo packages, confirm why overrides absorb react-native-skeleton-placeholder and `@react-native-masked-view/masked-view` and keep them if intentional; re-enable or justify the expo.doctor appConfigFieldsNotSyncedCheck change (or remove the override) so SDK doctor remains useful; audit code for any usage of expo-audio and replace with expo-av where background playback is required (or document why expo-audio remains needed), then run expo doctor, pnpm lint, pnpm test, pnpm typecheck and record results in docs/changelog.md.src/components/HeaderTY.tsx (1)
3-9: RN Animated 置換は問題なし。transformOriginは静的に設定されているため RN 0.83.2 で動作するReanimated→RN Animated の置換は自然で、この実装では
transformOriginは静的に 'top' または 'bottom' で設定されているため、RN 0.83.2 でも正常に機能します。アニメーション対象はscaleYのみで、transformOrigin自体はアニメートされていません。ただしテキストの出入りアニメーションの挙動が期待通りかは、実機で視覚的に確認しておくと確実です(iOS/Android 両方)。
コード参照
// transformOrigin は static { fontSize: STATION_NAME_FONT_SIZE, transformOrigin: 'top', // ← animated ではない } // animation.topNameAnimatedAnchorStyle のみ animate transform: [{ scaleY: progress }] // ← scaleY のみが animatedAlso applies to: 159-193, 198-218, 234-267, 273-289
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/HeaderTY.tsx` around lines 3 - 9, Confirm visually on device that the text enter/exit animation behaves as expected: run the app on both iOS and Android and inspect the components using transformOrigin (e.g., the style with STATION_NAME_FONT_SIZE and transformOrigin: 'top'/'bottom') and the animated style animation.topNameAnimatedAnchorStyle which only animates transform: [{ scaleY: progress }]; ensure the pivot/look is correct and adjust the static transformOrigin value or the scaleY anchoring if the visual result is off.src/components/TrainTypeBox.tsx (1)
268-285: スタイル配列のネスト構造についてスタイルプロパティにネストした配列があります(
[textTopAnimatedStyles, [...other styles...]])。React Nativeは自動的にフラット化しますが、TrainTypeBoxJRKyushuのフラットな配列構造と一貫性を持たせることで可読性が向上します。♻️ フラットな配列構造への変更案
<RNAnimated.Text style={[ - textTopAnimatedStyles, - [ - styles.text, - animatedTextBaseStyle, - theme === APP_THEME.LED && { fontWeight: 'normal' as const }, - { - letterSpacing, - marginLeft, - }, - ], + styles.text, + animatedTextBaseStyle, + theme === APP_THEME.LED && { fontWeight: 'normal' as const }, + textTopAnimatedStyles, + { + letterSpacing, + marginLeft, + }, ]} adjustsFontSizeToFit numberOfLines={numberOfLines} >🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/TrainTypeBox.tsx` around lines 268 - 285, The RNAnimated.Text style prop currently uses a nested array ([textTopAnimatedStyles, [...other styles...]]); flatten this into a single array for consistency with TrainTypeBoxJRKyushu by merging textTopAnimatedStyles and the other style entries into one top-level array (include styles.text, animatedTextBaseStyle, the conditional theme === APP_THEME.LED { fontWeight: 'normal' }, and the letterSpacing and marginLeft objects) so the style prop is a single flat array while keeping adjustsFontSizeToFit and numberOfLines unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/copilot-instructions.md:
- Line 151: 更新手順文中の記録先が誤っているため、"docs/changelog.md" を "TECHNICAL_DEBT.md"
に置き換えて統一してください。具体的には該当行(`expo-doctor`、`npm run lint`、`npm test`、`npm run
typecheck` を実行して結果を記録する一文)で参照されている "docs/changelog.md" を "TECHNICAL_DEBT.md"
に修正し、必要なら同文脈での他出現箇所も同様に差し替えてください。
In `@docs/bump-version-on-release-pr.md`:
- Line 70: Update the docs line that currently shows the npm command without the
double-dash so it matches the implementation; change the example usage of the
script to include the `--` before positional arguments (i.e., mirror how the
workflow invokes `npm run version:bump -- ${steps.version.outputs.resolved}`),
ensuring the doc example uses the `--` form when passing the <バージョン> argument to
the version:bump script.
In `@ios/TrainLCD.xcodeproj/project.pbxproj`:
- Around line 2492-2493: The Podfile currently hardcodes apple.ccacheEnabled =>
true (and sets CCACHE_BINARY to /opt/homebrew/bin/ccache), which forces
:ccache_enabled into react_native_post_install and breaks CI without ccache;
change the logic that sets apple.ccacheEnabled (and any use_ccache! invocation)
to be conditional based on the environment (e.g., enable when ENV['CI'].nil? or
check for ccache presence in PATH), remove the hardcoded M1-specific
CCACHE_BINARY path or detect it at runtime, and ensure react_native_post_install
is called with :ccache_enabled only when the conditional is satisfied so CI
runners without ccache don’t fail.
---
Outside diff comments:
In `@src/components/CustomModal.test.tsx`:
- Around line 17-21: Move the jest.clearAllMocks() call out of the beforeEach
block and into an afterEach block within the describe('CustomModal') suite:
remove or stop calling jest.clearAllMocks() inside the existing beforeEach, add
an afterEach(() => { jest.clearAllMocks(); }) alongside any existing lifecycle
hooks so mocks are cleared after tests (this keeps timingSpy.restore and other
teardown semantics intact).
In `@src/hooks/useHeaderAnimation.ts`:
- Around line 20-23: The JSDoc on useHeaderAnimation is outdated (it still lists
HeaderTokyoMetro) so update the comment to reflect the current consumers: remove
or mark HeaderTokyoMetro as not using this hook and list only the actual
components using it (e.g., HeaderTY, HeaderSaikyo, HeaderJRKyushu or whichever
components import useHeaderAnimation in this PR); edit the header comment above
the useHeaderAnimation function to accurately describe its purpose and the
current component list so future maintainers can find where it is used.
---
Nitpick comments:
In `@package.json`:
- Around line 28-115: Review and lock Expo-related deps: change the lone careted
expo-audio to the fixed SDK-compatible version (or remove it) to match other
expo packages, confirm why overrides absorb react-native-skeleton-placeholder
and `@react-native-masked-view/masked-view` and keep them if intentional;
re-enable or justify the expo.doctor appConfigFieldsNotSyncedCheck change (or
remove the override) so SDK doctor remains useful; audit code for any usage of
expo-audio and replace with expo-av where background playback is required (or
document why expo-audio remains needed), then run expo doctor, pnpm lint, pnpm
test, pnpm typecheck and record results in docs/changelog.md.
In `@src/__mocks__/react-native-reanimated-mock.js`:
- Around line 1-59: The mock currently exports ReanimatedMock and sets
module.exports.default but doesn't declare ESM compatibility; update the export
so the module includes __esModule: true and exposes default as ReanimatedMock
(e.g., ensure the final export object has __esModule: true, default:
ReanimatedMock and the rest of ReanimatedMock's properties) by changing the
module.exports assignment that references ReanimatedMock and
module.exports.default.
In `@src/components/CustomModal.tsx`:
- Around line 31-85: The useEffect animation can leak when visible toggles
quickly: before starting any Animated.timing call on opacity call
opacity.stopAnimation() to cancel previous animations, and add a cleanup that
calls opacity.stopAnimation() and avoids calling
setIsMounted/onCloseAnimationEnd after unmount by tracking a mounted flag or
cancelling callbacks; update the effect around Animated.timing(opacity, ...) and
the callback that sets setIsMounted(false) / calls onCloseAnimationEnd to be
guarded by this mounted flag or cancelled in cleanup so stale close callbacks
don't run.
In `@src/components/HeaderTY.tsx`:
- Around line 3-9: Confirm visually on device that the text enter/exit animation
behaves as expected: run the app on both iOS and Android and inspect the
components using transformOrigin (e.g., the style with STATION_NAME_FONT_SIZE
and transformOrigin: 'top'/'bottom') and the animated style
animation.topNameAnimatedAnchorStyle which only animates transform: [{ scaleY:
progress }]; ensure the pivot/look is correct and adjust the static
transformOrigin value or the scaleY anchoring if the visual result is off.
In `@src/components/Marquee.tsx`:
- Around line 94-120: The animation creation logic in the effect duplicates the
code in startScroll; extract the shared logic into a new helper function (e.g.,
createAndStartAnimation) that takes offsetX, width (w), dim.width and
PIXELS_PER_SECOND and returns/assigns the Animated.loop instance to
animationRef.current and starts it (or sets offsetX appropriately when w <=
dim.width). Replace the duplicated blocks in both startScroll and the useEffect
with calls to this helper and keep the existing stop logic
(animationRef.current?.stop()) in cleanup to preserve behavior.
In `@src/components/TrainTypeBox.tsx`:
- Around line 268-285: The RNAnimated.Text style prop currently uses a nested
array ([textTopAnimatedStyles, [...other styles...]]); flatten this into a
single array for consistency with TrainTypeBoxJRKyushu by merging
textTopAnimatedStyles and the other style entries into one top-level array
(include styles.text, animatedTextBaseStyle, the conditional theme ===
APP_THEME.LED { fontWeight: 'normal' }, and the letterSpacing and marginLeft
objects) so the style prop is a single flat array while keeping
adjustsFontSizeToFit and numberOfLines unchanged.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
ios/Podfile.lockis excluded by!**/*.lockpackage-lock.jsonis excluded by!**/package-lock.jsonpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (44)
.github/copilot-instructions.md.github/workflows/bump_version_on_canary_pr.yml.github/workflows/bump_version_on_release_pr.yml.github/workflows/test.yml.github/workflows/typecheck.yml.gitignore.npmrcAGENTS.mdREADME.mdandroid/gradle.propertiesapp.config.tsbabel.config.jsdocs/bump-version-on-canary-pr.mddocs/bump-version-on-release-pr.mdios/AppDelegate.swiftios/CanaryAppClip/AppDelegate.hios/ProdAppClip/AppDelegate.hios/TrainLCD.xcodeproj/project.pbxprojpackage.jsonpnpm-workspace.yamlsrc/__mocks__/react-native-reanimated-mock.jssrc/components/CustomModal.test.tsxsrc/components/CustomModal.tsxsrc/components/Header.types.tssrc/components/HeaderJRKyushu.tsxsrc/components/HeaderSaikyo.tsxsrc/components/HeaderTY.tsxsrc/components/HeaderTokyoMetro.tsxsrc/components/Marquee.tsxsrc/components/NowHeader.tsxsrc/components/SettingsHeader.tsxsrc/components/TrainTypeBox.tsxsrc/components/TrainTypeBoxJRKyushu.tsxsrc/components/TrainTypeBoxSaikyo.tsxsrc/components/Typography.tsxsrc/hooks/useHeaderAnimation.tssrc/hooks/useInterval.tssrc/screens/AppSettings.tsxsrc/screens/EnabledLanguagesSettings.tsxsrc/screens/Licenses.tsxsrc/screens/RouteSearchScreen.tsxsrc/screens/SelectLineScreen.tsxsrc/screens/TTSSettings.tsxsrc/screens/ThemeSettings.tsx
💤 Files with no reviewable changes (2)
- pnpm-workspace.yaml
- .npmrc
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/components/WalkthroughOverlay.tsx (1)
187-194:useMemoは不要かもしれません
animatedYはuseRefから取得した安定した参照であるため、useMemoによるメモ化のメリットはほぼありません。React Native の Animated API では、スタイルオブジェクトを直接渡すのが一般的なパターンです。♻️ 簡略化の提案
- const animatedTooltipStyle = useMemo( - () => ({ - top: animatedY, - left: tooltipLeft, - width: tooltipWidth, - }), - [animatedY, tooltipLeft, tooltipWidth] - ); + const animatedTooltipStyle = { + top: animatedY, + left: tooltipLeft, + width: tooltipWidth, + };もし
tooltipLeft/tooltipWidthの再計算を避けたい場合は、それらだけをuseMemoで囲む方が意図が明確になります。🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/WalkthroughOverlay.tsx` around lines 187 - 194, Remove the unnecessary useMemo around animatedTooltipStyle in WalkthroughOverlay: animatedY is a stable ref from the Animated API so create and pass the style object ({ top: animatedY, left: tooltipLeft, width: tooltipWidth }) directly instead of wrapping it in useMemo; alternatively, if you really need memoization, only wrap the non-animated values (tooltipLeft and tooltipWidth) with useMemo and compose them with animatedY when building the final style to keep intent clear (referencing animatedTooltipStyle, animatedY, tooltipLeft, tooltipWidth, and useMemo).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@android/app/src/main/java/me/tinykitten/trainlcd/MainApplication.kt`:
- Around line 33-37: The catch block that falls back to ReleaseLevel.STABLE is
swallowing the IllegalArgumentException; update the catch for
ReleaseLevel.valueOf(BuildConfig.REACT_NATIVE_RELEASE_LEVEL.uppercase()) inside
DefaultNewArchitectureEntryPoint.releaseLevel to also emit a warning log (e.g.,
using android.util.Log.w with a clear tag like "MainApplication" or the class
name) that includes the invalid BuildConfig.REACT_NATIVE_RELEASE_LEVEL value and
the exception message/stack so misconfiguration can be diagnosed, while keeping
the existing STABLE fallback behavior.
---
Nitpick comments:
In `@src/components/WalkthroughOverlay.tsx`:
- Around line 187-194: Remove the unnecessary useMemo around
animatedTooltipStyle in WalkthroughOverlay: animatedY is a stable ref from the
Animated API so create and pass the style object ({ top: animatedY, left:
tooltipLeft, width: tooltipWidth }) directly instead of wrapping it in useMemo;
alternatively, if you really need memoization, only wrap the non-animated values
(tooltipLeft and tooltipWidth) with useMemo and compose them with animatedY when
building the final style to keep intent clear (referencing animatedTooltipStyle,
animatedY, tooltipLeft, tooltipWidth, and useMemo).
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
android/app/build.gradleandroid/app/src/main/java/me/tinykitten/trainlcd/MainApplication.ktdocs/bump-version-on-release-pr.mdsrc/components/WalkthroughOverlay.tsx
💤 Files with no reviewable changes (1)
- android/app/build.gradle
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/bump-version-on-release-pr.md
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
package.json (1)
2-14: SDK移行時検証の再現性のためdoctorスクリプトを追加してください。依存更新PRごとに同じ検証手順を回せるよう、
expo-doctorを scripts に固定化しておくのが安全です。差分案
"scripts": { "start": "expo start", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web", + "doctor": "expo-doctor", "lint": "biome check ./src",Based on learnings: Run
expo-doctor,pnpm lint,pnpm test, andpnpm typecheckafter dependency upgrades or Expo SDK migrations, and document results indocs/changelog.md.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 2 - 14, Add a new npm script named "doctor" inside the "scripts" object that runs the fixed expo-doctor command (e.g., "expo doctor" or the pinned binary package name you use) so the SDK-migration reproducibility steps are repeatable; update package.json's "scripts" block to include "doctor" alongside "lint", "test", and "typecheck", and ensure CI/docs reference this script when documenting the post-upgrade checklist (expo-doctor, pnpm lint, pnpm test, pnpm typecheck) for docs/changelog.md.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 36: TTS code (useTTS.ts, ttsAudioPlayer.ts) enables expo-audio's
shouldPlayInBackground but Android lacks a foreground service, so background
playback may stop; either migrate TTS playback to expo-av (update imports/usages
in useTTS.ts and ttsAudioPlayer.ts to use expo-av Player/Audio API and ensure
setIsEnabledAsync/setAudioModeAsync are configured for background) or implement
an Android foreground service (modify native Android manifest and service entry
points and wire it to your JS player) and verify shouldPlayInBackground is
supported; update package.json dependencies (replace or add expo-av) and adjust
initialization code in useTTS.ts/ttsAudioPlayer.ts accordingly, then test
Android suspend/resume to confirm continuous playback.
---
Nitpick comments:
In `@package.json`:
- Around line 2-14: Add a new npm script named "doctor" inside the "scripts"
object that runs the fixed expo-doctor command (e.g., "expo doctor" or the
pinned binary package name you use) so the SDK-migration reproducibility steps
are repeatable; update package.json's "scripts" block to include "doctor"
alongside "lint", "test", and "typecheck", and ensure CI/docs reference this
script when documenting the post-upgrade checklist (expo-doctor, pnpm lint, pnpm
test, pnpm typecheck) for docs/changelog.md.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
android/app/build.gradleapp.config.tsios/TrainLCD.xcodeproj/project.pbxprojpackage.json
💤 Files with no reviewable changes (1)
- android/app/build.gradle
🚧 Files skipped from review as they are similar to previous changes (1)
- app.config.ts
|
@coderabbitai 他にないならapproveしてもらえますか |
|
承認させていただきます。 🧠 Learnings used✅ Actions performedComments resolved and changes approved. |
Summary
Key Changes
app.config.ts,package.json: Expo 55対応の設定・依存更新src/hooks/useHeaderAnimation.ts: Reanimated → RN Animated へ全面書き換えsrc/components/: Header系、TrainTypeBox系、CustomModal、Marquee等のアニメーション実装をRN Animatedへ統一.github/workflows/: npm前提のCI設定へ変更pnpm-lock.yaml,pnpm-workspace.yaml,.npmrc)を削除しpackage-lock.jsonを追加Test plan
npm run lintパス確認npm testパス確認npm run typecheckパス確認🤖 Generated with Claude Code
Summary by CodeRabbit
改善・機能強化
Chores