Repository navigation
TTSのRemote Configにプラットフォーム別スイッチを追加してiOS/Android個別に停止できるようにする - #6631
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011TgTZ5BQW2ChyHgpsC9j8R
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTTSのRemote ConfigにiOS・Android別の有効化設定を追加しました。全体スイッチとプラットフォーム別スイッチを組み合わせて判定します。関連するキャッシュ処理とテストを更新しました。 ChangesTTS Remote Config
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant RemoteConfig
participant Cache
participant Platform
participant TTS判定
RemoteConfig->>Cache: iOS・Android設定を保存
Platform->>TTS判定: OSを提供
TTS判定->>Cache: 対応する設定を取得
TTS判定->>TTS判定: 全体スイッチとAND判定
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
4 of 9 tasks
4 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
TTS(自動アナウンス)機能の Remote Config による利用可否を、iOS / Android で個別に制御できるようにしました。
これまで
tts_enabledの 1 キーしか無く「全プラットフォーム有効」か「全プラットフォーム無効」の二択でしたが、プラットフォーム別キーtts_enabled_ios/tts_enabled_androidを追加し、以下 3 パターンをサーバー側から表現できるようにしています。tts_enabled: true(プラットフォーム別キーは未配信でよい)tts_enabled: true+ 止めたい側のみfalse(例:tts_enabled_android: false)tts_enabled: false(プラットフォーム別キーの値によらず全停止)判定はマスタースイッチ(
tts_enabled)と実行中プラットフォームのスイッチの AND です。オーバーライドではなく AND にすることで、障害時のキルスイッチであるtts_enabled: falseが常に最優先で全停止する挙動を保証しています。変更の種類
変更内容
src/lib/remoteConfig.ts:REMOTE_CONFIG_KEYSにTTS_ENABLED_IOS(tts_enabled_ios) /TTS_ENABLED_ANDROID(tts_enabled_android) を追加し、レスポンス型・キャッシュ・resetRemoteConfigCacheを対応。src/lib/remoteConfig.ts:isTTSFeatureEnabled()を、マスタースイッチとPlatform.OSに応じたプラットフォーム別スイッチの AND で判定するよう変更。プラットフォーム解決は非公開のisTTSPlatformEnabled()に切り出し。src/lib/remoteConfig.test.ts: プラットフォーム別スイッチのテストを 9 ケース追加(iOSのみ有効 / Androidのみ有効 / 両方false / マスターfalse優先 / マスター未配信+片側停止 / 非boolean値の無視 / iOS・Android以外のプラットフォーム / キャッシュリセット)。補足:
"false"や0など)は無視してtrueに倒し、既存の「未配信時は利用可能」方針を踏襲しています。useTTSFeatureEnabled/FxTTS/TTSSettings)は無改修です。既存のsubscribeRemoteConfig購読経由で、起動時の非同期取得完了後も設定画面のトグル無効化とFxTTSのアンマウントが反映されます。なお、実際に配信するには別リポジトリ TrainLCD/BFF 側の
GET /config/remote(KVconfig:remote)へ新キーを追加する必要があります。本 PR の範囲外です。テスト
npm run lint/npm test/npm run typecheckをローカルで実行し、すべて成功することを確認しました。lint:
Checked 626 filesエラーなしtest: 214 suites / 2256 tests すべて成功
typecheck: エラーなし
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
スクリーンショット(任意)
Generated by Claude Code
Summary by CodeRabbit
新機能
改善