4.2 KiB
4.2 KiB
Quickstart: Assignment Hygiene & Stale Work Detection
Prerequisites
-
Start the local platform stack.
cd apps/platform && ./vendor/bin/sail up -d -
Work with a workspace that has at least two visible tenants, several open findings, and at least two tenant users.
-
Ensure at least one scenario can represent each hygiene state:
- a finding assigned to a user who later loses tenant access or is soft-deleted
- a finding left
in_progressbeyond the stale window without later workflow movement
-
Remember that
/admin/findings/hygieneis a workspace-context canonical page, so tenant selection should not be required to open it.
Automated Validation
Run formatting and the narrowest proving suites for this feature:
cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Findings/FindingsAssignmentHygieneReportTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Findings/FindingsAssignmentHygieneClassificationTest.php tests/Feature/Findings/FindingsAssignmentHygieneOverviewSignalTest.php
Manual Validation Flow
1. Confirm the canonical report opens in workspace context
- Open
/admin/findings/hygienewithout selecting an active tenant. - Confirm the page opens as a workspace-context findings surface.
- Confirm row drilldown still lands on the existing tenant finding detail page.
2. Validate broken-assignment detection
- Start with an open assigned finding in a visible tenant.
- Remove the assignee's tenant membership or soft-delete the assigned user.
- Reload the hygiene report.
- Confirm the finding appears once with
Broken assignmentand still shows owner context.
3. Validate stale in-progress detection
- Start with an open finding moved to
In progressmore than seven days ago. - Ensure no later assignment or reopen workflow activity exists for that finding.
- Reload the hygiene report.
- Confirm the finding appears with
Stale in progress. - Move a comparable finding to
In progressrecently or reassign it recently and confirm it does not appear as stale. - Reopen a comparable finding after it would otherwise qualify as stale and confirm it no longer appears as stale until seven days pass from the reopen activity.
4. Validate multi-reason and unique-count behavior
- Prepare one finding that is both assigned to an unworkable assignee and stale in progress.
- Reload the report and workspace overview.
- Confirm:
- the report shows one row with both reasons visible
- the workspace overview counts one unique hygiene issue, not two separate rows
5. Validate overview discoverability
- Open
/adminwith visible hygiene issues present. - Confirm the findings hygiene signal appears with one CTA into the report.
- Confirm the signal description is a short summary derived from broken-assignment and stale-in-progress counts rather than an undefined severity ordering.
- Open the CTA and verify the canonical report reflects the same visible issue truth.
- Repeat the check with no visible hygiene issues and confirm the same signal remains visible in a calm state with zero issues and the canonical CTA into the report.
6. Validate tenant-prefilter and hidden-tenant safety
- Open the report with an active tenant selected.
- Confirm the report is prefiltered to that tenant while keeping the fixed hygiene scope.
- If the prefilter hides issues that exist in other visible tenants, confirm the empty state explains that boundary and offers exactly one
Clear tenant filterCTA. - Confirm hidden-tenant findings never appear in rows, counts, filter values, or empty-state hints.
Reviewer Notes
- The feature is Livewire v4.0+ compatible and stays on existing Filament v5 primitives.
- Provider registration remains unchanged in
apps/platform/bootstrap/providers.php. - No globally searchable resource behavior changes in this feature.
- No new destructive action is introduced on the hygiene report, so no new confirmation flow is required there.
- Asset strategy is unchanged: no new panel or shared assets, and the existing deploy
filament:assetsstep remains sufficient.