Architecture: How to prevent the unified chat from becoming another AIPane...
Documentation for Sessions
🏗️ Architecture: How to prevent the unified chat from becoming another AIPane...
Date: 2026-02-21
Time: 18:31:25 UTC
Session: gspace1-133.5
Agent: angular
Confidence: NaN%
Status: ✅ Documented
📋 Decision Context
Question:
How to prevent the unified chat from becoming another AIPanelComponent monolith (4,796 lines) or AiChatCore monolith (8,923 lines)?
Task: Not specified
🎯 Decision Made
Chosen:
Full decomposition into 22 sub-components with hard per-file caps (TS≤250, HTML≤120, SCSS≤150) plus shared SCSS partials
Options Considered:
- Set line caps on the top-level components only
- Full decomposition into 22 sub-components with hard per-file caps (TS≤250, HTML≤120, SCSS≤150) plus shared SCSS partials
💭 Reasoning
AIPanelComponent and AiChatCore grew because there were no structural constraints. Caps on just the top-level component don't prevent sub-components from bloating. Per-file hard caps across ALL files (22 components, 6 services) ensure no single file can grow past maintainability. Shared SCSS partials (_chat-variables, _chat-mixins, _chat-animations) prevent CSS duplication which was the second biggest bloat factor (1,261 and 2,605 lines SCSS). Post-implementation verification script catches violations before they merge.
📁 Files Involved
- No files specified
🔗 Related
- Decision ID:
dev_1771698685476_ypaku5k - Session: 133
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation