Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions examples/app-showcase/src/actions/index.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,6 +41,14 @@ export const MarkDoneAction = defineAction({
capabilities: ['api.write'],
},
successMessage: 'Task marked done.',
// Hide once the task is complete. Gate on `record.done` (the boolean this
// action sets) so the button vanishes after a successful click and stays
// hidden on finished records (the "why is it still here?" report). NOTE the
// `record.`-prefix: the ActionEngine evaluates a record-header action's
// `visible` against `{ record, recordId, … }` with fail-closed semantics, so
// a bare `done`/`status` throws (field not at top level) and silently hides
// the action. Single operand, too — the template path throws on `&&`/`||`.
visible: '!record.done',
// `record_section` so the Task Detail page's `record:quick_actions` bar
// (which names this action) resolves it — the engine location-filters even
// explicitly-named actions, mirroring the platform's own sys-user pages.
Expand Down