Skip to content

app-showcase declares showcase_task_done_email but no flow references it — wiring it means giving up the script-node demonstration #10394

Closed as not planned

Description

@os-warren

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:

template cannot be combined with inline title/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:

Options

  1. Add a second flow that demonstrates the template + templateData path, leaving showcase_task_completed as the script-node specimen. Costs one more flow in the corpus; keeps both demonstrations.
  2. 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}.
  3. Keep the template unwired and say so in its docblock (what app-showcase's email template declares locale: 'en', which no en-US send can resolve — and it bypasses defineEmailTemplateDefinition #10267 did as an interim), on the grounds that a materialized template is itself the thing being demonstrated — it is reachable from services.email.sendTemplate and from Studio, flow or no flow.

No preference recorded here; #10267's surface was the declaration only. Filed unassigned.

Activity

  1. added
    domain:services
    finding
    pm:queue
    on Aug 20, 2026
  2. removed
    finding
    on Aug 21, 2026
  3. os-zhuang commented on Aug 21, 2026

    @os-zhuang
    Contributor

    Triage label hygiene: dropped the stale finding label — 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

  4. removed
    needs-user-decision
    on Aug 24, 2026
  5. os-zhuang commented on Aug 24, 2026

    @os-zhuang
    Contributor

    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_email stays unwired. The materialized-but-unsent template is itself the demonstrated thing (reachable via services.email.sendTemplate and Studio), and its docblock already states the situation (#10267's interim wording becomes the permanent answer). showcase_task_completed keeps 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 + templateData path (with expand: ['project'] on the start node and @objectstack/plugin-email as 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

  6. os-zhuang commented on Aug 24, 2026

    @os-zhuang
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:services

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions