## Summary - keep `/admin/reviews/workspace` workspace-scoped in shell and sidebar context - treat `tenant` query hints on the customer review workspace as page-level filters only - update the customer review workspace tests and Spec 311 navigation contract to match the workspace-hub IA ## Testing - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Reviews/CustomerReviewWorkspacePageTest.php` - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceContextTopbarAndTenantSelectionTest.php tests/Feature/Filament/PanelNavigationSegregationTest.php` - `cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent` - `git diff --check` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #366
7.5 KiB
7.5 KiB
Tasks: Workspace / Environment Surface Scope Contract
Input: /Users/ahmeddarrazi/Documents/projects/wt-plattform/specs/311-workspace-environment-surface-scope-contract/spec.md, /Users/ahmeddarrazi/Documents/projects/wt-plattform/specs/311-workspace-environment-surface-scope-contract/plan.md
Prerequisites: Current branch is 311-workspace-environment-surface-scope-contract; Customer Review Workspace product completion is deferred to 312.
Scope: Global admin shell/navigation/filter contract only.
Tests: Pest/Livewire feature tests and route-category unit test.
Test Governance Checklist
- Lane assignment is named and is the narrowest sufficient proof: focused Feature/Unit lane.
- New or changed tests stay in existing surface families.
- No new shared test helper, seed, factory, or heavy family is introduced.
- Browser smoke is not required because no visual layout/styling changed.
- Legacy tenant-owned resource parity remains covered to prevent over-broad scope regression.
Format: [ID] [P?] [Story?] Description with file path
Phase 1: Branch and WIP Split
- T001 Save dirty Customer Review Workspace WIP patch to
/tmp/311-customer-review-workspace-wip.patch. - T002 Stash dirty WIP, including untracked files, before switching branches.
- T003 Switch from the mixed branch to
platform-dev, pull, and create311-workspace-environment-surface-scope-contract. - T004 Confirm no commits are made during implementation.
Phase 2: Contract Tests First
- T005 [US1] Add workspace-wide query-independence cases to
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Filament/PanelNavigationSegregationTest.php. - T006 [US1] Add representative shell-contract coverage to
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Workspaces/GlobalContextShellContractTest.php. - T007 [US1] Update Operations topbar/filter tests in
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Filament/WorkspaceContextTopbarAndTenantSelectionTest.php,/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Monitoring/OperationsTenantScopeTest.php,/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Monitoring/OperationsKpiHeaderTenantContextTest.php,/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Monitoring/OperationsCanonicalUrlsTest.php, and/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Spec085/OperationsIndexHeaderTest.php. - T008 [US1] Update Customer Review Workspace and Review Register filter tests in
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Reviews/CustomerReviewWorkspacePageTest.php,/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/EnvironmentReview/EnvironmentReviewRegisterPrefilterTest.php, and/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/EnvironmentReview/EnvironmentReviewRegisterTest.php. - T009 [US1] Update Audit Log and Alerts workspace-wide tests in
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Filament/AuditLogPageTest.php,/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Alerts/AlertDeliveryDeepLinkFiltersTest.php,/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Filament/Alerts/AlertsKpiHeaderTest.php, and/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Filament/Alerts/AlertDeliveryViewerTest.php. - T010 [US2] Add route-category coverage to
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Unit/Tenants/TenantPageCategoryTest.php. - T011 [US3] Keep
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/tests/Feature/Filament/TenantOwnedResourceScopeParityTest.phpgreen as a legacy tenant-owned regression guard.
Phase 3: Runtime Contract
- T012 [US1] Add
WorkspaceWideSurfaceclassification to/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Support/Tenants/TenantPageCategory.php. - T013 [US1] Make
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Support/Tenants/TenantPageCategory.phpresolve Livewire update/request paths from referer when needed. - T014 [US1] Update
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Support/Tenants/TenantInteractionLane.phpfor the new route category. - T015 [US1] Update
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Support/OperateHub/OperateHubShell.phpsoWorkspaceWideSurfaceresolves tenantless before query, Filament tenant, or remembered tenant hints. - T016 [US1] Remove remembered-tenant default filters and global-context clearing from
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Filament/Pages/Reviews/CustomerReviewWorkspace.phpand/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Filament/Pages/Reviews/ReviewRegister.php. - T017 [US1] Make Provider Connection list filtering query-driven only in
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Filament/Resources/ProviderConnectionResource.php. - T018 [US1] Make Alert Delivery list and Alerts KPI workspace-wide in
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Filament/Resources/AlertDeliveryResource.phpand/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Filament/Widgets/Alerts/AlertsKpiHeader.php. - T019 [US1] Make Operations KPI use workspace entitlement scope when shell is tenantless in
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/app/Filament/Widgets/Operations/OperationsKpiHeader.php.
Phase 4: Spec Artifacts
- T020 Create
/Users/ahmeddarrazi/Documents/projects/wt-plattform/specs/311-workspace-environment-surface-scope-contract/spec.md. - T021 Create
/Users/ahmeddarrazi/Documents/projects/wt-plattform/specs/311-workspace-environment-surface-scope-contract/plan.md. - T022 Create
/Users/ahmeddarrazi/Documents/projects/wt-plattform/specs/311-workspace-environment-surface-scope-contract/tasks.md.
Phase 5: Validation and Close-Out
- T023 Run the focused 311 Feature/Unit test selection from
/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform. - T024 Run
cd /Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform && ./vendor/bin/sail bin pint --dirty --format agent. - T025 Run
git diff --checkfrom/Users/ahmeddarrazi/Documents/projects/wt-plattform. - T026 Record final changed files, validation, no-migration/no-RBAC/no-CRW-product-logic close-out.
Dependencies
- T001-T004 before runtime edits.
- T005-T011 before or alongside T012-T019.
- T012-T019 before final validation.
- T020-T022 before final close-out because runtime files changed.
- T023-T026 last.
Parallel Work Examples
- T005-T011 can be maintained by surface family after the contract is known.
- T016-T019 are disjoint runtime surface updates after T012-T015.
- T023 can run before T024/T025; T024 and T025 are final formatting/whitespace checks.
Implementation Strategy
- Preserve 312 WIP by patch/stash.
- Establish route-scope tests first.
- Harden central taxonomy and shell.
- Remove remembered/global tenant defaults from explicit workspace-wide surfaces.
- Preserve legacy tenant-owned list parity.
- Validate focused suite, format, and whitespace.