Skip to content

ENG-2211 Fix Roam direct canvas load race - #1369

Merged
mdroidian merged 6 commits into
mainfrom
fix-roam-direct-canvas-load-race
Sep 7, 2026
Merged

ENG-2211 Fix Roam direct canvas load race#1369
mdroidian merged 6 commits into
mainfrom
fix-roam-direct-canvas-load-race

Conversation

@mdroidian

@mdroidian mdroidian commented Aug 31, 2026

Copy link
Copy Markdown
Member

Direct cloud canvas loads can crash when another extension changes the shared React hook during startup. DG now captures Roam's React exports once, keeping the initial useSyncExternalStore implementation stable across renders. Roam provides React 18.2.0, so DG no longer injects a React 17 fallback.

  • Use the published roamjs-components 0.90.0 release, which removes the loader's global hook assignment. Remove the temporary dependency patch.
  • Preserve Roam's React functions, internal dispatcher, and renderer.
  • Remove the deferred canvas renderer and retain normal production minification.
  • Test that the initial hook is retained and later global replacements do not affect DG.

Limitation: if another extension replaces the hook before DG initializes, DG captures that implementation. This change prevents later replacements; it does not recover an overwritten native hook.

Validation: pnpm install --frozen-lockfile, pnpm ci:validate (including 112 Roam tests), and the production build passed with published roamjs-components 0.90.0. Live verification on daeb12c passed with Breadcrumbs and SmartBlocks enabled: two direct cloud-canvas reloads, a direct local-canvas reload, and daily-note navigation into the cloud canvas. No console warnings or errors were recorded, and DG settings confirmed the loaded commit. Extension settings were preserved. GitHub format, lint, validate, and deployment checks passed.

Upstream: RoamJS/roamjs-components#67 (merged and published).

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
discourse-graph Ready Ready Preview Sep 6, 2026 11:35pm UTC

Request Review

@supabase

supabase Bot commented Aug 31, 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 ↗︎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T01:26:38.723818Z daeb12c Manual request
ℹ️ 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: No Issues Found

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

Devin Review

@mdroidian mdroidian changed the title Fix Roam direct canvas load race ENG-2211 Fix Roam direct canvas load race Aug 31, 2026
@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

ENG-2211

Comment thread apps/roam/scripts/compile.ts Outdated
@mdroidian

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: daeb12c05b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mdroidian
mdroidian merged commit a3bb406 into main Sep 7, 2026
10 checks passed
@mdroidian
mdroidian deleted the fix-roam-direct-canvas-load-race branch September 7, 2026 01:40
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