Skip to content

canary - #6649

Merged
TinyKitten merged 2 commits into
canaryfrom
dev
Aug 10, 2026
Merged

canary#6649
TinyKitten merged 2 commits into
canaryfrom
dev

Conversation

@TinyKitten

Copy link
Copy Markdown
Member

概要

変更の種類

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

変更内容

  • タッチ不可モード中は画面横スワイプと戻る操作による前画面への遷移も防止 (タッチ不可モード中は画面横スワイプと戻る操作による前画面への遷移も防止 #6648)
    • MainStack の Main 画面に gestureEnabled: !untouchableModeEnabled を設定し、iOS の画面端スワイプバックをネイティブごと無効化。
    • usePreventBackInUntouchableMode を追加し、Android の戻るキー・戻るジェスチャーを BackHandler で握りつぶす。useIsFocused() でゲートしているため、上に積まれた画面からは通常どおり戻れる。
    • 上記フックは Main.tsx のレンダーレス副作用ホスト MainScreenEffects に FxPreventBackInUntouchableMode として、iOS では発火しないため Android 限定でマウント。
    • untouchableModeEnabledAtom(派生 atom)を追加し、MainStack が他のチューニング値の更新で再レンダーされないようにした。
    • ja/en の untouchableModeDescription / untouchableModeEnabledNotice を、タップに加えて画面端スワイプ・戻る操作も無効になる旨へ更新。
    • usePreventBackInUntouchableMode と MainStack(gestureEnabled の切り替え)のユニットテストを追加。

テスト

origin/dev (5967aef) をチェックアウトしてローカルで実行し、すべて成功することを確認しました。

  • lint: Checked 629 files エラーなし

  • test: 217 suites / 2286 tests すべて成功

  • typecheck: エラーなし

  • npm run lint が通ること

  • npm test が通ること

  • npm run typecheck が通ること

リグレッションリスク

  • タッチ不可モード OFF 時にスワイプバックが効かなくなる懸念があるが、gestureEnabled は !untouchableModeEnabled で切り替わり、OFF 時に true になることを MainStack.test.tsx で検証済み。
  • 設定画面など Main の上に積まれた画面からの戻る操作は useIsFocused() でゲートしているため影響を受けない。フォーカス喪失時に BackHandler を購読しないことをテストで検証済み。
  • beforeRemove / usePreventRemove による一律ブロックは採用していないため、ディープリンクやクイックアクション由来の CommonActions.reset などプログラムによる遷移は従来どおり動作する。Main の beforeRemove による resetMainState も preventDefault していないため既存挙動のまま。
  • BackHandler の購読はアンマウント時に subscription.remove() することをテストで検証済み。
  • タッチ不可モード有効中は走行画面から抜けられなくなるが、これは仕様どおりの挙動であり、説明文と有効化通知も本変更に合わせて更新済み。
  • 実機・シミュレータでの動作確認は元 PR (タッチ不可モード中は画面横スワイプと戻る操作による前画面への遷移も防止 #6648) 時点で未実施のため、iOS のスワイプバックと Android の戻るジェスチャーの実挙動は canary ビルドでの確認を推奨。
  • 本 PR に含まれる変更は dev 到達前にレビュー済みで、製品コードの変更範囲は src/hooks/usePreventBackInUntouchableMode.ts / src/stacks/MainStack.tsx / src/screens/Main.tsx / src/store/atoms/tuning.ts と翻訳ファイルに限定される。

関連Issue

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


Generated by Claude Code

* タッチ不可モード中は画面横スワイプと戻る操作による前画面への遷移も防止

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01V3xe2qbYY2puA7zW3MzZqh

* タッチ不可モードの有効化通知にスワイプと戻る操作の抑止を追記しテストのモック後始末を追加

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01V3xe2qbYY2puA7zW3MzZqh

---------

Co-authored-by: Claude <[email protected]>
@TinyKitten TinyKitten self-assigned this Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cf136039-9d68-4419-b7cc-12d55b8df98b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@TinyKitten
TinyKitten merged commit fca620b into canary Aug 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant