TenantAtlas/specs/082-action-surface-contract/quickstart.md
ahmido a770b32e87 feat: action-surface contract inspect affordance + clickable rows (#100)
Implements Spec 082 updates to the Filament Action Surface Contract:

- New required list/table slot: InspectAffordance (clickable row via recordUrl preferred; also supports View action or primary link column)
- Retrofit view-only tables to remove lone View row action buttons and use clickable rows
- Update validator + guard tests, add golden regression assertions
- Add docs: docs/ui/action-surface-contract.md

Tests (local via Sail):
- vendor/bin/sail artisan test --compact tests/Feature/Guards/ActionSurfaceContractTest.php
- vendor/bin/sail artisan test --compact tests/Feature/Guards/ActionSurfaceValidatorTest.php
- vendor/bin/sail artisan test --compact tests/Feature/Rbac/ActionSurfaceRbacSemanticsTest.php
- vendor/bin/sail artisan test --compact tests/Feature/Filament/EntraGroupSyncRunResourceTest.php

Notes:
- Filament v5 / Livewire v4 compatible.
- No destructive-action behavior changed in this PR.

Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box>
Reviewed-on: #100
2026-02-08 20:31:36 +00:00

1.1 KiB

Quickstart — Action Surface Contract

This quickstart describes how developers will satisfy the Spec 082 contract once the validator is implemented.

Add a declaration to a Filament component

For an in-scope class (Resource, Page, RelationManager), add a static declaration method.

Example (shape only; exact namespaces/classes defined in implementation):

  • Add public static function actionSurfaceDeclaration(): ActionSurfaceDeclaration
  • Select a profile
  • Declare required slots as satisfied
  • Keep defaults aligned (group label More)

Exempt a slot

If a required slot is intentionally not present:

  • Mark the slot as Exempt
  • Add an exemption entry with a non-empty reason
  • Optionally provide a trackingRef

Run locally

  • Run the contract guard test:
    • vendor/bin/sail artisan test --compact --filter=ActionSurfaceContract

Interpreting failures

Failures will point to:

  • the class missing a declaration
  • which required slots are missing
  • which exemptions are invalid (missing/empty reason)

The failure output is intended to be actionable, similar to existing guard tests in tests/Feature/Guards/*.