refactor(sheets): extract dialogs, tabs, pivots, and AI chat from main.ts
Phase 2 decomposition of the 6,148-line monolith. Extracts 4 modules:
- sheet-dialogs.ts: sort, CF, and validation dialogs (356 lines)
- sheet-tabs-ui.ts: tab rendering, reorder, rename, context menu (397 lines)
- pivot-ui.ts: pivot dialog and table rendering (229 lines)
- ai-chat-panel.ts: sheet context extraction and chat messaging (178 lines)
main.ts shrinks from 6,148 to 5,159 lines (-989). Each module uses
dependency injection to stay decoupled from module-level state.
Includes 13 new focused tests for extracted pure functions.