Some checks failed
Main Confidence / confidence (push) Failing after 54s
Add `CustomerReviewWorkspace` page for tenant pre-filtered reviews Add customer workspace links to `EvidenceSnapshotResource`, `ReviewPackResource`, and `TenantReviewResource` Implement audit logging for `TenantReviewOpened` and `ReviewPackDownloaded` actions Update ReviewPack download controller to enforce tenant-scoped RBAC Add tests for ReviewPack download authorization and audit logging Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #289
6.3 KiB
6.3 KiB
Quickstart — Customer Review Workspace v1
Preconditions
- Docker is running and the Sail stack for
apps/platformis available. - The feature remains inside the existing Laravel monolith and admin plane.
- The first slice stays read-oriented: no new customer portal, no new identity plane, no new persistence, and no remediation or generation workflow.
Intended Implementation Order
- Add the native admin
CustomerReviewWorkspacepage and its Blade view under the existing reviews family. - Reuse or minimally extend
TenantReviewRegisterServiceto resolve workspace membership, entitled tenants, and latest published reviews per entitled tenant. - Compose customer-safe row content from existing
TenantReviewsummary / section payloads,ArtifactTruthPresenter,currentExportReviewPack, andRedactionIntegrity. - Preserve tenant launch context and remembered filters through Livewire-safe public/query/session-backed state.
- Wire
Open latest reviewto the existing tenant-scoped review detail route and keep review-pack consumption on the existing signed download path. - Reuse the existing audit pipeline for any explicit artifact access event that is not already covered by the current review / export flow.
- Add focused feature coverage and one browser smoke test, then run Pint.
Targeted Validation Commands (after implementation)
export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Reviews/CustomerReviewWorkspacePageTest.phpexport PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Reviews/CustomerReviewWorkspaceAuthorizationTest.phpexport PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Reviews/CustomerReviewWorkspacePackAccessTest.phpexport PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Browser/Reviews/CustomerReviewWorkspaceSmokeTest.php- If implementation changes pack-download plumbing directly:
export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/ReviewPack/ReviewPackDownloadTest.php export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent
Smoke Checklist Reference (after implementation)
Implementation close-out used the bounded browser smoke in tests/Browser/Reviews/CustomerReviewWorkspaceSmokeTest.php plus the focused feature lane as the executed smoke evidence. The checklist below remains the human reference checklist, but no separate manual integrated-browser run was executed for this implementation close-out.
- Sign in to
/adminas a readonly-capable tenant actor, select a workspace, and open/admin/reviews/workspace. - Confirm that the page shows only entitled tenants, the latest customer-safe review posture, and no create, publish, regenerate, refresh, expire, triage, or remediation controls.
- Launch the page from an existing tenant-scoped review or evidence route and confirm the tenant prefilter survives the first page load.
- Open the latest review for a tenant with a published review and confirm the detail remains read-oriented for the readonly actor.
- Use the pack action for a tenant with a current pack and confirm the download path stays signed and customer-safe; for a tenant without a current pack, confirm the page shows a calm unavailable state instead of a generation action.
- Attempt an explicit out-of-scope tenant filter or deep link and confirm the result stays not found without leaking tenant existence.
Executed Validation Evidence
export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Reviews/CustomerReviewWorkspacePageTest.php tests/Feature/Reviews/CustomerReviewWorkspaceAuthorizationTest.php tests/Feature/Reviews/CustomerReviewWorkspacePackAccessTest.php tests/Feature/Reviews/CustomerReviewWorkspaceLaunchLinksTest.php tests/Feature/Evidence/EvidenceSnapshotResourceTest.php tests/Feature/ReviewPack/ReviewPackWidgetTest.php tests/Feature/ReviewPack/ReviewPackResourceTest.php tests/Feature/ReviewPack/ReviewPackDownloadTest.php tests/Feature/ReviewPack/ReviewPackRbacTest.php tests/Feature/TenantReview/TenantReviewUiContractTest.php tests/Browser/Reviews/CustomerReviewWorkspaceSmokeTest.php->83 passed (372 assertions)export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Browser/Reviews/CustomerReviewWorkspaceSmokeTest.php->1 passed (19 assertions)export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent->pass
Close-out Notes
TenantReviewRegisterServicereuse held; no page-local helper was needed.- The review-pack download route remained signed, but now also enforces tenant membership and
REVIEW_PACK_VIEWat request time. - Explicit artifact access is now audited through additive
tenant_review.openedandreview_pack.downloadedaction IDs on the existing audit pipeline. ReviewRegisterandEvidenceOverviewsatisfied the launch-path requirement through existing row/detail navigation reuse rather than new duplicate workspace buttons.
Notes
- Filament v5 already runs on Livewire v4 in this repo.
- Panel providers remain registered through ../../apps/platform/bootstrap/providers.php; this slice does not add or move providers.
- No new globally searchable Resource is part of v1. Existing review, review-pack, and evidence Resources already keep global search disabled.
- No destructive action belongs on the new workspace page. If implementation accidentally introduces one, it must use
->requiresConfirmation()and stay outside the customer-safe default path. - No new registered asset bundle is expected. If implementation later registers a Filament asset anyway, deployment still requires
cd apps/platform && php artisan filament:assets. - This remains a customer-safe consumption slice only. Review creation, publication, regeneration, remediation, and operator/debug workflows remain on existing internal surfaces or future specs.