TenantAtlas/specs/103-ia-scope-filter-semantics/quickstart.md
ahmido d32b2115a8 Spec 103: IA semantics (scope vs filter vs targeting) + UI polish (#126)
Implements Spec 103 (IA semantics: Scope vs Filter vs Targeting) across Monitoring + Manage.

Changes
- Monitoring tenant indicator copy: “All tenants” / “Filtered by tenant: …”
- Alerts KPI header resolves tenant via OperateHubShell::activeEntitledTenant() for consistency
- Manage list pages (Alert Rules / Destinations) no longer show tenant indicator
- AlertRule form uses targeting semantics + sections (Rule / Applies to / Delivery)
- Additional UI polish: resource sections, tenant view widgets layout, RBAC progressive disclosure (“Not configured” when empty)

Notes
- US6 (“Add current tenant” convenience button) intentionally skipped (optional P3).

Testing
- CI=1 vendor/bin/sail artisan test tests/Feature/TenantRBAC/ tests/Feature/Onboarding/OnboardingIdentifyTenantTest.php
- vendor/bin/sail bin pint --dirty --format agent

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #126
2026-02-21 00:28:15 +00: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.