TenantAtlas/tests/Feature
ahmido 57f3e3934c 085-tenant-operate-hub (#104)
Summary
Implements Spec 085 “Tenant Operate Hub” semantics so central Monitoring pages are context-aware when entered from a tenant, without changing canonical URLs or implicitly mutating tenant selection. Also fixes a UX leak where tenant-scoped Inventory/Policies/Backups surfaces could appear in Admin navigation / be reachable without a selected tenant.

Why

Reduce “where am I / lost tenant context” confusion when operators jump between tenant work and central Monitoring.
Preserve deny-as-not-found security semantics and avoid tenant identity leaks.
Keep tenant-scoped data surfaces strictly tenant-scoped (not workspace-scoped).
What changed

Context-aware Monitoring:
/admin/operations shows scope label + CTAs (“Back to <tenant>”, “Show all tenants”) when tenant context is active and entitled.
/admin/operations/{run} shows deterministic back affordances + optional escape hatch (“Show all operations”) when tenant context is active and entitled.
Canonical Monitoring GET routes do not mutate tenant context.
Stale tenant context (not entitled) falls back to workspace scope without leaking tenant identity.
Tenant navigation IA:
Tenant panel sidebar provides “Monitoring” shortcuts (Runs/Alerts/Audit Log) into the central Monitoring surfaces.
Tenant-scoped Admin surfaces guard:
Inventory/Policies/Policy Versions/Backup Sets no longer show up tenantless; direct access redirects to /admin/choose-tenant when no tenant is selected.
Tests

Added/updated Pest coverage for:
Spec 085 header affordances + stale-context behavior
deny-as-not-found regressions for non-members/non-entitled users
“DB-only render” (no outbound calls) for Monitoring pages
tenant-scoped admin surfaces redirect when no tenant selected
Compatibility / Constraints

Filament v5 + Livewire v4 compliant (no v3 APIs).
Panel providers remain registered via providers.php (Laravel 11+/12).
No new assets; no changes to filament:assets deployment requirements.
No global search changes.
Manual verification

From a tenant, click “Monitoring → Runs” and confirm:
Scope label shows tenant scope
“Show all tenants” clears tenant context and returns to workspace scope
Open a run detail and confirm “Back to <tenant>” behavior + “Show all operations”.

Co-authored-by: Ahmed Darrazi <ahmeddarrazi@ebc83aaa-d947-4a08-b88e-bd72ac9645f7.fritz.box>
Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box>
Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.fritz.box>
Reviewed-on: #104
2026-02-11 21:01:23 +00:00
..
078 Spec 078: Operations tenantless canonical detail (#95) 2026-02-07 09:07:26 +00:00
Audit Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
Auth feat: unified managed tenant onboarding wizard (#88) 2026-02-03 17:30:15 +00:00
BackupScheduling 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
BackupSets 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
Badges Spec 075: Verification Checklist Framework V1.5 (fingerprint + acknowledgements) (#93) 2026-02-05 21:44:19 +00:00
Console 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
Database fix: Harden SyncPoliciesJob supported types handling (#75) 2026-01-26 19:23:40 +00:00
DirectoryGroups 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
Drift 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
Filament 085-tenant-operate-hub (#104) 2026-02-11 21:01:23 +00:00
Graph Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
Guards feat: action-surface contract inspect affordance + clickable rows (#100) 2026-02-08 20:31:36 +00:00
Inventory 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
Jobs 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
ManagedTenants 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
Monitoring 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
Notifications 073-unified-managed-tenant-onboarding-wizard (#90) 2026-02-04 23:30:55 +00:00
Onboarding feat(verification): unify verification surfaces (Spec 084) (#102) 2026-02-09 11:28:09 +00:00
Operations 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
OpsUx 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
ProviderConnections 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
Rbac 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
RequiredPermissions Spec 083: Required permissions hardening (canonical /admin/tenants, DB-only, 404 semantics) (#101) 2026-02-08 23:13:25 +00:00
Scheduling 054-unify-runs-suitewide (#63) 2026-01-17 22:25:00 +00:00
Spec085 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
TenantRBAC 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
Verification feat(verification): unify verification surfaces (Spec 084) (#102) 2026-02-09 11:28:09 +00:00
Workspaces Spec 077: Workspace Global Mode + context bar redundancy cleanup (#94) 2026-02-06 22:14:53 +00:00
AdminConsentCallbackTest.php Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
AdminNewRedirectTest.php feat: unified managed tenant onboarding wizard (#88) 2026-02-03 17:30:15 +00:00
BackupItemReaddTest.php feat/004-assignments-scope-tags (#4) 2025-12-23 21:49:58 +00:00
BackupServiceVersionReuseTest.php feat: always capture policy when adding to backup (#22) 2026-01-02 14:33:29 +00:00
BackupWithAssignmentsConsistencyTest.php feat/004-assignments-scope-tags (#4) 2025-12-23 21:49:58 +00:00
BulkDeleteBackupSetsTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkDeleteMixedStatusTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkDeletePoliciesAsyncTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkDeletePoliciesTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkDeleteRestoreRunsTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkExportFailuresTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkExportToBackupTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkForceDeleteBackupSetsTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkForceDeletePolicyVersionsTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkForceDeleteRestoreRunsTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkProgressNotificationTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkPruneSkipReasonsTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkPruneVersionsTest.php feat/031-tenant-portfolio-context-switch (#32) 2026-01-04 21:28:08 +00:00
BulkRestoreBackupSetsTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkRestorePolicyVersionsTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkRestoreRestoreRunsTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
BulkSyncPoliciesTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
BulkTypeToConfirmTest.php feat/031-tenant-portfolio-context-switch (#32) 2026-01-04 21:28:08 +00:00
BulkUnignorePoliciesTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
DatabaseSeederTest.php fix: Harden SyncPoliciesJob supported types handling (#75) 2026-01-26 19:23:40 +00:00
DependencyExtractionFeatureTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
DependencyQueryServiceTest.php feat/042-inventory-dependencies-graph (#49) 2026-01-10 00:20:14 +00:00
DependencyTenantIsolationTest.php feat/042-inventory-dependencies-graph (#49) 2026-01-10 00:20:14 +00:00
DeviceComplianceScriptPolicyTypeTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
EndpointSecurityIntentRestoreSanitizationTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
EndpointSecurityPolicyRestore023Test.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
ExampleTest.php Initial commit from Specify template 2025-12-10 22:27:21 +01:00
ExecuteRestoreRunJobTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
FoundationBackupTest.php feat(006): foundations + assignment mapping and preview-only restore guard (#7) 2025-12-26 23:44:31 +00:00
InventoryItemDependenciesTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
ManagedTenantOnboardingWizardTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
MonitoringOperationsTest.php Spec 077: Workspace Global Mode + context bar redundancy cleanup (#94) 2026-02-06 22:14:53 +00:00
OperationRunServiceStaleQueuedRunTest.php fix: Harden SyncPoliciesJob supported types handling (#75) 2026-01-26 19:23:40 +00:00
OperationRunServiceTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
PolicyCaptureSnapshotIdempotencyTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
PolicyCaptureSnapshotQueuedTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
PolicyGeneralViewTest.php feat/017-policy-types-mam-endpoint-security-baselines (#23) 2026-01-03 02:06:35 +00:00
PolicySettingsStandardViewTest.php feat/017-policy-types-mam-endpoint-security-baselines (#23) 2026-01-03 02:06:35 +00:00
PolicySyncEnrollmentConfigurationTypeCollisionTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
PolicySyncServiceReportTest.php Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
PolicySyncServiceTest.php Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
PolicySyncStartSurfaceTest.php 065-tenant-rbac-v1 (#79) 2026-01-28 21:09:47 +00:00
PolicyTypes017Test.php feat: endpoint security restore execution (023) (#25) 2026-01-03 22:44:08 +00:00
PolicyVersionViewAssignmentsTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
ReclassifyEnrollmentConfigurationsCommandTest.php 014-enrollment-autopilot (#20) 2026-01-02 11:59:21 +00:00
RestoreAdapterTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
RestoreAssignmentApplicationTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
RestoreAuditLoggingTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
RestoreGraphErrorMetadataTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
RestoreGroupMappingTest.php 051-entra-group-directory-cache (#57) 2026-01-11 23:24:12 +00:00
RestorePreviewDiffWizardTest.php feat/049-backup-restore-job-orchestration (#56) 2026-01-11 15:59:06 +00:00
RestoreRiskChecksWizardTest.php feat/049-backup-restore-job-orchestration (#56) 2026-01-11 15:59:06 +00:00
RestoreRunArchiveGuardTest.php feat/031-tenant-portfolio-context-switch (#32) 2026-01-04 21:28:08 +00:00
RestoreRunIdempotencyTest.php feat/049-backup-restore-job-orchestration (#56) 2026-01-11 15:59:06 +00:00
RestoreRunRerunTest.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
RestoreRunWizardExecuteTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
RestoreRunWizardMetadataTest.php feat/031-tenant-portfolio-context-switch (#32) 2026-01-04 21:28:08 +00:00
RestoreScopeTagMappingTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
RestoreUnknownPolicyTypeSafetyTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
RunAuthorizationTenantIsolationTest.php feat(verification): unify verification surfaces (Spec 084) (#102) 2026-02-09 11:28:09 +00:00
RunStartAuthorizationTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
SettingsCatalogDefinitionResolverTest.php dev-merges/c709b36 (#3) 2025-12-21 23:15:12 +00:00
Spec080WorkspaceManagedTenantAdminMigrationTest.php feat(spec-080): workspace-managed tenant administration migration (#97) 2026-02-07 19:45:13 +00:00
SyncPoliciesJobDispatchTest.php fix: Harden SyncPoliciesJob supported types handling (#75) 2026-01-26 19:23:40 +00:00
SyncPoliciesJobGraphDisabledTest.php fix: Harden SyncPoliciesJob supported types handling (#75) 2026-01-26 19:23:40 +00:00
SyncPoliciesJobSupportedTypesTest.php fix: Harden SyncPoliciesJob supported types handling (#75) 2026-01-26 19:23:40 +00:00
TermsAndConditionsPolicyTypeTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
TrackOperationRunMiddlewareTest.php 054-unify-runs-suitewide (#63) 2026-01-17 22:25:00 +00:00
VersionCaptureMetadataOnlyTest.php feat/017-policy-types-mam-endpoint-security-baselines (#23) 2026-01-03 02:06:35 +00:00
VersionCaptureWithAssignmentsTest.php feat/027-enrollment-config-subtypes (#31) 2026-01-04 13:25:15 +00:00