From bc3d7cdc0c163b17775905386b9a7142410ea309 Mon Sep 17 00:00:00 2001 From: sid597 Date: Mon, 16 Nov 2026 11:10:59 +0530 Subject: [PATCH 1/2] ENG-2463 Rename canvas page nodes without writing a block string Editing a page node's title on the canvas passed the page uid to the dialog as sourceBlockUid, so the dialog wrote a block string onto the page before renaming it. Roam then rejects updatePage on that page with "is a block, not a page", and its own title editor stops saving too. Pass sourceBlockUid only for block nodes; pages are renamed in onSuccess. --- apps/roam/src/components/canvas/DiscourseNodeUtil.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/roam/src/components/canvas/DiscourseNodeUtil.tsx b/apps/roam/src/components/canvas/DiscourseNodeUtil.tsx index e24e4f198b..ce0af9a196 100644 --- a/apps/roam/src/components/canvas/DiscourseNodeUtil.tsx +++ b/apps/roam/src/components/canvas/DiscourseNodeUtil.tsx @@ -580,9 +580,11 @@ export class DiscourseNodeUtil extends BaseBoxShapeUtil { mode: isCreating ? "create" : "edit", nodeType: getDiscourseNodeTypeId({ shape }), initialValue: { text: initialTitle, uid: shape.props.uid }, - // Only pass it when editing an existing node that has a valid Roam block UID + // Only pass it for block nodes: a block string written to a page uid makes Roam reject every later rename of that page sourceBlockUid: - !isCreating && isLiveBlock(shape.props.uid) + !isCreating && + !isPageUid(shape.props.uid) && + isLiveBlock(shape.props.uid) ? shape.props.uid : undefined, extensionAPI, From eda98a96099478a135ca03e35b6d8d3bd07aee72 Mon Sep 17 00:00:00 2001 From: sid597 Date: Mon, 16 Nov 2026 11:15:05 +0530 Subject: [PATCH 2/2] ENG-2463 Drop the isLiveBlock check that isCreating already covers --- apps/roam/src/components/canvas/DiscourseNodeUtil.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/roam/src/components/canvas/DiscourseNodeUtil.tsx b/apps/roam/src/components/canvas/DiscourseNodeUtil.tsx index ce0af9a196..f9a1cdcbf7 100644 --- a/apps/roam/src/components/canvas/DiscourseNodeUtil.tsx +++ b/apps/roam/src/components/canvas/DiscourseNodeUtil.tsx @@ -580,11 +580,9 @@ export class DiscourseNodeUtil extends BaseBoxShapeUtil { mode: isCreating ? "create" : "edit", nodeType: getDiscourseNodeTypeId({ shape }), initialValue: { text: initialTitle, uid: shape.props.uid }, - // Only pass it for block nodes: a block string written to a page uid makes Roam reject every later rename of that page + // Block nodes only: updateBlock on a page uid stores a block string on the page, and Roam then refuses to rename it sourceBlockUid: - !isCreating && - !isPageUid(shape.props.uid) && - isLiveBlock(shape.props.uid) + !isCreating && !isPageUid(shape.props.uid) ? shape.props.uid : undefined, extensionAPI,