Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
fix(web): delay thread shortcut hints by 200 ms (#8172)
Theo Brownee6d487e4f5d3
diff --git a/apps/web/src/components/Sidebar.logic.ts b/apps/web/src/components/Sidebar.logic.tsindex 747fc07d3..8067fdd59 100644--- a/apps/web/src/components/Sidebar.logic.ts+++ b/apps/web/src/components/Sidebar.logic.ts@@ -15,7 +15,7 @@ import { isLatestTurnSettled } from "../session-logic";import { resolveServerBackedAppStageLabel } from "../branding.logic";export const THREAD_SELECTION_SAFE_SELECTOR = "[data-thread-item], [data-thread-selection-safe]";-export const THREAD_JUMP_HINT_SHOW_DELAY_MS = 100;+export const THREAD_JUMP_HINT_SHOW_DELAY_MS = 200;// Visible sidebar rows are prewarmed into the thread-detail cache so opening a// nearby thread usually reuses an already-hot subscription. Each prewarmed// thread holds a live, fully hydrated detail subscription (all messages anddiff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsxindex 862100f18..63681a548 100644--- a/apps/web/src/components/Sidebar.tsx+++ b/apps/web/src/components/Sidebar.tsx@@ -142,6 +142,7 @@ import {sortPinnedThreadsForSidebar,sortSettledThreadsForSidebar,sortThreadsForSidebar,+ useThreadJumpHintVisibility,} from "./Sidebar.logic";import { resolveLocalCheckoutBranchMismatch } from "./BranchToolbar.logic";import {@@ -2308,7 +2309,7 @@ export default function Sidebar() {}return mapping;}, [keybindings, orderedThreadKeys]);- const [showJumpHints, setShowJumpHints] = useState(false);+ const { showThreadJumpHints, updateThreadJumpHintsVisibility } = useThreadJumpHintVisibility();// Settled threads are live shells, so opening one is plain navigation:// history stays readable without un-settling, and sending a message or@@ -3342,8 +3343,8 @@ export default function Sidebar() {},);useEffect(() => {- setShowJumpHints(shouldShowJumpHintsNow);- }, [shouldShowJumpHintsNow]);+ updateThreadJumpHintsVisibility(shouldShowJumpHintsNow);+ }, [shouldShowJumpHintsNow, updateThreadJumpHintsVisibility]);const attachListAutoAnimateRef = useCallback((node: HTMLUListElement | null) => {if (!node) return;@@ -3721,7 +3722,9 @@ export default function Sidebar() {wokeAt={threadWokeAt(thread, { now: snoozeNow })}isActive={routeThreadKey === threadKey}openPullRequestsInRightPanel={routeThreadRef !== null}- jumpLabel={showJumpHints ? (jumpLabelByKey.get(threadKey) ?? null) : null}+ jumpLabel={+ showThreadJumpHints ? (jumpLabelByKey.get(threadKey) ?? null) : null+ }currentEnvironmentId={primaryEnvironmentId}environmentLabel={environmentLabelById.get(thread.environmentId) ?? null}projectCwd={