<!-- source-hash: a1e52401ac78c99d8f31dd0b7b35996a -->
Manages board column collapse state, supporting both persistent (localStorage) and in-memory storage modes depending on whether a `storageKey` is provided.

## Key Components

- **`BoardCollapseMap`** — Type alias for `Record<string, boolean>` mapping column IDs to their collapsed state
- **`UseBoardCollapseReturn`** — Interface defining the hook's return shape
- **`useBoardCollapse(storageKey?)`** — Main hook that initializes collapse state either in localStorage (when `storageKey` is given) or in component memory

## Usage Example

```typescript
// Persistent collapse state (survives page refresh)
const { collapsed, toggle, setCollapsed } = useBoardCollapse('my-board-key')

// In-memory only (resets on unmount)
const { collapsed, toggle, setCollapsed } = useBoardCollapse()

// Toggle a column's collapsed state
toggle('column-id-123')

// Explicitly set a column's collapsed state
setCollapsed('column-id-123', true)

// Read current state
const isCollapsed = collapsed['column-id-123'] // boolean | undefined
```

## Behavior Notes

- When `storageKey` is provided, state is persisted via `useLocalStorage` and survives page reloads
- When omitted, state lives in React `useState` and is scoped to the component's lifecycle
- Both `toggle` and `setCollapsed` are memoized with `useCallback` to prevent unnecessary re-renders
- Uses a fallback key `__board_collapse_unused__` internally to satisfy the `useLocalStorage` hook's required argument when no `storageKey` is given