Skip to content

Develop => main - #604

Merged
tegnike merged 18 commits into
mainfrom
develop
Aug 12, 2026
Merged

Develop => main#604
tegnike merged 18 commits into
mainfrom
develop

Conversation

@tegnike

@tegnike tegnike commented Aug 12, 2026

Copy link
Copy Markdown
Owner

改善

  • 発話開始時の activeSpeech を専用経路で即時通知し、通常のステータス送信や再試行処理による字幕遅延を避けました。
  • Presentation assignment の照合を直列化し、世代更新時の競合や失敗済み assignment の不要な再試行を防ぎました。
  • スライド表示テキストの切り替えを音声の実再生開始に同期し、発話依頼時の先行表示と遅延した旧チャンクによる字幕の巻き戻りを解消しました。
  • 並列TTS合成の完了順にかかわらず発話順を維持し、待機中の合成枠を新規処理が追い越さないようにしました。

テスト

その他

  • アプリ表示バージョンを 2.74.0 に更新しました。

Summary by CodeRabbit

  • 新機能
    • クライアントの再生中音声を専用APIで更新・取得できるようになりました。
    • 音声状態の更新順序を管理し、古い情報による上書きを防止します。
    • 音声合成の同時実行数を制御し、安定性を向上しました。
  • 改善
    • 字幕が実際の音声再生開始時に表示されるようになりました。
    • 読み上げ内容に合わせて字幕を適切に分割・表示します。
    • プレゼンテーション割り当ての更新処理が安定しました。
  • その他
    • アプリケーションバージョンを2.74.0へ更新しました。

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5defbd66-78e5-4499-91c0-1dfa9dc8032d

📥 Commits

Reviewing files that changed from the base of the PR and between 7328b0b and 5632e4c.

📒 Files selected for processing (3)
  • src/__tests__/features/api/activeSpeechReporter.test.ts
  • src/components/messageReceiver.tsx
  • src/features/api/activeSpeechReporter.ts

Walkthrough

音声合成の同時実行数を制限し、実再生開始時に字幕を表示します。表示文を発話単位へ整列します。アクティブ音声状態を専用APIへ送信し、古い更新を無視します。割り当て更新を順次処理します。

Changes

音声再生パイプライン

Layer / File(s) Summary
発話と表示文の整列
src/features/chat/speechPipeline/speakMessageHandler.ts, src/__tests__/features/chat/speechPipeline/speakMessageHandler.test.ts
句読点境界を使って表示文を発話セグメントへ整列します。整列できない場合は従来の分割を使用します。
再生開始通知と合成制御
src/features/messages/concurrencyLimiter.ts, src/features/messages/speakCharacter.ts, src/features/chat/speechPipeline/speechDispatcher.ts, src/__tests__/features/messages/*, src/__tests__/features/chat/speechPipeline/speechDispatcher.test.ts
音声合成を最大3件に制限します。再生開始時にコールバックを実行します。字幕を実再生開始後に表示します。

アクティブ音声状態同期

Layer / File(s) Summary
音声状態APIとバージョン管理
src/features/api/activeSpeechReporter.ts, src/features/api/messageGateway.ts, src/pages/api/v1/client/speech-status.ts, src/pages/api/v1/client/status.ts, src/lib/accessPolicy/routePolicies.ts, src/__tests__/pages/api/v1/externalApi.test.ts, src/constants/appVersion.json
専用APIで音声状態を更新します。クライアントごとのバージョンを管理し、古い更新を無視します。
受信側の送信と初期化
src/components/messageReceiver.tsx, src/__tests__/features/api/activeSpeechReporter.test.ts
音声状態を専用APIへ送信します。失敗時は最大3回再試行します。初期状態の送信後にステータス報告を開始します。

プレゼンテーション割り当て処理

Layer / File(s) Summary
割り当てリコンシリエーション
src/features/presentation/assignmentReconciliation.ts, src/components/messageReceiver.tsx, src/__tests__/features/presentation/assignmentReconciliation.test.ts
割り当て更新を世代順に処理します。実行中は最新値を保留します。エラーを通知し、次の割り当て処理を継続します。

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: 🟡 Moderate · up to 7328b

The active-speech status path can stop retrying after an unsuccessful first report, leaving users or connected clients with stale speech state. The PR should not merge until initialization is marked complete only after successful delivery or equivalent retry behavior is implemented.

Sequence Diagram(s)

sequenceDiagram
  participant MessageReceiver
  participant ActiveSpeechReporter
  participant SpeechStatusAPI
  participant MessageGateway
  MessageReceiver->>ActiveSpeechReporter: 音声状態を enqueue
  ActiveSpeechReporter->>SpeechStatusAPI: activeSpeech と version を送信
  SpeechStatusAPI->>MessageGateway: updateClientActiveSpeech
  MessageGateway-->>SpeechStatusAPI: 更新結果
  SpeechStatusAPI-->>ActiveSpeechReporter: 成功または失敗
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive 「Develop => main」は変更内容を示さず、音声処理やプレゼンテーション処理の改善を特定できません。 音声状態通知、発話処理、プレゼンテーション割り当ての改善を要約する具体的なタイトルに変更してください。
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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/components/messageReceiver.tsx`:
- Around line 786-791: 初期化処理の順序を修正し、まずクライアントステータスを正常に送信してから、homeStore の初期
activeSpeech を activeSpeechReporter に送信し、最後に定期的な reportStatus
を有効化してください。activeSpeechReporterReady と safeReportStatus
を使う現在の完了制御を見直し、初期化失敗時に3回の送信が409になるケースを再現するテストも追加してください。
🪄 Autofix

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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 579fe066-e7a2-44e3-809b-023a826a788c

📥 Commits

Reviewing files that changed from the base of the PR and between 73b0555 and 8d36a26.

📒 Files selected for processing (19)
  • src/__tests__/features/api/activeSpeechReporter.test.ts
  • src/__tests__/features/chat/speechPipeline/speakMessageHandler.test.ts
  • src/__tests__/features/chat/speechPipeline/speechDispatcher.test.ts
  • src/__tests__/features/messages/concurrencyLimiter.test.ts
  • src/__tests__/features/messages/speakCharacterConcurrency.test.ts
  • src/__tests__/features/presentation/assignmentReconciliation.test.ts
  • src/__tests__/pages/api/v1/externalApi.test.ts
  • src/components/messageReceiver.tsx
  • src/constants/appVersion.json
  • src/features/api/activeSpeechReporter.ts
  • src/features/api/messageGateway.ts
  • src/features/chat/speechPipeline/speakMessageHandler.ts
  • src/features/chat/speechPipeline/speechDispatcher.ts
  • src/features/messages/concurrencyLimiter.ts
  • src/features/messages/speakCharacter.ts
  • src/features/presentation/assignmentReconciliation.ts
  • src/lib/accessPolicy/routePolicies.ts
  • src/pages/api/v1/client/speech-status.ts
  • src/pages/api/v1/client/status.ts

Comment thread src/components/messageReceiver.tsx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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/__tests__/features/api/activeSpeechReporter.test.ts`:
- Around line 36-42: Update the createActiveSpeechStatusCoordinator test so
getActiveSpeech returns a mutable currentSpeech value, change currentSpeech to a
different speech or null while client status initialization is pending, and
assert that the first report uses the updated value rather than the earlier
transition argument.

In `@src/features/api/activeSpeechReporter.ts`:
- Around line 31-34: reportClientStatus の初回 activeSpeech 送信で、reportActiveSpeech
の最終的な成功結果を確認した後にのみ statusInitialized を true に更新してください。reportActiveSpeech
の失敗を呼び出し元へ伝播するか成功結果を返す契約に変更し、失敗時は初期状態を保持して次回の reportClientStatus
で再送できるようにしてください。最終失敗後の再送動作を検証する回帰テストも追加してください。
🪄 Autofix

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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9d8723cb-49a1-40eb-8dd6-8a73f586bf66

📥 Commits

Reviewing files that changed from the base of the PR and between 8d36a26 and 7328b0b.

📒 Files selected for processing (3)
  • src/__tests__/features/api/activeSpeechReporter.test.ts
  • src/components/messageReceiver.tsx
  • src/features/api/activeSpeechReporter.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/messageReceiver.tsx

Comment thread src/__tests__/features/api/activeSpeechReporter.test.ts
Comment thread src/features/api/activeSpeechReporter.ts
@tegnike
tegnike merged commit 3ed62b5 into main Aug 12, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant