PSA Export: - New "PSA / Ticket Note" export format optimized for ConnectWise - Structured output: Problem, Steps Taken, Resolution, Time Spent, Notes - Prominent "Copy for Ticket" button on session detail page - 24 unit tests for PSA export generator Quick-Start Landing: - New default landing page with search-first UX - Auto-focused search bar with debounced tree search - "Continue Session" cards for active sessions - "Recent Trees" section from session history - Home nav item and logo links updated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { create } from 'zustand'
|
|
import { persist } from 'zustand/middleware'
|
|
|
|
type ExportFormat = 'markdown' | 'text' | 'html' | 'psa'
|
|
type TreeLibraryView = 'grid' | 'list' | 'table'
|
|
type TreeSortBy = 'usage_count' | 'updated_at' | 'created_at' | 'name' | 'name_desc' | 'version'
|
|
|
|
interface UserPreferencesState {
|
|
defaultExportFormat: ExportFormat
|
|
setDefaultExportFormat: (format: ExportFormat) => void
|
|
treeLibraryView: TreeLibraryView
|
|
setTreeLibraryView: (view: TreeLibraryView) => void
|
|
treeLibrarySortBy: TreeSortBy
|
|
setTreeLibrarySortBy: (sortBy: TreeSortBy) => void
|
|
}
|
|
|
|
export const useUserPreferencesStore = create<UserPreferencesState>()(
|
|
persist(
|
|
(set) => ({
|
|
defaultExportFormat: 'markdown',
|
|
setDefaultExportFormat: (format) => set({ defaultExportFormat: format }),
|
|
treeLibraryView: 'grid',
|
|
setTreeLibraryView: (view) => set({ treeLibraryView: view }),
|
|
treeLibrarySortBy: 'usage_count',
|
|
setTreeLibrarySortBy: (sortBy) => set({ treeLibrarySortBy: sortBy }),
|
|
}),
|
|
{
|
|
name: 'user-preferences-storage',
|
|
}
|
|
)
|
|
)
|
|
|
|
export default useUserPreferencesStore
|