Skip to content

Studio: delete selected recipe blocks with the Delete key - #14223

Merged
danielhanchen merged 1 commit into
mainfrom
studio-recipe-canvas-delete-key
Oct 19, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-recipe-canvas-delete-key

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Fixes #9211 (the "couldn't find a way to remove a node" part).

Problem

The Data Recipes canvas only deletes a selected block with Backspace, which is React Flow's default deleteKeyCode. On Windows and most Linux keyboards people press Delete to remove things, and on the Data Recipes canvas Delete does nothing. There is also no visible delete button, so users conclude blocks cannot be removed at all (see the comment on #9211 from a Windows 10 / Edge user).

Change

Pass deleteKeyCode={["Backspace", "Delete"]} to the recipe canvas, as a module-level constant so React Flow's key listener is not re-subscribed on every render.

  • Backspace keeps working exactly as before (macOS users are unaffected).
  • Delete now removes the selected blocks and edges through the same React Flow path Backspace already uses, so node removal, edge cleanup and the store's removal helpers are unchanged.
  • Typing in inputs, textareas and editors is unaffected: React Flow ignores the delete key while focus is in an editable element, same as for Backspace today.
  • No UI changes, no new buttons, no flow changes.

Tests

  • tests/recipe-canvas-delete-keys.test.ts: fails on main (constant missing) and when only the canvas wiring is reverted, passes with the change.
  • Typecheck clean; eslint / biome diagnostics on the touched source files are identical to main.

Before / after

Two fresh Studio installs (merge base a33463f vs this branch), the "Text to SQL" learning recipe opened fresh on each, one block selected, then the key pressed. Node counts are read from the canvas DOM.

Chromium Firefox WebKit
Delete removes the selected block, before no no no
Delete removes the selected block, after yes yes yes
Backspace removes the selected block, before and after yes yes yes
Delete while typing in a block's inline field keeps the block, before and after not exercised (no block selected) yes yes

Before: Delete pressed, the selected block on the right stays. After: Delete pressed, the block and its link are removed.

Before: the selected block on the right edge (and its dashed link) is still there after pressing Delete. After: it is removed.

@danielhanchen danielhanchen self-assigned this Oct 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-10-19T10:06:39.669949Z 96ca520 Manual request
🔒 Security Review ⚠️ Failed 2026-10-19T08:51:15.983596Z 96ca520 PR opened
ℹ️ 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.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 19, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 96ca520574

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

@danielhanchen
danielhanchen merged commit f5e91f1 into main Oct 19, 2026
@danielhanchen
danielhanchen deleted the studio-recipe-canvas-delete-key branch October 19, 2026 13:44
danielhanchen added a commit that referenced this pull request Oct 19, 2026
## Summary

Main is over the startup bundle budget again, by 189 B raw, so `Frontend
build + bundle sanity` fails on every PR based on it:

```
over the startup budget: raw 6682.2 KB > 6682.0 KB      (main at 6ccf0e4)
```

#14258 set both limits to the measured build plus a 160 B raw / 189 B
transfer margin. #11937 (a setting to hide the macOS menu bar icon) then
added 349 B raw / 78 B transfer to the startup chunks, and merged
without raising them.

## Cause

#11937 adds strings to `i18n/locales/en.ts`, which ships in the startup
chunks, and entries to the settings search index (`settings-search.ts`,
`dialog-search-index.ts`). That is small real growth. I measured each
commit since #14258 on its own:

| tree | raw B | transfer B |
|---|---|---|
| `46e4f50bea` (#14258) | 6,842,183 | 2,060,321 |
| `2b20770c91` (+ #11937) | 6,842,532 | 2,060,399 |
| `f5e91f1ca5` (+ #14223) | 6,842,532 | 2,060,421 |
| main `6ccf0e4e74` (+ #14232) | 6,842,532 | 2,060,400 |

#14223 and #14232 add no raw bytes. #14021 and #14263 change no frontend
code.

## Change

- **`check-bundle-budget.ts`:** a BUDGET comment entry for #11937, and
both limits moved to the measured build at main plus the same margin:
  - `rawBytes`: 6,842,343 -> 6,842,692.
  - `transferBytes`: 2,060,510 -> 2,060,589.

## Testing

One machine and build, Node 24, exact byte totals from the budget
script, 96 chunks.

- **Main against the old limits:** `over the startup budget: raw 6682.2
KB > 6682.0 KB`.
- **With this change:** `within budget (0.2 KB transfer, 0.2 KB raw to
spare)`.
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.

[Feature]Add More Features To Data Recipes

1 participant