Skip to content

ENG-1965: Rename Template-Block-props buffer block to Template#1202

Open
sid597 wants to merge 2 commits into
mainfrom
eng-1965-rename-template-block-props-in-discourse-node-template
Open

ENG-1965: Rename Template-Block-props buffer block to Template#1202
sid597 wants to merge 2 commits into
mainfrom
eng-1965-rename-template-block-props-in-discourse-node-template

Conversation

@sid597

@sid597 sid597 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Renames the ephemeral template buffer block users were seeing in the node settings Template tab (and on the raw node type page) from Template-Block-props to Template.

Safety note on the text-match lookups: getSubTree({parentUid: node.type, key: "Template"}) in NodeConfig.tsx / DiscourseNodeSuggestiveRules.tsx also matches this text, but getBasicTreeByParentUid returns children order-sorted and the legacy Template block is auto-created at order 0 before the buffer (order: last) can exist, so the lookup deterministically resolves to the legacy block. No read path matches the old Template-Block-props text, so no compatibility shim is needed.

Fixes ENG-1965

Not plain "Template" because getSubTree({parentUid: node.type, key:
"Template"}) in NodeConfig.tsx and DiscourseNodeSuggestiveRules.tsx
text-matches children of the same parent the buffer is created under,
and auto-creates on miss - an exact "Template" buffer would collide
with the legacy template block lookup.
@linear-code

linear-code Bot commented Jul 6, 2026

Copy link
Copy Markdown

ENG-1965

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
discourse-graph Skipped Skipped Jul 6, 2026 8:51am

Request Review

@supabase

supabase Bot commented Jul 6, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

The (editing) suffix guarded against getSubTree(key: "Template")
matching the buffer, but getBasicTreeByParentUid returns children
order-sorted and the legacy Template block is auto-created at order 0
before the buffer (order last) can exist, so the lookup always
resolves to the legacy block. Plain Template is what the ticket asks
for and reads correctly under the Template tab.
@sid597 sid597 changed the title ENG-1965: Rename Template-Block-props buffer block to Template (editing) ENG-1965: Rename Template-Block-props buffer block to Template Jul 6, 2026
@sid597

sid597 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

Revised in 18a5509: an interim commit used "Template (editing)" to sidestep the getSubTree text-match collision, but the collision turns out to be closed by ordering (the legacy Template block is always first-ordered; see updated PR description), so the buffer now uses plain "Template" per the ticket.

@sid597 sid597 requested a review from mdroidian July 6, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant