Refactor: nchan pause improvements#2097
Conversation
WalkthroughThis update removes an automatic reset on window blur in favor of an explicit Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant B as Browser
participant D as DefaultPageLayout
participant PF as pageFocusFunction
participant N as nchanFocusHandler
%% Focus Event Sequence
U->>B: Window gains focus
B->>D: Trigger focus event
D->>D: Clear any active blurTimer
D->>D: Invoke nchanFocusStart()
D->>PF: Execute pageFocusFunction (try-catch)
PF-->>D: Return result
D->>B: Resume live updates
%% Blur Event Sequence
U->>B: Window loses focus
B->>D: Trigger blur event
D->>D: Set blurTimer to delay update stop
Note right of D: Wait for timeout delay
D->>N: Invoke nchanFocusStop() after timer expires
N->>B: Pause live updates
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🔇 Additional comments (9)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit
New Features
Refactor