TenantAtlas/specs/103-ia-scope-filter-semantics/data-model.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.3 KiB

Data Model: 103 — IA Semantics: Scope vs Filter vs Targeting

Status: No schema changes required.

Summary

This spec is a copy/label/bugfix change only. No new tables, columns, indexes, or migrations.

Existing Entities (unchanged)

AlertRule

Field Type Notes
tenant_scope_mode string Values: all, allowlist. DB values unchanged.
tenant_allowlist json Array of tenant UUIDs. Structure unchanged.

Constants: AlertRule::TENANT_SCOPE_ALL, AlertRule::TENANT_SCOPE_ALLOWLIST — unchanged.

Tenant

Referenced by OperateHubShell::activeEntitledTenant() for indicator display. No changes.

UI-Only Changes (no persistence impact)

Current Label New Label Location
Scope: Tenant — {name} Filtered by tenant: {name} OperateHubShell::scopeLabel()
Scope: Workspace — all tenants All tenants OperateHubShell::scopeLabel()
Tenant scope mode → "All tenants" "All tenants" AlertRuleResource::form() option
Tenant scope mode → "Allowlist" "Selected tenants" AlertRuleResource::form() option
"Tenant allowlist" label "Selected tenants" AlertRuleResource::form() field label

State Transitions

N/A — no state machine changes.