TenantAtlas/specs/078-operations-tenantless-canonical/quickstart.md
ahmido d56ba85755 Spec 078: Operations tenantless canonical detail (#95)
Implements Spec 078 operations tenantless canonical migration.

Highlights:
- Canonical run detail at `/admin/operations/{run}` renders with standard Filament chrome + sidebar and reuses `OperationRunResource::infolist()` (schema-based, Filament v5).
- Legacy tenant-scoped resource pages removed; legacy URLs return 404 as required.
- Added full spec test pack under `tests/Feature/078/` and updated existing tests.
- Added safe refresh/header actions wiring and KPI header guard when tenant context is null.

Validation:
- `vendor/bin/sail artisan test --compact tests/Feature/078/` (pass)
- `vendor/bin/sail bin pint --dirty` (pass)

Notes:
- Livewire v4+ compliant (Filament v5).
- Panel providers remain registered in `bootstrap/providers.php` (Laravel 11+ standard).

Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box>
Reviewed-on: #95
2026-02-07 09:07:26 +00:00

2.6 KiB

Quickstart: Operations Tenantless Canonical Migration

Feature: 078-operations-tenantless-canonical
Branch: 078-operations-tenantless-canonical


Prerequisites

  • Laravel Sail running (vendor/bin/sail up -d)
  • Database migrated (vendor/bin/sail artisan migrate)
  • At least one workspace with a user member
  • At least one OperationRun record (with and without tenant_id)

Verification Steps

1. Canonical detail renders

# Visit as authenticated workspace member
# URL: /admin/operations/{run_id}
# Expected: Full infolist renders (summary, target scope, verification report, counts, context JSON)

2. Auto-generated tenant routes are gone

vendor/bin/sail artisan route:list --name=filament.admin.resources.operations
# Expected: No routes listed (empty output)

3. Canonical list still works

# Visit: /admin/operations
# Expected: Workspace-scoped table with status tabs, filters

4. Run tests

# Run the focused test pack for this spec:
vendor/bin/sail artisan test --compact \
  tests/Feature/078/ \
  tests/Feature/Operations/TenantlessOperationRunViewerTest.php \
  tests/Feature/Monitoring/OperationsCanonicalUrlsTest.php \
  tests/Feature/Monitoring/OperationsTenantScopeTest.php \
  tests/Feature/Verification/VerificationAuthorizationTest.php \
  tests/Feature/OpsUx/FailureSanitizationTest.php \
  tests/Feature/OpsUx/CanonicalViewRunLinksTest.php \
  tests/Feature/Verification/VerificationReportViewerDbOnlyTest.php \
  tests/Feature/Verification/VerificationReportRedactionTest.php \
  tests/Feature/Verification/VerificationReportMissingOrMalformedTest.php

# Expected: All pass

5. Pint formatting

vendor/bin/sail bin pint --dirty

Key Files to Inspect

File What to check
app/Filament/Resources/OperationRunResource.php getPages() returns []
app/Filament/Pages/Operations/TenantlessOperationRunViewer.php Uses schema-based infolist, has related links header
app/Filament/Widgets/Operations/OperationsKpiHeader.php Returns empty stats when no tenant context
app/Filament/Pages/Monitoring/Operations.php Unchanged — still reuses OperationRunResource::table()

What Was Deleted

File Why
app/Filament/Resources/OperationRunResource/Pages/ViewOperationRun.php Replaced by TenantlessOperationRunViewer
app/Filament/Resources/OperationRunResource/Pages/ListOperationRuns.php Replaced by Operations.php
app/Livewire/Monitoring/OperationsDetail.php Dead code
resources/views/livewire/monitoring/operations-detail.blade.php Dead code