@@ -15,18 +15,18 @@ import type { SidebarThreadSummary, Thread } from "../types";
1515import { cn } from "../lib/utils" ;
1616import { isLatestTurnSettled } from "../session-logic" ;
1717
18- export const THREAD_SELECTION_SAFE_SELECTOR = "[data-thread-item], [data-thread-selection-safe]" ;
18+ const THREAD_SELECTION_SAFE_SELECTOR = "[data-thread-item], [data-thread-selection-safe]" ;
1919export const THREAD_JUMP_HINT_SHOW_DELAY_MS = 200 ;
2020// Visible sidebar rows are prewarmed into the thread-detail cache so opening a
2121// nearby thread usually reuses an already-hot subscription. Each prewarmed
2222// thread holds a live, fully hydrated detail subscription (all messages and
2323// activities, growing as agents work) for as long as the row stays visible,
2424// so this limit is a direct renderer-heap and server-load multiplier — keep
2525// it small; cold opens still render instantly from the cached snapshot.
26- export const SIDEBAR_THREAD_PREWARM_LIMIT = 3 ;
26+ const SIDEBAR_THREAD_PREWARM_LIMIT = 3 ;
2727// A small buffer keeps the next few rows warm without leasing every row that
2828// content-visibility leaves mounted below the scroll viewport.
29- export const SIDEBAR_ROW_SUBSCRIPTION_OVERSCAN_PX = 160 ;
29+ const SIDEBAR_ROW_SUBSCRIPTION_OVERSCAN_PX = 160 ;
3030
3131export function useSidebarRowSubscriptionLease ( isActive : boolean ) : {
3232 readonly leaseLiveStatus : boolean ;
@@ -544,13 +544,6 @@ export function resolveSidebarThreadStatus(thread: SidebarThreadStatusInput): Si
544544 return "ready" ;
545545}
546546
547- /** NaN-safe Date.parse for sort comparators: a malformed timestamp must not
548- poison the whole ordering, so it sinks to the epoch instead. */
549- export function parseTimestampMs ( isoDate : string ) : number {
550- const parsed = Date . parse ( isoDate ) ;
551- return Number . isNaN ( parsed ) ? 0 : parsed ;
552- }
553-
554547/** First VALID timestamp wins: `a ?? b` falls through on null, but a present-
555548 yet-malformed string must also fall through to the next candidate rather
556549 than sink the row to the epoch. */
@@ -567,7 +560,7 @@ export function firstValidTimestampMs(
567560
568561/** String twin of firstValidTimestampMs for callers that need the ISO string
569562 (display labels, tick anchors) rather than epoch ms. */
570- export function firstValidTimestamp (
563+ function firstValidTimestamp (
571564 ...candidates : ReadonlyArray < string | null | undefined >
572565) : string | null {
573566 for ( const candidate of candidates ) {
0 commit comments