- Replace view-only row buttons with clickable rows (recordUrl)\n- Update action-surface contract slot to InspectAffordance + validator support\n- Add golden guard tests + contract doc\n- Update SpecKit constitution/templates to include inspection affordance rule
1.1 KiB
1.1 KiB
Action surface contract
This project enforces a small “action surface contract” for Filament Resources / Pages / RelationManagers to keep table UIs consistent, quiet, and safe.
Inspect affordance (required)
Any list-style surface that exposes records must provide an inspect affordance so an admin can open a record.
Accepted implementations:
- Clickable rows (preferred): set
recordUrl()for the table. - View action: a
ViewActionin the row actions. - Primary link column: a column that is clearly the primary affordance to open the record.
Rule: no lone “View” button
Avoid rendering a table that only has a single View row action. This creates visual noise and adds an unnecessary Actions column.
Preferred approach:
- Make the row clickable via
recordUrl()and setactions([])so no Actions column is rendered.
RBAC / safety
- If the current user cannot inspect a record,
recordUrl()must returnnullfor that record. - UI visibility is not authorization; always enforce permissions at the policy / resource level.