From d44b82222ae080066151035ee47ddcbb526ba90c Mon Sep 17 00:00:00 2001 From: emrberk Date: Tue, 1 Sep 2026 19:02:07 +0300 Subject: [PATCH 1/4] refactor: use semantic notebook pane dimensions --- e2e/questdb | 2 +- src/consts/shared-definitions.json | 146 ++++-- src/modules/ConsoleEventTracker/events.ts | 1 + src/scenes/Editor/Monaco/importTabs.ts | 8 + src/scenes/Editor/Notebook/cells/Cell.tsx | 115 ++++- .../Editor/Notebook/cells/CellDragHeader.tsx | 5 +- .../Editor/Notebook/cells/CellToolbar.tsx | 45 +- .../Editor/Notebook/cells/CellViewToggle.tsx | 146 +++--- .../cells/useCellResizeOrchestration.ts | 34 +- .../Notebook/cells/useCellRunActions.ts | 20 +- src/scenes/Editor/Notebook/index.tsx | 108 +++-- .../Notebook/notebookPresentationStore.ts | 47 ++ .../Editor/Notebook/notebookUtils.test.ts | 348 ++++++++++++-- src/scenes/Editor/Notebook/notebookUtils.ts | 433 ++++++++++++++---- src/store/notebook.ts | 9 + src/utils/ai/notebookSnapshot.test.ts | 106 ++++- src/utils/ai/notebookSnapshot.ts | 72 ++- src/utils/ai/prompts.ts | 5 +- src/utils/ai/shared.notebookTools.test.ts | 138 +++++- src/utils/mcp/dispatchMCPTool.test.ts | 2 +- .../notebooks/notebookController/index.ts | 1 + .../notebookController/notebookController.ts | 9 +- .../notebookTransitions.test.ts | 177 +++++++ .../notebookController/notebookTransitions.ts | 161 ++++++- src/utils/notebooks/notebookToolError.ts | 1 + src/utils/notebooks/notebookToolMessages.ts | 2 + src/utils/tools/applyNotebookState.ts | 24 +- src/utils/tools/dispatch.ts | 39 +- 28 files changed, 1808 insertions(+), 396 deletions(-) create mode 100644 src/scenes/Editor/Notebook/notebookPresentationStore.ts diff --git a/e2e/questdb b/e2e/questdb index 9b59a9211..12a33d651 160000 --- a/e2e/questdb +++ b/e2e/questdb @@ -1 +1 @@ -Subproject commit 9b59a921165af573cedd22bf8b12613de19cb8bd +Subproject commit 12a33d651e51e2682e7a448c8db5168fc72dfad3 diff --git a/src/consts/shared-definitions.json b/src/consts/shared-definitions.json index 9432c14f1..e5dafbe54 100644 --- a/src/consts/shared-definitions.json +++ b/src/consts/shared-definitions.json @@ -184,7 +184,7 @@ "surfaces": ["ai", "mcp"], "mutatesNotebook": true, "createsNotebook": true, - "description": "Duplicate a notebook tab. Copies every cell (SQL, mode, chart config) and the layout into a NEW notebook labelled \"