Skip to content

Commit c4261eb

Browse files
committed
skip auto-refresh when document not visible
1 parent eaebe18 commit c4261eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/browser/components/RightSidebar/CodeReview/ReviewPanel.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ export const ReviewPanel: React.FC<ReviewPanelProps> = ({
262262
let debounceTimer: ReturnType<typeof setTimeout> | null = null;
263263

264264
const performRefresh = () => {
265+
// Skip if document not visible (user switched tabs/windows)
266+
if (document.hidden) return;
267+
265268
// Skip if user is actively entering a review note
266269
if (isUserInteractingRef.current) {
267270
pendingRefreshRef.current = true;

0 commit comments

Comments
 (0)