Skip to content

[ENG-2055] Handle duplicate node shortcuts - #1350

Open
sid597 wants to merge 3 commits into
mainfrom
eng-2055-handle-duplicate-node-shortcuts
Open

[ENG-2055] Handle duplicate node shortcuts#1350
sid597 wants to merge 3 commits into
mainfrom
eng-2055-handle-duplicate-node-shortcuts

Conversation

@sid597

@sid597 sid597 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

When creating a node type, walk the label for the first character not already used as a shortcut instead of leaving the shortcut unset on collision, per Matt's suggestion on ENG-2055 (if E is taken, EXPERIMENT gets X). This supersedes the blank-on-collision behavior from ENG-1741 (#1020). If every character of the label is taken, the shortcut stays unset. The taken set spans all nodes including the built-in Page/Block pseudo-nodes — their p/b are live canvas tool shortcuts — so P and B are never auto-assigned.

Adds a Shortcut column to the node type list with a warning icon when multiple nodes share a shortcut. The warning counts user nodes only, since the node menu only dispatches on user-backed nodes, and it is informational — NodeConfig continues to hard-block entering a duplicate when editing. Also fixes the optimistic local state after adding a node, which hardcoded empty shortcut/format even though the real values were persisted.

Out of scope, noted while investigating: on canvas, duplicate shortcuts all fire with the last-registered tool winning (and node shortcuts can shadow tldraw built-ins); the node menu's lookup is case-sensitive against stored values, so a lowercase-stored shortcut never fires; multi-character shortcuts are silently unreachable (and do not reserve their first character from auto-assignment); and a shortcut edit is lost if you leave the node's settings tab within ~350ms of typing (pre-existing debounce cancel on unmount, which the new column now makes visible).

@linear-code

linear-code Bot commented Aug 24, 2026

Copy link
Copy Markdown

ENG-2055

@vercel

vercel Bot commented Aug 24, 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 24, 2026 4:19pm

Request Review

@supabase

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

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

Open in Devin Review

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