You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the title field system (introduced in #821) to support schema-defined title templates. This enables custom entity types to have computed, searchable titles based on their properties.
Background
Issue #821 added an indexed title field for @mention search, computed as strip_markdown(content) for root nodes and task nodes. This works well for content-based nodes but doesn't support custom schemas where the title should be derived from structured properties.
For example, a "Customer" schema with fields first_name, last_name, and email should have a title like "John Doe (john@example.com)" computed from those properties.
Proposed Design
Schema Definition
Add an optional title_template field to schema properties:
Summary
Extend the title field system (introduced in #821) to support schema-defined title templates. This enables custom entity types to have computed, searchable titles based on their properties.
Background
Issue #821 added an indexed
titlefield for @mention search, computed asstrip_markdown(content)for root nodes and task nodes. This works well for content-based nodes but doesn't support custom schemas where the title should be derived from structured properties.For example, a "Customer" schema with fields
first_name,last_name, andemailshould have a title like "John Doe (john@example.com)" computed from those properties.Proposed Design
Schema Definition
Add an optional
title_templatefield to schema properties:{ "id": "customer", "node_type": "schema", "content": "Customer", "properties": { "fields": [ { "name": "first_name", "field_type": "string" }, { "name": "last_name", "field_type": "string" }, { "name": "email", "field_type": "string" } ], "title_template": "{first_name} {last_name} ({email})" } }Title Computation Logic
Priority order (first match wins):
title_template→ interpolate from propertiestasktype →strip_markdown(content)date/schema→strip_markdown(content)None(no title)Interpolation Rules
{field_name}→ replaced withproperties.field_namevalueWhen Title is Recomputed
Content Display for Templated Entities
For custom entities with a
title_template:Use Cases
"{first_name} {last_name} ({email})"→ "John Doe (john@example.com)""Invoice #{invoice_number} - {customer_name}"→ "Invoice Skill preflight: agent must detect whether the nodespace CLI is installed and the daemon is healthy #1234 - Acme Corp""{project_name} [{status}]"→ "Website Redesign [In Progress]"Implementation Notes
titlefield infrastructure from Add indexed title field for efficient keyword search in @mention system #821Acceptance Criteria
title_templatefield to SchemaField/SchemaNode model{field}replacement)Future Considerations (Out of Scope)
Related