Repository navigation
tts修正 - #5312
Merged
Merged
tts修正#5312
Conversation
Contributor
📝 WalkthroughWalkthrough
Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/hooks/useTTS.ts (1)
516-537: 抑制ロジックは正しく動作しますが、複雑さに注意。条件分岐が多く複雑になっています。現状のコメントで意図は説明されていますが、将来のメンテナンスのため、以下のような状態遷移のパターンをドキュメント化することを検討してください:
- 行先選択時(停車中)→ 発車まで抑制
- オートモード初期化時 → 初回チェック完了まで抑制
- 初回放送後 → テキスト変化による再トリガー抑制
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/hooks/useTTS.ts` around lines 516 - 537, The suppression logic around firstSpeechRef, suppressPostFirstSpeechRef, suppressFirstSpeechUntilDepartureRef, and suppressInitialCheckDoneRef is correct but hard to follow—extract and document the state transitions: "stopped→suppress until departure", "auto-mode init→suppress until initial check done", "after first speech→suppress post-first update". Refactor the block into a small helper (e.g., ensureSuppressionState or computeSuppressionDecision) that encapsulates the if-chain and add a concise doc comment or enum describing the three states and transitions so future maintainers can read and test the behavior without parsing the inline conditionals.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/hooks/useTTS.ts`:
- Around line 516-537: The suppression logic around firstSpeechRef,
suppressPostFirstSpeechRef, suppressFirstSpeechUntilDepartureRef, and
suppressInitialCheckDoneRef is correct but hard to follow—extract and document
the state transitions: "stopped→suppress until departure", "auto-mode
init→suppress until initial check done", "after first speech→suppress post-first
update". Refactor the block into a small helper (e.g., ensureSuppressionState or
computeSuppressionDecision) that encapsulates the if-chain and add a concise doc
comment or enum describing the three states and transitions so future
maintainers can read and test the behavior without parsing the inline
conditionals.
This was referenced Feb 17, 2026
Merged
Merged
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.
Summary by CodeRabbit
リリースノート
新機能
改善