TenantAtlas/specs/103-ia-scope-filter-semantics/quickstart.md
Ahmed Darrazi 8b13d6f55f feat: refine tenant scope semantics
- Update OperateHub scope label copy (All tenants / Filtered by tenant)

- Fix Alerts KPI tenant resolution via activeEntitledTenant()

- Remove tenant indicator from manage lists

- Improve AlertRule form labels + sections

- UI polish: resource sections + tenant view widget layout + RBAC progressive disclosure

- Add/adjust Pest coverage
2026-02-21 01:00:31 +01:00

1.6 KiB

Quickstart: 103 — IA Semantics: Scope vs Filter vs Targeting

Prerequisites

  • Sail running (vendor/bin/sail up -d)
  • Database migrated (vendor/bin/sail artisan migrate)
  • At least one workspace with 2+ tenants seeded

Files to Touch

Core (must change)

  1. app/Support/OperateHub/OperateHubShell.php — update scopeLabel() copy
  2. app/Filament/Widgets/Alerts/AlertsKpiHeader.php — fix deliveriesQueryForViewer() bug
  3. app/Filament/Resources/AlertRuleResource.php — relabel form fields, add Sections + helper texts
  4. app/Filament/Resources/AlertRuleResource/Pages/ListAlertRules.php — remove OperateHubShell header spread
  5. app/Filament/Resources/AlertDestinationResource/Pages/ListAlertDestinations.php — remove OperateHubShell header spread

Tests (must update/add)

  1. tests/Feature/OpsUx/OperateHubShellTest.php — update assertions for new copy
  2. New test: AlertsKpiHeader consistency (deliveries vs banner)
  3. New test: Manage pages have no tenant indicator
  4. Update: AlertRuleCrud test for new form labels (if label-dependent assertions exist)

Verification

# Run targeted tests
vendor/bin/sail artisan test --compact --filter=OperateHubShell
vendor/bin/sail artisan test --compact --filter=AlertsKpiHeader
vendor/bin/sail artisan test --compact --filter=AlertRuleCrud

# Run full suite
vendor/bin/sail artisan test --compact

Risk Assessment

  • Low risk: Copy changes are purely presentational, no persistence or business-logic alteration.
  • Medium risk: The AlertsKpiHeader bugfix changes query filtering — existing deliveries tests should catch regressions.
  • No migration: Zero schema changes.