freeze fix
This commit is contained in:
@@ -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}`).
|
||||
|
||||
Reference in New Issue
Block a user