Skip to content

ENG-2463 unable to update title of node created from tldraw canvas shape - #1629

Open
sid597 wants to merge 2 commits into
mainfrom
eng-2463-unable-to-update-title-of-node-created-from-tldraw
Open

sid597 wants to merge 2 commits into
mainfrom
eng-2463-unable-to-update-title-of-node-created-from-tldraw

Conversation

@sid597

@sid597 sid597 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Reviewer brief

  • Result: renaming a page node from the canvas edit dialog renames the page again. Before, the dialog wrote a block string onto the page with updateBlock, and Roam then rejected updatePage with "is a block, not a page".
  • It isn't specific to converted shapes. A node created with the canvas tool failed the same way on main.
  • Risk or follow-up:
    • Pages that already went through the old path keep the block string. They still can't be renamed, on the canvas or in Roam's own title editor, and no API call I tried clears it. The dev graph has 14. ENG-2495 covers repairing them.
    • Page renames no longer show the "Node updated successfully" toast. The dialog only shows it when sourceBlockUid is set. The dialog closing and the card title updating confirm the save.

Verification

  • Live in Roam, dev build of this branch: renames of a converted single-line note, a converted two-line note, a converted shape inside a group, and a tool-created node all rename the page, write no :block/string, and leave the card title equal to the page title. On main all four fail with the error above.
  • pnpm ci:validate passed at bc3d7cd. The Roam unit suite (716 tests), eslint, prettier and tsc pass at the current head.

Loom video

eng-2463-full-labeled.mp4

Scope check

  • Ran $scope-check against ENG-2463 and the final diff.
  • Scope beyond Done When: ENG-2463 has no Done When, so the scope can't be checked against it.

Standards check

  • Ran $dg-pr-adherence-check against the final diff and PR metadata.

Local delegated full review

  • Ran a comprehensive review of the entire final diff in a subagent with a fresh context.

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.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
discourse-graph Skipped Skipped Nov 16, 2026 5:46am UTC

Request Review

@linear-code

linear-code Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

ENG-2463

ENG-2495

@supabase

supabase Bot commented Nov 16, 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 ↗︎.

// Block nodes only: updateBlock on a page uid stores a block string on the page, and Roam then refuses to rename it
sourceBlockUid:
!isCreating && isLiveBlock(shape.props.uid)
!isCreating && !isPageUid(shape.props.uid)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Edit mode passed every live uid as sourceBlockUid, and isLiveBlock is true for pages too. ModifyNodeDialog then called updateBlock on the page uid before onSuccess called updatePage. Roam keeps that :block/string on the page and rejects every later updatePage with "is a block, not a page". Its own title editor stops saving too.

Page nodes now get no sourceBlockUid, so the only write is the updatePage in onSuccess. Block nodes keep the old path. This is the only mode: "edit" caller of renderModifyNodeDialog, so the fix lives here rather than in ModifyNodeDialog.

@sid597
sid597 marked this pull request as ready for review November 16, 2026 07:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T07:06:47.712263Z eda98a9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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 found 1 potential issue.

Devin Review

// Block nodes only: updateBlock on a page uid stores a block string on the page, and Roam then refuses to rename it
sourceBlockUid:
!isCreating && isLiveBlock(shape.props.uid)
!isCreating && !isPageUid(shape.props.uid)

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.

🟡 Canvas page renames lack regression coverage

When sourceBlockUid excludes pages, no unit test checks that page edits avoid block writes while block edits still work. The canvas rename fix remains unguarded against regression.

Learn more

The canvas node edit flow passes a source block UID to the dialog only for block nodes. The dialog writes that UID with onSubmit, while the canvas success callback handles page renames. This change fixes the page case but does not add a test for either side of the new branch. Repository contribution rules require tests that validate fixes.

Example: Editing page P must call the page rename API without updating block P; editing block B must still update block B.

Recommended fix: Add a focused test for the canvas dialog props or extract the page-versus-block source UID decision into a testable helper. Cover both page and block UIDs, including the call that persists the page title.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@sid597
sid597 requested a review from mdroidian November 16, 2026 07:43

This branch was previously deployed

1 inactive deployment
Preview — eda98a96 Deployed Nov 16, 2026 by vercel[bot]
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