-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: cleanup references #5965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cleanup references #5965
Conversation
WalkthroughSSR stream handling is refactored to improve listener lifecycle management. Injected HTML listener setup replaces callback-based patterns with a dedicated handler function; cleanup operations add guards to prevent undefined references. Query cache subscription cleanup is properly initialized and invoked at render completion. Changes
Sequence DiagramsequenceDiagram
participant Router as Router SSR
participant Listener as Listener
participant Handler as handleInjectedHtml
participant Buffer as routerStreamBuffer
rect rgb(200, 220, 240)
Note over Router,Buffer: New Flow
Router->>Listener: setup listener to pass injected HTML
Router->>Handler: initial call to process injectedHtml array
loop for each promise
Handler->>Handler: increment processingCount
Handler->>Buffer: collect emitted HTML
end
Handler->>Handler: clear injectedHtml array
rect rgb(220, 240, 200)
Note over Handler,Buffer: Finalization (on render complete)
end
Handler->>Handler: wait for in-flight promises
Handler->>Listener: cleanup listener (guarded)
Handler->>Router: resolve injectedHtmlDonePromise
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (2)📚 Learning: 2025-11-25T00:18:21.258ZApplied to files:
📚 Learning: 2025-10-01T18:30:26.591ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (6)
Comment |
|
View your CI Pipeline Execution ↗ for commit 9123be7
☁️ Nx Cloud last updated this comment at |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.