Skip to content

ENG-1477: Convert a tldraw arrow to a DG relation#1082

Open
sid597 wants to merge 2 commits into
mainfrom
eng-1477-implement-ability-to-convert-a-tldraw-arrow-to-a-dg-relation
Open

ENG-1477: Convert a tldraw arrow to a DG relation#1082
sid597 wants to merge 2 commits into
mainfrom
eng-1477-implement-ability-to-convert-a-tldraw-arrow-to-a-dg-relation

Conversation

@sid597
Copy link
Copy Markdown
Collaborator

@sid597 sid597 commented May 25, 2026

No description provided.

Right-click a plain tldraw arrow connecting two discourse-graph nodes to
get a "Relation" submenu listing the relation types valid between those
node types. Selecting one creates the discourse relation (persisted to
Roam) and replaces the plain arrow with the relation arrow.

Extract the relation-creation logic shared with the node drag-handle flow
into overlays/relationCreation.ts (createRelationBetweenNodes,
getValidRelationTypesBetween); DragHandleOverlay and RelationTypeDropdown
now delegate to it.
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 25, 2026

ENG-1477

@supabase
Copy link
Copy Markdown

supabase Bot commented May 25, 2026

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 ↗︎.

Copy link
Copy Markdown

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

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: 08c8fb265e

ℹ️ 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/uiOverrides.tsx
Converting a plain arrow deleted the original immediately after the new
relation shape was created, but persistence runs asynchronously and
deletes the new arrow on failure (e.g. canvas page UID lookup fails),
which could leave neither arrow.

Await handleCreateRelationsInRoam and treat the new arrow surviving as
success; the convert action now removes the original only when the
relation persisted. The drag-handle caller voids the now-async helper
(no original arrow to lose, behavior unchanged).
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