You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 41eb01b
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(web): review guide runs are watched from their answers, not from mounted components
Review guide run notifications were owned by a null component in the root
route: one child component per watched run, each with a polling effect and
an effect that reacted to the guide query's data. A run was only watched
when a guide tab happened to be mounted (an effect in useReviewGuideWriter),
the guide tab told the store it was on screen from another effect, and a
notification that opened a guide went through a one-shot "open request" in
the store that the detail panel consumed with setState during render plus a
clearing effect.
- The pull request reviewGuide query gets an answer handler: any answer
that reports a Running run registers the watch, wherever it was read.
- startGuideRunNotifications runs from appInit for the app's lifetime. It
subscribes to the store's watches and, per watch, to the guide atom, and
polls with an interval it owns.
- The pull requests page keeps its detail tab in the guide run store
(tabOnPage), so a notification switches it with showPageDetailTab. A
thread's panel opened to keep the guide gets detailTab "guide" on its
surface instead of an open request.
- The detail panel derives its visible tab: an unavailable tab falls back
to Summary without overwriting the selection.
- The notifier reads whether the guide is on screen from the panel's
data-guide-shown attribute instead of a store field kept by an effect.
Effects: PullRequestDetailPanel.tsx 5 -> 4, PullRequestGuideTab.tsx 2 -> 1,
PullRequestGuideRunCoordinator.tsx 2 per watched run -> 0,
useReviewGuideWriter.ts 1 -> 0. Two setState-during-render syncs in the
panel are gone.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
0 commit comments