Skip to content

ENG-2037 Add tabbed node card context menu to Roam tldraw - #1272

Open
sid597 wants to merge 5 commits into
mainfrom
eng-2037-add-tabbed-node-card-context-menu-to-roam-tldraw
Open

ENG-2037 Add tabbed node card context menu to Roam tldraw#1272
sid597 wants to merge 5 commits into
mainfrom
eng-2037-add-tabbed-node-card-context-menu-to-roam-tldraw

Conversation

@sid597

@sid597 sid597 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator
eng-2037.mp4

Overrides tldraw's StylePanel for Roam: selecting a single node card shows a Context tab (default) listing all discourse relations grouped by relation type, with +/− buttons that add or remove the related node on the canvas, and a Styling tab that reuses the stock styling controls. Regular tldraw shapes and multi-selection keep the default style panel. Adding a node also draws its existing relation arrows via createExistingRelations; removing deletes the node shape and its arrows — relation data in Roam is never modified.


Open in Devin Review

@linear-code

linear-code Bot commented Jul 31, 2026

Copy link
Copy Markdown

ENG-2037

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@supabase

supabase Bot commented Jul 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 ↗︎.

@vercel

vercel Bot commented Jul 31, 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 11:53am

Request Review

@sid597

sid597 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Comment thread apps/roam/src/components/canvas/CustomStylePanel.tsx Outdated

@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 2 potential issues.

View 1 additional finding in Devin Review.

Open in Devin Review

Comment thread apps/roam/src/components/canvas/CustomStylePanel.tsx Outdated
Comment thread apps/roam/src/components/canvas/CustomStylePanel.tsx
@sid597

sid597 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 3475f5dcb2

ℹ️ 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/canvas/CustomStylePanel.tsx Outdated

@mdroidian mdroidian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few issues:
Image

  1. Why are the headers on the left this time? Let's center them as per the design.

https://www.loom.com/share/75d4ddc684594ac7898ee2cc31a62e38

  1. A couple issues noticed here when creating relations

@sid597 would you mind recording a manual video for this, please? Let's try to think of different surfaces to manually stress test this and walk through theme one by one.

if (!created) return;
const util = editor.getShapeUtil(created);
if (util instanceof DiscourseNodeUtil) {
await util.createExistingRelations({ shape: created });

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a flag for this (autoCanvasRelations). Let's make sure we respect it.

className="min-w-0 flex-1 truncate text-sm"
title={text}
>
{text}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's use roam's react.BlockString to give a consistent feel to referenced nodes.

@mdroidian

mdroidian commented Aug 13, 2026

Copy link
Copy Markdown
Member

@sid597 There's also an issue with creating new relations. They are not showing up in the new discourse context. See if you can come up with a solution for that or if it is deeper rooted in an existing caching mechanism.

@mdroidian

Copy link
Copy Markdown
Member

@sid597 also we don't want to support blocks/pages for this feature either
image

ala #1287

@sid597
sid597 force-pushed the eng-2037-add-tabbed-node-card-context-menu-to-roam-tldraw branch from 526d512 to 3fb1906 Compare August 17, 2026 10:46
@graphite-app

graphite-app Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

PR size/scope check

This PR is over our review-size guideline.

  • Recommended: ~200 lines changed
  • Acceptable limit: up to 400 lines when well-scoped/self-contained
  • Preferred file count: fewer than 5 files

Please split this into smaller PRs unless there is a clear reason the changes need to land together.

If keeping it as one PR, please add a brief justification covering:

  • What single problem this PR solves
  • Why the files/changes are coupled

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