freeze fix

This commit is contained in:
2026-06-02 16:36:00 +03:00
parent 01e0d1c529
commit 29acfb4e69
13 changed files with 1171 additions and 181 deletions

View File

@@ -264,6 +264,22 @@ search_contracts query="users" type="Model"
| **Store** (`BINDS_TO -> [storeId]`) | Global cross-route state (auth, notifications, task drawer). Persists across navigation. |
| **Inline $state** | Local component UI state (accordion open, tooltip visible, input focus). No cross-component invariants. |
### Model Decomposition Gate
Models accumulate methods as features grow. To prevent "god object" anti-pattern:
| Threshold | Action |
|-----------|--------|
| Model > **400 lines** | Decompose — extract domain helpers or split into submodels |
| Model > **40 public methods** | Split into submodels by responsibility (e.g. `FiltersModel`, `SelectionModel`, `GitActionsModel`) |
**Submodel split example for DashboardHubModel:**
- `DashboardFiltersModel` — search, column filters, sort
- `DashboardSelectionModel` — checkbox, select all/visible, bulk actions
- `DashboardGitActionsModel` — git init, sync, commit, pull, push
Before decomposition, the model MUST carry `@INVARIANT DECOMPOSITION GATE` with the split plan and line count.
## IV. IMPLEMENTATION & ACCESSIBILITY (A11Y)
1. **Event Handling:** Use native attributes (e.g., `onclick={handler}`, `onchange={handler}`).