/** * History Display Configuration (Issue #701) * * Single Source of Truth for the history display limit options used by: * - GET /api/worktrees/:id/messages (upper-bound validation) * - HistoryPane selector UI (selectable options) * - WorktreeDetailRefactored state (persisted to localStorage) * * Design decisions: * - MAX_MESSAGES_LIMIT is derived from HISTORY_DISPLAY_LIMIT_OPTIONS (no duplication). * - DEFAULT_MESSAGES_LIMIT (50) matches the historical default before this issue. * - Storage key uses the `commandmate:` namespace, matching other keys * (e.g. `commandmate:showArchived`). */ /** * Selectable history display limit options (ascending). * The first entry is the historical default; the last entry is the maximum. * * Issue #1123: the 250 ceiling was a performance mitigation for the previously * flat-rendered HistoryPane. Now that the list is virtualized (render cost is * O(visible rows), not O(total)), the ceiling is relaxed to 1000. The API still * bounds the *fetch* by the maximum option (data volume); server-side paging is * tracked separately. */ export declare const HISTORY_DISPLAY_LIMIT_OPTIONS: readonly [50, 100, 150, 200, 250, 500, 1000]; /** * Union type representing any selectable history display limit. */ export type HistoryDisplayLimit = (typeof HISTORY_DISPLAY_LIMIT_OPTIONS)[number]; /** * Upper bound enforced by the API, derived from the maximum option. * * Typed as `HistoryDisplayLimit` (not a brittle `as 250` literal) so that * extending `HISTORY_DISPLAY_LIMIT_OPTIONS` does not require touching this line. */ export declare const MAX_MESSAGES_LIMIT: HistoryDisplayLimit; /** * Default history display limit (used when no localStorage value is present). */ export declare const DEFAULT_MESSAGES_LIMIT: HistoryDisplayLimit; /** * localStorage key used to persist the user-selected history display limit. */ export declare const HISTORY_DISPLAY_LIMIT_STORAGE_KEY = "commandmate:historyDisplayLimit"; /** * Type guard: returns true if `value` is one of the allowed limit options. * * Used when reading from localStorage (which may contain stale/corrupted data) * to safely narrow `number` to `HistoryDisplayLimit`. */ export declare function isHistoryDisplayLimit(value: number): value is HistoryDisplayLimit; /** * localStorage key used to persist the HistoryPane "User only" filter toggle * (Issue #725). * * Value representation: `'true'` / `'false'` (string), matching the existing * `commandmate:showArchived` convention. Any other value (including legacy * `'1'`/`'0'` or missing) is treated as `false` (safe-off fallback). */ export declare const HISTORY_USER_ONLY_STORAGE_KEY = "commandmate:historyUserOnly"; //# sourceMappingURL=history-display-config.d.ts.map