Repository navigation
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
| // 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) |
There was a problem hiding this comment.
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.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| // 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) |
There was a problem hiding this comment.
🟡 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
Reviewer brief
updateBlock, and Roam then rejectedupdatePagewith "is a block, not a page".main.sourceBlockUidis set. The dialog closing and the card title updating confirm the save.Verification
:block/string, and leave the card title equal to the page title. Onmainall four fail with the error above.pnpm ci:validatepassed 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
$scope-checkagainst ENG-2463 and the final diff.Done When: ENG-2463 has no Done When, so the scope can't be checked against it.Standards check
$dg-pr-adherence-checkagainst the final diff and PR metadata.Local delegated full review