← Về thư mục
frontend/src/features/sessions/paging.ts
- SeqRow · type · L14-L14 — type SeqRow = { seq?: number };
- SessionLike · type · L15-L26 — type SessionLike = { id?: string; parent_frame_id?: unknown; project_id?: string; folder_id?: string; name?: string; task_summary?: string; updated_at?: string; message_count?: number; running?: boolean; kernel_alive?: boolean; };
- FolderLike · type · L27-L27 — type FolderLike = { folder_id?: string; name?: string };
- FramePage · type · L28-L32 — type FramePage = { frames?: SessionLike[]; has_more?: boolean; next_cursor?: string | null; };
- SessionWalkState · type · L33-L38 — type SessionWalkState = { rows: SessionLike[]; seen: Set; walked: number; hasMore: boolean; };
- sortMessagesBySeq · function · L40-L43 — function sortMessagesBySeq(rows: T[]): T[]
- prependOlderMessages · function · L46-L48 — function prependOlderMessages(older: T[], newer: T[]): T[]
- shouldWalkEarlier · function · L50-L52 — function shouldWalkEarlier(earlier: boolean, cursor: unknown, pages: number): boolean
- sortSessionsByUpdatedAt · function · L54-L58 — function sortSessionsByUpdatedAt(rows: T[]): T[]
- sessionsInProject · function · L60-L66 — function sessionsInProject( rows: T[], projectId: string | null | undefined, ): T[]
- ungroupedSessions · function · L68-L73 — function ungroupedSessions( rows: T[], folders: FolderLike[], ): T[]
- sessionWalkBudget · function · L75-L77 — function sessionWalkBudget(sessionPages: number): number
- canLoadMoreSessions · function · L79-L87 — function canLoadMoreSessions(opts: { loadingMore: boolean; hasMore: boolean; sessionPages: number; }): boolean
- emptySessionWalk · function · L89-L91 — function emptySessionWalk(): SessionWalkState
- absorbSessionPage · function · L97-L117 — function absorbSessionPage(state: SessionWalkState, page: FramePage | null | undefined): { cursor: string | null; stop: boolean; }
- filterRootFrames · function · L119-L121 — function filterRootFrames(frames: T[]): T[]
- annotateRunningCounts · function · L123-L135 — function annotateRunningCounts< P extends { project_id?: string; id?: string; running_count?: number }, F extends { project_id?: string; running?: boolean }, >(projects: P[], frames: F[]): P[]
- recentDashboardSessions · function · L137-L142 — function recentDashboardSessions(frames: T[]): T[]
- runningDashboardFrames · function · L144-L148 — function runningDashboardFrames(frames: T[]): T[]
- DateBucket · type · L150-L150 — type DateBucket = "today" | "yesterday" | "thisWeek" | "older";
- dateBucketId · function · L152-L160 — function dateBucketId(iso: string | undefined, nowMs: number): DateBucket