authorgravatar for me@t3.ggTheo Browne <me@t3.gg> 2026-08-25 00:01:33-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-25 00:01:33-07:00
loge6d487e4f5d3cd049dbb373c7ca74192302443ae
tree1438ac835cfd6e39cf09049002177a7436c05f27
parentafc8342801d487d96732fdad25454f0c1fe96a3b
signature Signed by PGP key B5690EEEBB952194

fix(web): delay thread shortcut hints by 200 ms (#8172)


2 files changed, 8 insertions(+), 5 deletions(-)

apps/web/src/components/Sidebar.logic.ts+1-1
......@@ -15,7 +15,7 @@ import { isLatestTurnSettled } from "../session-logic";
1515import { resolveServerBackedAppStageLabel } from "../branding.logic";
1616
1717export const THREAD_SELECTION_SAFE_SELECTOR = "[data-thread-item], [data-thread-selection-safe]";
18export const THREAD_JUMP_HINT_SHOW_DELAY_MS = 100;
18export const THREAD_JUMP_HINT_SHOW_DELAY_MS = 200;
1919// Visible sidebar rows are prewarmed into the thread-detail cache so opening a
2020// nearby thread usually reuses an already-hot subscription. Each prewarmed
2121// thread holds a live, fully hydrated detail subscription (all messages and
apps/web/src/components/Sidebar.tsx+7-4
......@@ -142,6 +142,7 @@ import {
142142 sortPinnedThreadsForSidebar,
143143 sortSettledThreadsForSidebar,
144144 sortThreadsForSidebar,
145 useThreadJumpHintVisibility,
145146} from "./Sidebar.logic";
146147import { resolveLocalCheckoutBranchMismatch } from "./BranchToolbar.logic";
147148import {
......@@ -2308,7 +2309,7 @@ export default function Sidebar() {
23082309 }
23092310 return mapping;
23102311 }, [keybindings, orderedThreadKeys]);
2311 const [showJumpHints, setShowJumpHints] = useState(false);
2312 const { showThreadJumpHints, updateThreadJumpHintsVisibility } = useThreadJumpHintVisibility();
23122313
23132314 // Settled threads are live shells, so opening one is plain navigation:
23142315 // history stays readable without un-settling, and sending a message or
......@@ -3342,8 +3343,8 @@ export default function Sidebar() {
33423343 },
33433344 );
33443345 useEffect(() => {
3345 setShowJumpHints(shouldShowJumpHintsNow);
3346 }, [shouldShowJumpHintsNow]);
3346 updateThreadJumpHintsVisibility(shouldShowJumpHintsNow);
3347 }, [shouldShowJumpHintsNow, updateThreadJumpHintsVisibility]);
33473348
33483349 const attachListAutoAnimateRef = useCallback((node: HTMLUListElement | null) => {
33493350 if (!node) return;
......@@ -3721,7 +3722,9 @@ export default function Sidebar() {
37213722 wokeAt={threadWokeAt(thread, { now: snoozeNow })}
37223723 isActive={routeThreadKey === threadKey}
37233724 openPullRequestsInRightPanel={routeThreadRef !== null}
3724 jumpLabel={showJumpHints ? (jumpLabelByKey.get(threadKey) ?? null) : null}
3725 jumpLabel={
3726 showThreadJumpHints ? (jumpLabelByKey.get(threadKey) ?? null) : null
3727 }
37253728 currentEnvironmentId={primaryEnvironmentId}
37263729 environmentLabel={environmentLabelById.get(thread.environmentId) ?? null}
37273730 projectCwd={