Skip to content

ENG-1893 Open node creation dialog for highlighted text - #1296

Open
mdroidian wants to merge 5 commits into
mainfrom
eng-1893-node-menu-trigger-with-highlighted-text-should-bring-up
Open

ENG-1893 Open node creation dialog for highlighted text#1296
mdroidian wants to merge 5 commits into
mainfrom
eng-1893-node-menu-trigger-with-highlighted-text-should-bring-up

Conversation

@mdroidian

@mdroidian mdroidian commented Aug 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Open the create-node dialog when highlighted text is selected from the Roam node menu
  • Prefill the dialog with the selection and replace the selected range with the created page reference
  • Add PostHog tracking and unit coverage for the new flow

Testing

  • Added a Vitest unit test covering dialog prefilling, range replacement, and insertion tracking

Open in Devin Review

@linear-code

linear-code Bot commented Aug 17, 2026

Copy link
Copy Markdown

ENG-1893

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
discourse-graph Skipped Skipped Aug 17, 2026 4:10am

Request Review

@supabase

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

@mdroidian mdroidian changed the title Open node creation dialog for highlighted text ENG-1893 Open node creation dialog for highlighted text Aug 17, 2026

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

View 1 additional finding in Devin Review.

Open in Devin Review

Comment thread apps/roam/src/utils/openCreateNodeDialogFromSelection.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b309a81231

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

Comment thread apps/roam/src/utils/openCreateNodeDialogFromSelection.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e037855ee

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

Comment thread apps/roam/src/components/DiscourseNodeMenu.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d302c2ab68

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

Comment on lines +29 to +30
initialValue: { text: selectedText, uid: "" },
extensionAPI,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the selected block as formatting context

When the selected node type's format contains a referenced-node placeholder, confirming the prefilled dialog without manually choosing that reference calls getNewDiscourseNodeText with an undefined sourceBlockUid, so its query cannot resolve the reference from the selected block's page or ancestors and the created title silently omits it. The previous highlighted-text path passed targetBlockUid; provide the dialog a format-only block context without setting sourceBlockUid, since that prop would also cause the dialog to overwrite the entire source block.

Useful? React with 👍 / 👎.

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