Skip to content

Pause timeline fetching in hidden split panes - #4544

Closed
ymichael wants to merge 1 commit into
mainfrom
bb/fix-issue-4508-in-bb-thr_45rupkq6cc
Closed

ymichael wants to merge 1 commit into
mainfrom
bb/fix-issue-4508-in-bb-thr_45rupkq6cc

Conversation

@ymichael

@ymichael ymichael commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Maximizing a split pane hid sibling views while leaving their timeline query observers enabled. Realtime invalidation could therefore refetch a timeline displayed only in hidden panes (#4508).

What changed

Pass pane visibility through the thread view to the existing timeline controller's enabled option. Hidden panes retain local state, stop fetching, and refresh when restored. Other enabled consumers of the same query remain active.

This adapts the fix and regression from #4511 onto this thread's branch. That PR is owned by the SlopCop bot; its branch is untouched. These PRs overlap and should not both be merged. No wire, SDK, CLI, configuration, or persisted-data contracts change.

How you verified

  • Regression fails before the fix: hidden timeline fetch count is 2 instead of 1.
  • pnpm exec turbo run test --filter=@bb/app -- src/views/thread-detail/SplitThreadArea.test.tsx src/components/thread/timeline/useThreadTimelineController.test.tsx src/hooks/queries/thread-queries.test.tsx: 101 tests pass.
  • pnpm exec turbo run lint typecheck --filter=@bb/app: passes; 209 existing lint warnings, zero errors.
  • Chromium actual ThreadDetailView: hidden mounted observer becomes inactive; invalidation leaves fetch count unchanged; restore fetches once. A second enabled observer preserves fetching.
  • Formatting and git diff --check pass.

Matched base/PR source frontends against the same isolated backend and thread data: five hidden-pane invalidations caused 5 timeline HTTP requests on base and 0 on PR; restoring the PR pane caused 1 request. The same pane DOM node remained mounted. Chromium Resource Timing and query update counters agreed.

Final CI on eb39ef4495432cea3f92f8cd8e4abeb3e2c8d99f: 17 checks passed, 3 conditional/platform checks skipped. CPU benefit is unmeasured; Electron has not been tested separately. Browser measurements used explicit query invalidations and real API responses, without a streaming agent turn.

Fixes #4508

AGENT GENERATED

@ymichael

Copy link
Copy Markdown
Collaborator Author

Closing as a duplicate in favor of #4511, as requested by Michael. The functional changes and regression test are identical; the diff differences are base revision/formatting only. #4511 is open and mergeable with 17 successful checks and 3 skipped checks. Additional matched-source verification performed for this equivalent implementation: five hidden-pane invalidations produced 5 timeline HTTP requests on base and 0 with the fix; restoring the fixed pane produced 1 refresh, retaining the same pane DOM node. CPU benefit remains unmeasured. No changes need porting from this PR. Neither PR was merged as part of this action.

@ymichael ymichael closed this Sep 30, 2026
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.

Maximizing a split pane leaves hidden timelines subscribed and refetching

1 participant