Skip to content

テレメトリ設定を実験的機能画面に移動 - #6307

Merged
TinyKitten merged 2 commits into
devfrom
feature/move-telemetry-to-experimental-settings
Jun 23, 2026
Merged

TinyKitten merged 2 commits into
devfrom
feature/move-telemetry-to-experimental-settings

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jun 23, 2026 •

Copy link
Copy Markdown
Member

概要

テレメトリのオン/オフ設定をチューニング画面(TuningSettings)から実験的機能画面(ExperimentalSettings)に移動し、説明文を追加した。

変更の種類

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

変更内容

  • テレメトリトグルを TuningSettings から ExperimentalSettings に移動
  • テレメトリの説明文を追加(日本語・英語)
  • ラベルテキストを「テレメトリを有効にする」から「テレメトリ」に簡略化
  • ストレージ保存失敗時のエラーハンドリングとロールバックを追加

テスト

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

関連Issue

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

Summary by CodeRabbit

翻訳ファイルと設定画面の更新

  • New Features
    • 実験設定画面にテレメトリ opt-in のON/OFF切り替えを追加し、保存に成功/失敗で反映を制御します。
    • 端末の位置情報座標が解析用途として送信されることを説明する文言を表示します。
  • Documentation
    • 英語・日本語のテレメトリ関連表記を更新しました。

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

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a2b1e15-ba60-4fe5-9337-00bbd55d7103

📥 Commits

Reviewing files that changed from the base of the PR and between d0fbc77 and da9e9ec.

📒 Files selected for processing (1)
  • src/screens/ExperimentalSettings.test.tsx

📝 Walkthrough

Walkthrough

TuningSettings コンポーネントからテレメトリ ON/OFF 切替 UI とそのハンドラを削除し、ExperimentalSettings 画面へ移設した。移設先では Jotai atom による状態管理・永続化失敗時ロールバック・エラーアラートを実装。あわせて EN/JA 翻訳ファイルでテレメトリタイトルを短縮し、説明文キーを新規追加。対応するテストケースで新たな挙動を検証。

Changes

テレメトリ設定の移設

Layer / File(s) Summary
翻訳文言の更新
assets/translations/en.json, assets/translations/ja.json
optInTelemetryTitle を「Telemetry」/「テレメトリ」へ短縮し、位置情報送信の用途説明文 telemetryDescription を追加。
TuningSettings からテレメトリ切替を削除
src/components/TuningSettings.tsx
toggleTelemetryEnabled ハンドラと対応する Switch UI ブロックを削除し、テレメトリ操作経路を廃止。
ExperimentalSettings へテレメトリ切替を追加
src/screens/ExperimentalSettings.tsx
tuningState atom の import・useAtom 取得、handleToggleTelemetry(即時反映+失敗時ロールバック+エラーアラート)の新設、toggleSpacer スタイル追加、ToggleItem と説明文の UI バインドを実装。
ExperimentalSettings テスト拡張
src/screens/ExperimentalSettings.test.tsx
tuningState を import し、renderWithStore に telemetryEnabled 引数を追加。テレメトリ ON/OFF 時の永続化成功・失敗ケース、および失敗時のロールバック・エラーハンドリング(console.error・Alert.alert)を検証。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • TrainLCD/MobileApp#6204: ExperimentalSettings.tsx に実験的設定トグル(ポートレートモード)を追加した PR で、今回のテレメトリトグル追加と同一ファイル・同一パターンの Jotai 状態管理・永続化・エラーハンドリング実装。

Poem

🐇 テレメトリ、引っ越し完了!
実験設定のお家へようこそ
ロールバックも備えて安心
説明文も添えて丁寧に
うさぎもにっこり、設定整う ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed プルリクエストのタイトルは、チューニング画面から実験的機能画面へテレメトリ設定を移動するという主な変更を正確に反映しており、簡潔かつ明確です。
Description check ✅ Passed プルリクエストの説明は、テンプレートのほぼすべての必須セクション(概要、変更の種類、変更内容、テスト)を完備しており、十分に充実した内容になっています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/move-telemetry-to-experimental-settings

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/screens/ExperimentalSettings.tsx`:
- Around line 116-127: The handleToggleTelemetry function in
ExperimentalSettings.tsx has been modified to include new behavior for immediate
state reflection, rollback on persistence failure, and error alerts, but there
are no corresponding unit tests added in this change set. Either add test cases
covering the success path (telemetry setting is saved to storage) and failure
paths (storage.set throws error, state is rolled back, and Alert.alert is
called), or if deferring tests, add a TODO comment documenting the owner's
rationale for skipping them in this change set per the coding guidelines.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 23dc1913-ea75-427f-b4c1-1c506337a3ed

📥 Commits

Reviewing files that changed from the base of the PR and between cd75e42 and d0fbc77.

📒 Files selected for processing (4)
  • assets/translations/en.json
  • assets/translations/ja.json
  • src/components/TuningSettings.tsx
  • src/screens/ExperimentalSettings.tsx
💤 Files with no reviewable changes (1)
  • src/components/TuningSettings.tsx

Comment thread src/screens/ExperimentalSettings.tsx Resolved
Co-Authored-By: Claude Opus 4.6 <[email protected]>
@TinyKitten

Copy link
Copy Markdown
Member Author

Fixes Applied Successfully

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

Files modified:

  • src/screens/ExperimentalSettings.test.tsx

Commit: da9e9ec9b

The latest autofix changes are on the feature/move-telemetry-to-experimental-settings branch.

@TinyKitten
TinyKitten merged commit c8fc53b into dev Jun 23, 2026
5 checks passed
@TinyKitten
TinyKitten deleted the feature/move-telemetry-to-experimental-settings branch June 23, 2026 17:24
@TinyKitten TinyKitten mentioned this pull request Jun 23, 2026
5 of 9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant