The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 23:00 UTC
feat(web): show the pull request refresh spinning in the detail header (#12833)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
maria committed
Sep 21, 2026 at 00:16 UTC
a9ab9049bbbab89fe23dcfb26c3169ef70a0597e
1 file changed
+19
-11
apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx
+19
-11
@@ -849,6 +849,9 @@ export function PullRequestDetailPanel({
849
// and at worst answer from it.
850
const invalidate = useAtomCommand(pullRequestEnvironment.invalidate, { reportFailure: false });
851
const [isInvalidating, setIsInvalidating] = useState(false);
852
+ // One word for "the host is being asked again", whichever of the two halves is in flight:
853
+ // the invalidation round trip, then the detail read it kicks off.
854
+ const refreshing = isInvalidating || detailQuery.isPending;
855
const refreshFromHost = useCallback(async () => {
856
setIsInvalidating(true);
857
try {
@@ -1987,18 +1990,29 @@ export function PullRequestDetailPanel({
1990
<MenuTrigger
1991
render={
1992
<Button
1990
- aria-label="More pull request actions"
1993
+ aria-label={
1994
+ refreshing ? "Refreshing pull request" : "More pull request actions"
1995
+ }
1996
className="size-6"
1997
size="icon-xs"
1998
variant="ghost-muted"
1999
/>
2000
}
2001
>
1997
- <MoreHorizontalIcon className="size-4" />
2002
+ {/* The refresh lives in this menu, so while one runs the trigger wears
2003
+ the spinning glyph in place of the dots: the reader sees the panel
2004
+ is fetching without a control appearing or the row shifting. */}
2005
+ {refreshing ? (
2006
+ <RefreshIcon refreshing className="size-4" />
2007
+ ) : (
2008
+ <MoreHorizontalIcon className="size-4" />
2009
+ )}
2010
</MenuTrigger>
2011
}
2012
/>
2001
- <TooltipPopup>More pull request actions</TooltipPopup>
2013
+ <TooltipPopup>
2014
+ {refreshing ? "Refreshing pull request" : "More pull request actions"}
2015
+ </TooltipPopup>
2016
</Tooltip>
2017
<MenuPopup align="end" side="bottom" className="min-w-72">
2018
<PullRequestThreadLinks
@@ -2012,14 +2026,8 @@ export function PullRequestDetailPanel({
2026
}
2027
onPickerOpenChange={setThreadPickerOpen}
2028
/>
2015
- <MenuItem
2016
- disabled={isInvalidating || detailQuery.isPending}
2017
- onClick={() => void refreshFromHost()}
2018
- >
2019
- <RefreshIcon
2020
- className="size-3.5"
2021
- refreshing={isInvalidating || detailQuery.isPending}
2022
- />
2029
+ <MenuItem disabled={refreshing} onClick={() => void refreshFromHost()}>
2030
+ <RefreshIcon className="size-3.5" refreshing={refreshing} />
2031
Refresh
2032
</MenuItem>
2033
<MenuItem disabled={handoff !== null} onClick={askAboutPullRequest}>