Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

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

Daniel Hanf5e91f1ca597
diff --git a/studio/frontend/src/features/recipe-studio/constants.ts b/studio/frontend/src/features/recipe-studio/constants.ts
index 9d3504ed0b5..d164e0b6f3a 100644
--- a/studio/frontend/src/features/recipe-studio/constants.ts
+++ b/studio/frontend/src/features/recipe-studio/constants.ts
@@ -6,3 +6,5 @@ export const DEFAULT_NODE_HEIGHT = 120;
export const MIN_NODE_WIDTH = 260;
export const MAX_NODE_WIDTH = 900;
export const MAX_NOTE_NODE_WIDTH = 600;
+// React Flow deletes on Backspace only; Windows and Linux keyboards reach for Delete (#9211).
+export const CANVAS_DELETE_KEYS = ["Backspace", "Delete"];
diff --git a/studio/frontend/src/features/recipe-studio/recipe-studio-page.tsx b/studio/frontend/src/features/recipe-studio/recipe-studio-page.tsx
index ffe22c8aa95..af0bc387840 100644
--- a/studio/frontend/src/features/recipe-studio/recipe-studio-page.tsx
+++ b/studio/frontend/src/features/recipe-studio/recipe-studio-page.tsx
@@ -31,6 +31,7 @@ import { Button } from "@/components/ui/button";
import { GuidedTour, useGuidedTourController } from "@/features/tour";
import { buildRecipeEditorTourSteps } from "./tour";
import { BlockSheet } from "./components/block-sheet";
+import { CANVAS_DELETE_KEYS } from "./constants";
import { LayoutControls } from "./components/controls/layout-controls";
import { RunValidateFloatingControls } from "./components/controls/run-validate-floating-controls";
import { ViewportControls } from "./components/controls/viewport-controls";
@@ -669,6 +670,7 @@ export function RecipeStudioPage({
onConnect={onConnect}
onNodeClick={handleNodeClick}
onNodeDoubleClick={handleNodeDoubleClick}
+ deleteKeyCode={CANVAS_DELETE_KEYS}
isValidConnection={isValidConnection}
onMoveEnd={(event) => {
if (event) {
diff --git a/studio/frontend/tests/recipe-canvas-delete-keys.test.ts b/studio/frontend/tests/recipe-canvas-delete-keys.test.ts
new file mode 100644
index 00000000000..05505934214
--- /dev/null
+++ b/studio/frontend/tests/recipe-canvas-delete-keys.test.ts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+import assert from "node:assert/strict";
+import { test } from "node:test";
+
+import { CANVAS_DELETE_KEYS } from "../src/features/recipe-studio/constants.ts";
+import { readSrc } from "./helpers/kit.ts";
+
+test("recipe canvas deletes selected blocks on Delete as well as Backspace", () => {
+ assert.deepEqual([...CANVAS_DELETE_KEYS].sort(), ["Backspace", "Delete"]);
+ const src = readSrc("features/recipe-studio/recipe-studio-page.tsx");
+ const canvas = src.slice(src.indexOf("<ReactFlow<"));
+ assert.match(
+ canvas.slice(0, canvas.indexOf("\n >\n")),
+ /\bdeleteKeyCode=\{CANVAS_DELETE_KEYS\}/,
+ );
+});