Skip to content

Commit 4a428c1

Browse files
committed
test(showcase): the reopen action renders in the task list's row menu only
The Task Detail page is kind 'full' and draws no record_header bar, so that declared location was inert; the checklist item now drives the row menu. Claude-Session: https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv Co-authored-by: Claude <noreply@anthropic.com>
1 parent 806e11f commit 4a428c1

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎docs/qa/platform-checklist/areas/records-forms.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4309,7 +4309,7 @@
43094309
"fixtures": {
43104310
"app": "showcase",
43114311
"requires": [
4312-
"the refusal pair on showcase_task: the hook showcase_guard_task_reopen (examples/app-showcase/src/data/hooks/index.ts — beforeUpdate, condition previous.done == true && record.done != true, sandboxed body throws new Error(TASK_REOPEN_REFUSAL), onError:'abort') and the script action showcase_reopen_task (examples/app-showcase/src/ui/actions/index.ts — body writes { id, done: false } through ctx.api, execution perRecord, visible 'has(record.done) && record.done == true', locations list_item + record_header)",
4312+
"the refusal pair on showcase_task: the hook showcase_guard_task_reopen (examples/app-showcase/src/data/hooks/index.ts — beforeUpdate, condition previous.done == true && record.done != true, sandboxed body throws new Error(TASK_REOPEN_REFUSAL), onError:'abort') and the script action showcase_reopen_task (examples/app-showcase/src/ui/actions/index.ts — body writes { id, done: false } through ctx.api, execution perRecord, visible 'has(record.done) && record.done == true', locations list_item only — the Task Detail page is kind:'full' and renders no record_header bar)",
43134313
"the refusal sentence, verbatim: 'A finished task cannot be reopened. Create a follow-up task instead.' (TASK_REOPEN_REFUSAL in the hooks file — re-read it there before the run, never from this line)",
43144314
"a seeded FINISHED task (done: true) — 'Audit current IA' or 'App wireframes' (examples/app-showcase/src/data/seed/index.ts) — which is the only kind of record the action is offered on",
43154315
"a console built at this repo's .objectui-sha (pnpm objectui:build), served by the same boot the run drives",
@@ -4323,7 +4323,7 @@
43234323
"steps": [
43244324
"re-read examples/app-showcase/src/data/hooks/index.ts and copy TASK_REOPEN_REFUSAL verbatim — the oracle string; boot the showcase isolated (RUNNER canonical boot line: own port, own file DB, --seed-admin) with the console built at .objectui-sha; sign in through the form as the seeded admin",
43254325
"pick a finished task: GET /api/v1/data/showcase_task?where=... (or the list) and record its id, done, progress and modified timestamp — this is the before-image",
4326-
"open that task's record page in the console; screenshot after render settles and confirm the 'Reopen' action is offered (record header, or the row menu on the task list)",
4326+
"open the showcase_task list in the console (/_console/apps/showcase_app/showcase_task); screenshot after render settles; open the finished task's row menu ('Open menu' on its row) and confirm 'Reopen' is offered there",
43274327
"start capturing the network log and, before clicking, count toast nodes: document.querySelectorAll('[data-sonner-toast]:not([data-removed=\"true\"])').length — the baseline (expected 0)",
43284328
"click 'Reopen' with a ref-targeted click (RUNNER automation self-check); wait for the response of POST /api/v1/actions/showcase_task/showcase_reopen_task (the request URL may carry the record id as a further path segment) — record its status and its JSON body",
43294329
"within 2s of that response landing (the 4s auto-dismiss window), screenshot, then read every live toast node: count, data-type attribute, textContent — and compute count minus baseline",

‎examples/app-showcase/src/ui/actions/index.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ export const ReopenTaskAction = defineAction({
114114
execution: 'perRecord',
115115
// #8990 — `has()` guards the sparse `list_item` face, as on Mark Done.
116116
visible: 'has(record.done) && record.done == true',
117-
locations: ['list_item', 'record_header'],
117+
// The task list's row menu only. `record_header` would be inert here: the
118+
// Task Detail page (`showcase_task_detail`, `kind: 'full'`) owns the whole
119+
// record layout and renders no header action bar.
120+
locations: ['list_item'],
118121
refreshAfter: true,
119122
});
120123

0 commit comments

Comments
 (0)