Merge fix/phase-4-analyzer-infos into main (markdownlint fixes)
This commit is contained in:
commit
7df1a16273
|
|
@ -1,11 +1,12 @@
|
||||||
# UTO Manager — Development Status
|
# UTO Manager — Development Status
|
||||||
|
|
||||||
_Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
Last updated: 2026-08-09 — branch `fix/phase-4-analyzer-infos` merged to `main`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Current Branch
|
## Current Branch
|
||||||
`main` (fix/phase-4-analyzer-round2 merged)
|
|
||||||
|
`main` (fix/phase-4-analyzer-infos merged)
|
||||||
|
|
||||||
## Overall Progress
|
## Overall Progress
|
||||||
|
|
||||||
|
|
@ -22,6 +23,7 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
## Phase 1 — Domain Foundation ✅
|
## Phase 1 — Domain Foundation ✅
|
||||||
|
|
||||||
**Completed items:**
|
**Completed items:**
|
||||||
|
|
||||||
- `Echelon` entity with doctrinal hierarchy validation (`isValidParent`, `isValidChild`)
|
- `Echelon` entity with doctrinal hierarchy validation (`isValidParent`, `isValidChild`)
|
||||||
- `DoctrinalBranch` entity with display names
|
- `DoctrinalBranch` entity with display names
|
||||||
- `AuthorizedRank` entity with pay grade, category flags, `meetsMinimum`, `gradeLevel`
|
- `AuthorizedRank` entity with pay grade, category flags, `meetsMinimum`, `gradeLevel`
|
||||||
|
|
@ -42,12 +44,14 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
|
|
||||||
**Completed items:**
|
**Completed items:**
|
||||||
|
|
||||||
### Domain Services
|
### Domain Services (Phase 2)
|
||||||
|
|
||||||
- `UnitTreeService` — `buildTree`, `getSubtree`, `getAncestors`, `validateReparent`,
|
- `UnitTreeService` — `buildTree`, `getSubtree`, `getAncestors`, `validateReparent`,
|
||||||
`validateAssignment`, `calculateFillRate`, `getVacantKeyLeaderSlots`, `getMosMismatches`
|
`validateAssignment`, `calculateFillRate`, `getVacantKeyLeaderSlots`, `getMosMismatches`
|
||||||
- `AssignmentService` — `assign`, `unassign`, `aggregateReadiness` with `ReadinessColor`
|
- `AssignmentService` — `assign`, `unassign`, `aggregateReadiness` with `ReadinessColor`
|
||||||
|
|
||||||
### Infrastructure — Database
|
### Infrastructure — Database
|
||||||
|
|
||||||
- Drift schema: `Units`, `PositionSlots`, `Personnel`, `Templates` tables
|
- Drift schema: `Units`, `PositionSlots`, `Personnel`, `Templates` tables
|
||||||
- `AppDatabase` with `forTesting(NativeDatabase.memory())` constructor
|
- `AppDatabase` with `forTesting(NativeDatabase.memory())` constructor
|
||||||
- `UnitDao` — full CRUD + watch streams
|
- `UnitDao` — full CRUD + watch streams
|
||||||
|
|
@ -57,16 +61,19 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
- build_runner code generation (`.g.dart` files)
|
- build_runner code generation (`.g.dart` files)
|
||||||
|
|
||||||
### Infrastructure — Repositories
|
### Infrastructure — Repositories
|
||||||
|
|
||||||
- `DriftUnitRepository` — implements `UnitRepository` with domain↔Drift mapping
|
- `DriftUnitRepository` — implements `UnitRepository` with domain↔Drift mapping
|
||||||
- `DriftPersonnelRepository` — implements `PersonnelRepository` with domain↔Drift mapping
|
- `DriftPersonnelRepository` — implements `PersonnelRepository` with domain↔Drift mapping
|
||||||
- `DriftPositionSlotRepository` — concrete slot repository
|
- `DriftPositionSlotRepository` — concrete slot repository
|
||||||
|
|
||||||
### Application — BLoC
|
### Application — BLoC (Phase 2)
|
||||||
|
|
||||||
- `UnitTreeCubit` / `UnitTreeState` (sealed) — tree loading, selection, reparent, subtree delete
|
- `UnitTreeCubit` / `UnitTreeState` (sealed) — tree loading, selection, reparent, subtree delete
|
||||||
- `PersonnelCubit` / `PersonnelState` (sealed) — roster loading, filter, assign/unassign
|
- `PersonnelCubit` / `PersonnelState` (sealed) — roster loading, filter, assign/unassign
|
||||||
- `TemplateCubit` / `TemplateState` (sealed) — template save/load/delete
|
- `TemplateCubit` / `TemplateState` (sealed) — template save/load/delete
|
||||||
|
|
||||||
### Presentation
|
### Presentation (Phase 2)
|
||||||
|
|
||||||
- `HomeScreen` — three-pane adaptive layout (personnel | canvas | inspector)
|
- `HomeScreen` — three-pane adaptive layout (personnel | canvas | inspector)
|
||||||
- `UtoCanvasWidget` — `InteractiveViewer` pan/zoom org chart with drag-and-drop reparent
|
- `UtoCanvasWidget` — `InteractiveViewer` pan/zoom org chart with drag-and-drop reparent
|
||||||
- `UnitNodeCard` — echelon-colored card with fill rate progress bar
|
- `UnitNodeCard` — echelon-colored card with fill rate progress bar
|
||||||
|
|
@ -74,7 +81,8 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
- `PersonnelListTile` — `Draggable` soldier tile for assignment
|
- `PersonnelListTile` — `Draggable` soldier tile for assignment
|
||||||
- Status bar with live unit/slot fill counts
|
- Status bar with live unit/slot fill counts
|
||||||
|
|
||||||
### App Wiring
|
### App Wiring (Phase 2)
|
||||||
|
|
||||||
- `main.dart` — `MultiBlocProvider` wiring all cubits with production database
|
- `main.dart` — `MultiBlocProvider` wiring all cubits with production database
|
||||||
|
|
||||||
**Test count (Phase 2):** 77 new tests (137 total)
|
**Test count (Phase 2):** 77 new tests (137 total)
|
||||||
|
|
@ -85,7 +93,8 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
|
|
||||||
**Completed items:**
|
**Completed items:**
|
||||||
|
|
||||||
### Domain Services
|
### Domain Services (Phase 3)
|
||||||
|
|
||||||
- `DoctrinalTemplates` — Pure-Dart library of all five 2026 BCT templates:
|
- `DoctrinalTemplates` — Pure-Dart library of all five 2026 BCT templates:
|
||||||
- `mbct` — Mobile Brigade Combat Team (3× Mobile Infantry Battalions, Cav Squadron, FA Battalion, MDEP, HKP, Engineer Battalion, Support Battalion)
|
- `mbct` — Mobile Brigade Combat Team (3× Mobile Infantry Battalions, Cav Squadron, FA Battalion, MDEP, HKP, Engineer Battalion, Support Battalion)
|
||||||
- `sbct` — Stryker Brigade Combat Team (3× Stryker Infantry Battalions, Cav Recon Squadron, FA Battalion, Engineer Battalion, Support Battalion)
|
- `sbct` — Stryker Brigade Combat Team (3× Stryker Infantry Battalions, Cav Recon Squadron, FA Battalion, Engineer Battalion, Support Battalion)
|
||||||
|
|
@ -102,14 +111,16 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
- **V006** Structural hierarchy violation (critical)
|
- **V006** Structural hierarchy violation (critical)
|
||||||
- **V007** Manning below 70% (warning)
|
- **V007** Manning below 70% (warning)
|
||||||
|
|
||||||
### Infrastructure — Codecs
|
### Infrastructure — Codecs (Phase 3)
|
||||||
|
|
||||||
- `UnitTreeCodec` — JSON encode/decode for full unit tree snapshots (units + slots + personnel)
|
- `UnitTreeCodec` — JSON encode/decode for full unit tree snapshots (units + slots + personnel)
|
||||||
- Schema version 1 with `exportedAt` timestamp
|
- Schema version 1 with `exportedAt` timestamp
|
||||||
- `encode` / `decode` (JSON string)
|
- `encode` / `decode` (JSON string)
|
||||||
- `encodeToMap` / `decodeFromMap` (Map)
|
- `encodeToMap` / `decodeFromMap` (Map)
|
||||||
- Handles all optional fields (null parentUnitId, null assignedPersonnelId, qualifications list)
|
- Handles all optional fields (null parentUnitId, null assignedPersonnelId, qualifications list)
|
||||||
|
|
||||||
### Application — BLoC
|
### Application — BLoC (Phase 3)
|
||||||
|
|
||||||
- `TemplateCubit` — Extended with:
|
- `TemplateCubit` — Extended with:
|
||||||
- `instantiateDoctrinalTemplate(key)` — instantiates any of the five BCT templates into the live database
|
- `instantiateDoctrinalTemplate(key)` — instantiates any of the five BCT templates into the live database
|
||||||
- `saveSnapshot(name, bctType, units, slots)` — saves current tree as a named template
|
- `saveSnapshot(name, bctType, units, slots)` — saves current tree as a named template
|
||||||
|
|
@ -120,10 +131,12 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
- `clear()` — resets to `ValidationInitial`
|
- `clear()` — resets to `ValidationInitial`
|
||||||
- `ValidationComplete` exposes `.critical`, `.warnings`, `.advisories`, `.findingsForUnit(id)`, `.isClean`
|
- `ValidationComplete` exposes `.critical`, `.warnings`, `.advisories`, `.findingsForUnit(id)`, `.isClean`
|
||||||
|
|
||||||
### Domain Value Objects
|
### Domain Value Objects (Phase 3)
|
||||||
|
|
||||||
- `DutyMos` — Extended format validation to accept 4-character aviation AOC codes (e.g., `153A` = 3 digits + 1 letter) in addition to standard 3-character codes
|
- `DutyMos` — Extended format validation to accept 4-character aviation AOC codes (e.g., `153A` = 3 digits + 1 letter) in addition to standard 3-character codes
|
||||||
|
|
||||||
### App Wiring
|
### App Wiring (Phase 3)
|
||||||
|
|
||||||
- `main.dart` — Added `ValidationCubit` to `MultiBlocProvider`
|
- `main.dart` — Added `ValidationCubit` to `MultiBlocProvider`
|
||||||
- `TemplateCubit` — Now requires `unitRepository` and `slotRepository` parameters
|
- `TemplateCubit` — Now requires `unitRepository` and `slotRepository` parameters
|
||||||
|
|
||||||
|
|
@ -135,7 +148,8 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
|
|
||||||
**Completed items:**
|
**Completed items:**
|
||||||
|
|
||||||
### Domain Services
|
### Domain Services (Phase 4)
|
||||||
|
|
||||||
- `CommandEventStore` — In-memory append-only event log for all tree mutations:
|
- `CommandEventStore` — In-memory append-only event log for all tree mutations:
|
||||||
- `CommandEvent` with `eventId`, `type`, `payload`, `occurredAt`, `isSynced`
|
- `CommandEvent` with `eventId`, `type`, `payload`, `occurredAt`, `isSynced`
|
||||||
- `CommandEventType` enum: `attachNode`, `detachNode`, `assignPersonnel`, `unassignPersonnel`, `modifySlot`
|
- `CommandEventType` enum: `attachNode`, `detachNode`, `assignPersonnel`, `unassignPersonnel`, `modifySlot`
|
||||||
|
|
@ -151,7 +165,8 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
- `ValidationResponse` with `findings`, `hasError`, optional `error` string
|
- `ValidationResponse` with `findings`, `hasError`, optional `error` string
|
||||||
- Results guaranteed to match synchronous engine output
|
- Results guaranteed to match synchronous engine output
|
||||||
|
|
||||||
### Infrastructure — Codecs
|
### Infrastructure — Codecs (Phase 4)
|
||||||
|
|
||||||
- `ProtobufCodec` — Binary encode/decode for unit tree snapshots:
|
- `ProtobufCodec` — Binary encode/decode for unit tree snapshots:
|
||||||
- 12-byte header: magic `UTOB` (0x55544F42) + version 1 (big-endian uint32)
|
- 12-byte header: magic `UTOB` (0x55544F42) + version 1 (big-endian uint32)
|
||||||
- Payload: zlib-compressed JSON (reuses `UnitTreeCodec` for serialization)
|
- Payload: zlib-compressed JSON (reuses `UnitTreeCodec` for serialization)
|
||||||
|
|
@ -168,14 +183,16 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
- Supports `PdfPageSize.letter` (612×792), `a4` (595×842), `tabloid` (792×1224)
|
- Supports `PdfPageSize.letter` (612×792), `a4` (595×842), `tabloid` (792×1224)
|
||||||
- Unit names truncated to 18 chars; all echelon levels render without error
|
- Unit names truncated to 18 chars; all echelon levels render without error
|
||||||
|
|
||||||
### Application — BLoC
|
### Application — BLoC (Phase 4)
|
||||||
|
|
||||||
- `ValidationCubit` — Extended with isolate-backed validation:
|
- `ValidationCubit` — Extended with isolate-backed validation:
|
||||||
- `startIsolate()` / `disposeIsolate()` lifecycle hooks
|
- `startIsolate()` / `disposeIsolate()` lifecycle hooks
|
||||||
- `validateAsync(units, slots, personnel)` — delegates to `IsolateValidationRunner`
|
- `validateAsync(units, slots, personnel)` — delegates to `IsolateValidationRunner`
|
||||||
- Falls back to synchronous engine if isolate not started
|
- Falls back to synchronous engine if isolate not started
|
||||||
- `ValidationState` extended with `isRunning` flag
|
- `ValidationState` extended with `isRunning` flag
|
||||||
|
|
||||||
### Presentation
|
### Presentation (Phase 4)
|
||||||
|
|
||||||
- `HomeScreen` — Updated with Phase 4 UI:
|
- `HomeScreen` — Updated with Phase 4 UI:
|
||||||
- Validation node indicators on canvas: red border for critical findings, amber for warnings
|
- Validation node indicators on canvas: red border for critical findings, amber for warnings
|
||||||
- "Export PDF" action in app bar → calls `PdfChartExporter`, triggers file save dialog
|
- "Export PDF" action in app bar → calls `PdfChartExporter`, triggers file save dialog
|
||||||
|
|
@ -224,7 +241,7 @@ _Last updated: 2026-08-09 (fix/phase-4-analyzer-round2)_
|
||||||
|
|
||||||
## Architecture Notes
|
## Architecture Notes
|
||||||
|
|
||||||
```
|
```text
|
||||||
lib/
|
lib/
|
||||||
├── domain/
|
├── domain/
|
||||||
│ ├── entities/ # Pure Dart domain models (no Flutter deps)
|
│ ├── entities/ # Pure Dart domain models (no Flutter deps)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue