Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: Open destination path, not filename (#2308)

Wasim Sandhu47f56f13f69b
diff --git a/frontend/src/components/editor/actions/useCopyNotebook.tsx b/frontend/src/components/editor/actions/useCopyNotebook.tsx
index 949f37b4f1..cabbe3f339 100644
--- a/frontend/src/components/editor/actions/useCopyNotebook.tsx
+++ b/frontend/src/components/editor/actions/useCopyNotebook.tsx
@@ -20,10 +20,11 @@ export function useCopyNotebook(source: string | null) {
defaultValue: `_${filename}`,
confirmText: "Copy notebook",
spellCheck: false,
- onConfirm: (destination: string) => {
+ onConfirm: (filename: string) => {
+ const destination = pathBuilder.join(Paths.dirname(source), filename);
sendCopy({
source: source,
- destination: pathBuilder.join(Paths.dirname(source), destination),
+ destination: destination,
}).then(() => {
closeModal();
toast({