Skip to content

Conversation

@mdroidian
Copy link
Collaborator

@mdroidian mdroidian commented Oct 2, 2025

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Oct 2, 2025

Walkthrough

Version updated to 1.36.1. In tldraw’s Roam integration, persistence switched from updating a block to updating a page, changing the API method and payload structure to write page-level props.

Changes

Cohort / File(s) Summary of Changes
Version bump
package.json
Incremented version from 1.36.0 to 1.36.1.
Roam API persistence change
src/components/tldraw/useRoamStore.ts
Replaced window.roamAlphaAPI.updateBlock({ block: { ... }}) with window.roamAlphaAPI.updatePage({ page: { uid, props: { ... }}}), updating payload shape from block-level to page-level properties.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant T as Tldraw UI
  participant S as useRoamStore
  participant R as Roam API

  U->>T: Edit canvas/state
  T->>S: Request persist
  S->>R: updatePage({ page: { uid, props } })
  R-->>S: Ack/Result
  S-->>T: Persisted status
Loading
sequenceDiagram
  autonumber
  rect rgb(245,245,255)
    note over S,R: Old (before)
    S->>R: updateBlock({ block: { uid, props } })
  end
  rect rgb(245,255,245)
    note over S,R: New (after)
    S->>R: updatePage({ page: { uid, props } })
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paws, a tidy fix,
A version hop—just one small tick.
From block to page I stash my notes,
In props where canvas truth now floats.
Carrot commits, concise and sage—
Hippity-hop, we save the page. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit's high-level summary is enabled.
Title Check ✅ Passed The title clearly summarizes the main change of the PR, stating that useRoamStore will use updatePage instead of updateBlock, matching the code modifications.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-tldraw-roam-api-block-props

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 241ab3d and ac26ddf.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json (1 hunks)
  • src/components/tldraw/useRoamStore.ts (1 hunks)
🔇 Additional comments (1)
package.json (1)

3-3: LGTM!

The patch version bump is appropriate for this API usage change.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mdroidian mdroidian merged commit 4cec04c into main Oct 2, 2025
2 checks passed
@mdroidian mdroidian deleted the update-tldraw-roam-api-block-props branch October 2, 2025 21:17
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.

2 participants