## Summary <!-- Kurz: Was ändert sich und warum? --> ## Spec-Driven Development (SDD) - [ ] Es gibt eine Spec unter `specs/<NNN>-<feature>/` - [ ] Enthaltene Dateien: `plan.md`, `tasks.md`, `spec.md` - [ ] Spec beschreibt Verhalten/Acceptance Criteria (nicht nur Implementation) - [ ] Wenn sich Anforderungen während der Umsetzung geändert haben: Spec/Plan/Tasks wurden aktualisiert ## Implementation - [ ] Implementierung entspricht der Spec - [ ] Edge cases / Fehlerfälle berücksichtigt - [ ] Keine unbeabsichtigten Änderungen außerhalb des Scopes ## Tests - [ ] Tests ergänzt/aktualisiert (Pest/PHPUnit) - [ ] Relevante Tests lokal ausgeführt (`./vendor/bin/sail artisan test` oder `php artisan test`) ## Migration / Config / Ops (falls relevant) - [ ] Migration(en) enthalten und getestet - [ ] Rollback bedacht (rückwärts kompatibel, sichere Migration) - [ ] Neue Env Vars dokumentiert (`.env.example` / Doku) - [ ] Queue/cron/storage Auswirkungen geprüft ## UI (Filament/Livewire) (falls relevant) - [ ] UI-Flows geprüft - [ ] Screenshots/Notizen hinzugefügt ## Notes <!-- Links, Screenshots, Follow-ups, offene Punkte --> Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #223
3.9 KiB
3.9 KiB
Quickstart: Baseline Compare Matrix: High-Density Operator Mode
Goal
Turn the existing baseline compare matrix into a denser operator surface without changing its underlying compare truth. Multi-tenant use should favor high-density cross-tenant scanning, while single-tenant use should collapse into a calmer compact comparison view.
Implementation Sequence
-
Add page-level presentation state.
- Add
auto,dense, andcompactroute-local mode state. - Resolve the active mode from visible tenant count unless the operator explicitly overrides it.
- Expose
lastUpdatedAt, staged-filter state, and passive auto-refresh state on the page.
- Add
-
Build the dense multi-tenant rendering contract.
- Keep the subject column sticky.
- Reduce dense-cell chrome to state, trust, freshness, and attention.
- Move repeated follow-up links into compact secondary affordances.
-
Build the compact single-tenant rendering contract.
- Replace the pseudo-matrix layout with a compact subject-result list.
- Remove repeated tenant headers and repeated metadata blocks.
- Preserve subject focus and existing drilldowns.
-
Compress supporting context.
- Convert heavy filters to staged apply/reset semantics.
- Replace the current long policy-type list with a more compact operator-first control.
- Group or collapse legends so they remain available without dominating the page.
- Separate blocking refresh from passive auto-refresh and last-updated status.
-
Extend regression coverage.
- Cover mode resolution, dense multi-tenant layout, compact single-tenant layout, staged filters, and non-blocking refresh cues.
- Keep existing Spec 190 matrix truth, drilldown continuity, and RBAC guarantees green.
Suggested Test Files
apps/platform/tests/Feature/Filament/BaselineCompareMatrixPageTest.phpapps/platform/tests/Feature/Baselines/BaselineCompareMatrixBuilderTest.phpapps/platform/tests/Feature/Guards/ActionSurfaceContractTest.phpapps/platform/tests/Browser/Spec190BaselineCompareMatrixSmokeTest.php
Minimum Verification Commands
Run all commands through Sail from apps/platform.
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/BaselineCompareMatrixPageTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Baselines/BaselineCompareMatrixBuilderTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Guards/ActionSurfaceContractTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Browser/Spec190BaselineCompareMatrixSmokeTest.php
cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent
Manual Acceptance Checklist
- Open a baseline profile whose matrix has multiple visible tenants and confirm
autoresolves to dense mode. - Verify the first subject column remains visible while horizontally scrolling dense mode.
- Confirm dense cells foreground compare state, trust, freshness, and attention before links or long prose.
- Open a matrix that resolves to one visible tenant and confirm
autoresolves to compact mode instead of a one-column matrix. - Change heavy filters and confirm the page stages those changes until the operator applies them.
- Confirm active filter count and filter summary reflect the applied state clearly.
- Confirm legends are still understandable but no longer dominate the top of the page.
- Trigger or observe queued/running compare work and confirm passive auto-refresh does not look like a permanent blocking load.
- Confirm the page shows when the current matrix payload was last updated.
- Verify tenant compare, finding, and run drilldowns still preserve the existing matrix context.
Deployment Notes
- No migration is expected.
- No new asset registration is expected.
- No queue topology change is expected because compare execution semantics stay unchanged.