fix(ui): #576 最終検証の回帰を修正 - #610
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughイベントトランスポートをルート単位で制御・共有し、購読解除後の遅延解放を追加しました。モーダルのフォーカス復帰と開成時初期化を調整し、関連E2E、Viteルート、パッケージマネージャー設定を更新しました。 ChangesUI・イベント安定化
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Route as Current route
participant Hook as use-media-source-events
participant Transport as createServerTransport
participant Events as /api/rpc/sources/events
Route->>Hook: Provide mediaSourceId and pathname
Hook->>Transport: Register listener
Transport->>Events: Reuse or create shared subscription
Events-->>Transport: Emit source event
Transport-->>Hook: Dispatch to registered handlers
Hook-->>Transport: Remove listener on unlisten
Transport->>Transport: Release after idle timeout
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@apps/server/src/hooks/use-media-source-events.ts`:
- Around line 91-95: Update the event callback in subscribeToEventStream’s
cleanup listener so each handlers listener invocation is wrapped in its own
exception handling, allowing subsequent listeners to receive the event. Log each
caught listener error with the existing logging mechanism and prevent it from
propagating as a stream failure or triggering reconnection.
- Around line 112-118: 制御されていないアイドルSSE接続の蓄積を防ぐため、sharedSourceTransports
のアイドル接続管理を更新してください。各source
IDの接続を30秒保持するだけでなく、保持可能なアイドル接続数を制限し、上限超過時は最古のアイドル接続を即時に shared.cleanup() して
sharedSourceTransports から削除してください。既存の idleTimer による遅延クリーンアップと、handlers
が存在する接続の動作は維持してください。
In `@apps/server/src/tests/e2e/route-reload.spec.ts`:
- Around line 497-503: Update the assertion for apiRequestCountPathSince in the
route reload test to also require at least one /api/rpc/sources/events request,
while preserving the existing upper-bound check of three to verify shared
subscriptions.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 801beb17-3b55-462d-944e-0b94303ed72c
📒 Files selected for processing (7)
apps/server/src/hooks/use-media-source-events.tsapps/server/src/tests/e2e/route-reload.spec.tsapps/server/src/tests/e2e/sources-source-media.responsive.spec.tsapps/server/vite.config.tspackage.jsonpackages/ui/src/source-form-modal.tsxpackages/ui/src/upload-media-modal.tsx
概要
Issue #576の最終検証で見つかったUI・E2E・リアルタイム接続の回帰を修正します。
変更内容
検証
Fixes #576
Summary by CodeRabbit