Repository navigation
Description
Split out of #10267, which fixed the template's locale and wrapped it in defineEmailTemplateDefinition. That card scoped the wiring question as separate and left it to the executing seat; this is that seat filing it rather than deciding it, because the wiring is not an addition.
The state today
examples/app-showcase/src/system/emails/index.ts declares showcase_task_done_email and objectstack.config.ts passes it through emailTemplates:, so it is materialized into sys_email_template at boot. Nothing sends it — showcase_task_completed ("Notify on Task Completed") is the flow its docblock names, and that flow's notify node uses the inline content path:
{
id: 'notify',
type: 'notify',
config: {
recipients: '{record.assignee}',
title: '✅ Task done: {record.title}',
message: '{summary}',
// …
},
}Why this is a decision, not a mechanical edit
NotifyConfigSchema's superRefine (packages/spec/src/automation/io-node-config.zod.ts) refuses template combined with inline title/message outright:
templatecannot be combined with inlinetitle/message— pick ONE content path
So referencing the template there is a substitution: title and message have to go. And message: '{summary}' is the only consumer of the summarize script node's outputVariable — which is precisely what that flow exists to demonstrate. Its own docblock says so:
A flow function is PURE: it takes
inputs, RETURNS a value, and a later declarative node uses or persists it (#4396).
Wiring the template therefore trades a live demonstration of the script-node contract for a demonstration of the template path. Both are worth showing; the showcase currently shows one of them and declares the other without showing it.
Two further costs worth pricing before anyone picks an option:
- The template's declared variables are
titleandproject. The flow record carriesprojectas a scalar id, and the flow's own comment notes that reaching through it needsexpand: ['project']on the start node — so a faithfultemplateDatais a change to the start node too, not just the notify node. - Delivery through the template path needs
@objectstack/plugin-emailregistered; without it the email channel returnsTEMPLATE_UNSUPPORTED. The showcase does not install it as a runtime plugin (app-showcase's email template declareslocale: 'en', which noen-USsend can resolve — and it bypassesdefineEmailTemplateDefinition#10267 added it only as a test-time devDependency).
Options
- Add a second flow that demonstrates the
template+templateDatapath, leavingshowcase_task_completedas the script-node specimen. Costs one more flow in the corpus; keeps both demonstrations. - Convert the existing notify node to the template path and move the summary text into the template bundle. Loses the script-node → later-node demonstration unless another node is added to consume
{summary}. - Keep the template unwired and say so in its docblock (what app-showcase's email template declares
locale: 'en', which noen-USsend can resolve — and it bypassesdefineEmailTemplateDefinition#10267 did as an interim), on the grounds that a materialized template is itself the thing being demonstrated — it is reachable fromservices.email.sendTemplateand from Studio, flow or no flow.
No preference recorded here; #10267's surface was the declaration only. Filed unassigned.
Activity
os-zhuang commentedon Aug 21, 2026
Triage label hygiene: dropped the stale
findinglabel — the card is already graded (pm:queue+domain:services), and a graded card leaves the finding pool. No state change otherwise.Generated by Claude Code
os-zhuang commentedon Aug 24, 2026
Maintainer ruling recorded — Option 3, with Option 1 bookmarked; closing
Provenance: maintainer, 2026-08-24, live PM chat, verbatim: 「接受你的建议。」 on the split-axes analysis presented in the batch review (①④ → 3, ③ → 1, ② neutral; ruled 3-now with 1 recorded).
Ruled:
showcase_task_done_emailstays unwired. The materialized-but-unsent template is itself the demonstrated thing (reachable viaservices.email.sendTemplateand Studio), and its docblock already states the situation (#10267's interim wording becomes the permanent answer).showcase_task_completedkeeps its inline notify node — the script-node → later-node contract demonstration it exists for.Bookmark (recorded, not scheduled): the next deliberate showcase investment round should pick up Option 1 — a second flow demonstrating the
template+templateDatapath (withexpand: ['project']on the start node and@objectstack/plugin-emailas a runtime plugin) — because the showcase is agent-facing teaching corpus and currently teaches only one of the two content paths. That rider rides the future showcase card, not its own card.Closing not planned (the wiring will not be done; the current state is the ruled state).
Generated by Claude Code
os-zhuang commentedon Aug 24, 2026
Simplification per maintainer (2026-08-24, live PM chat, verbatim: 「10394 简化处理」), amending the ruling record above: the Option-1 bookmark is dropped. Final disposition is simply — template stays unwired, the #10267 docblock is the answer, card closed not-planned. If a template-path demonstration is ever wanted in the showcase, it gets judged fresh at that time; no standing rider, nothing to track.
Generated by Claude Code