Repository navigation
Commit a83d2b4
fix(showcase): hide Mark Done once the task is complete (#2183)
Mark Done lingered on already-done records and re-firing it was a silent no-op
("why is it still here?"). Gate the action with `visible: '!record.done'` — the
`done` boolean this action sets, so the button disappears after a successful
click and stays hidden on finished tasks.
The `record.`-prefix is required: the ActionEngine filters a record-header
action's `visible` against `{ record, recordId, objectName, user }` with
fail-closed semantics (`throwOnError: true` → catch → hide). A bare `done` /
`status` predicate is not at the top level of that context, so it throws and
the action is hidden on EVERY record (the trap an earlier attempt hit). A single
operand is also deliberate — the renderer wraps `visible` as a `${...}` template
whose evaluator throws on compound `&&` / `||`.
Verified in-browser against a current console: shows on active tasks, hides on
done tasks; clicking it flips `done` and the button is gone on reload.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent ce13bb8 commit a83d2b4
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
| |||
0 commit comments