Persistent left-rail component for the wide (split) Mingo layout that displays the chat history list alongside the active conversation panel. ## Key Components ### `MingoHistoryRail` (default export) The root component renders a vertical flex column containing three logical zones: - **"Start New Chat" button** — always pinned at top when `onNewChat` is provided - **Scope selector** (`TabSelector`) — toggles between "My Chats" / "All Chats" when both `scope` and `onScopeChange` are provided; hidden on load error - **Content area** — renders one of four mutually exclusive states: - `loadError` → error message with optional retry button - `isLoadingHistory` → `MingoChatHistorySkeleton` - Dialogs present or active search → `MingoChatHistory` - Empty, no search → `ChatListEmptyState` ### `MingoHistoryScope` ```typescript export type MingoHistoryScope = 'my' | 'all' ``` Union type controlling whether the rail lists only the current user's dialogs (`'my'`) or all tenant-admin dialogs (`'all'`). ### `MingoHistoryRailProps` Full prop interface. Key props: | Prop | Type | Description | |---|---|---| | `dialogs` | `ReadonlyArray` | Pre-sorted (newest-first) dialog list | | `activeDialogId` | `string` | Highlights the currently open chat | | `scope` / `onScopeChange` | `MingoHistoryScope` / handler | Opt-in ownership filter; host owns state | | `isLoadingHistory` | `boolean` | Shows skeleton on first page load | | `loadError` | `boolean` | Triggers error + retry UI | | `hasMore` / `onLoadMore` | `boolean` / handler | Cursor-based pagination | ## Usage Example ```typescript setActiveId(id)} onNewChat={() => setActiveId(undefined)} onRequestRename={(dialog) => openRenameModal(dialog)} onRequestArchive={(dialog) => openArchiveModal(dialog)} scope={scope} onScopeChange={setScope} searchQuery={searchQuery} hasMore={hasMore} isLoadingMore={isFetchingMore} onLoadMore={fetchNextPage} isLoadingHistory={isLoading} loadError={isError} onRetry={refetch} /> ``` ## Source [`mingo-history-rail.tsx`](https://github.com/flamingo-stack/openframe-oss-lib/blob/main/mingo-history-rail.tsx)