diff --git a/.gitignore b/.gitignore index 364a557662..8c7ce2f37f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ openGauss-server/ node_modules .claude/ .codex/ +.codegraph/ .cortexkit/ .workbuddy/ .superpowers/ diff --git a/apps/desktop/src/components/editor/AiAssistant.vue b/apps/desktop/src/components/editor/AiAssistant.vue index 066e0103a5..9dd3cff1a8 100644 --- a/apps/desktop/src/components/editor/AiAssistant.vue +++ b/apps/desktop/src/components/editor/AiAssistant.vue @@ -5033,16 +5033,21 @@ function dismissAwayUpdates() { onMounted(async () => { assistantViewMounted = true; - // Size handling has to be live before the first `await`: the bootstrap below + // Register the resize/drop wiring before the first `await`: the bootstrap below // can take several frames (persisted runs plus the dynamic import of the code - // highlighter), and a panel drag or window resize during that window would - // otherwise be dropped, leaving the composer on a stale compact/expanded state. + // highlighter), and a panel drag, window resize, or file/table drop during that + // window would otherwise be dropped, leaving the composer on a stale + // compact/expanded state — and the listeners of a panel closed mid-load were + // added after onUnmounted had already run, leaking them. window.addEventListener("resize", handleWindowResize); + document.addEventListener("dbx:tauri-file-drop", onTauriFileDrop as EventListener); + window.addEventListener(DBX_TABLE_REFERENCE_DROP_EVENT, onTableReferenceDropEvent); if (typeof ResizeObserver !== "undefined" && assistantRootRef.value) { promptPanelResizeObserver = new ResizeObserver(handleObservedPanelResize); promptPanelResizeObserver.observe(assistantRootRef.value); if (promptPanelRef.value) promptPanelResizeObserver.observe(promptPanelRef.value); } + scheduleResponsiveControlMeasurement(true); const savedHeight = localStorage.getItem(AI_TEXTAREA_HEIGHT_STORAGE_KEY); if (savedHeight) { const height = parseInt(savedHeight, 10); @@ -5147,10 +5152,6 @@ onMounted(async () => { shikiCodeHighlighter.value = await createAiShikiCodeHighlighter({ appearance: () => aiCodeAppearance.value, }).catch(() => undefined); - - document.addEventListener("dbx:tauri-file-drop", onTauriFileDrop as EventListener); - window.addEventListener(DBX_TABLE_REFERENCE_DROP_EVENT, onTableReferenceDropEvent); - scheduleResponsiveControlMeasurement(true); }); function maxTextareaHeight() { diff --git a/apps/desktop/src/components/plugins/PluginContributionsPanel.vue b/apps/desktop/src/components/plugins/PluginContributionsPanel.vue index dd0b5975d4..45826bd995 100644 --- a/apps/desktop/src/components/plugins/PluginContributionsPanel.vue +++ b/apps/desktop/src/components/plugins/PluginContributionsPanel.vue @@ -1124,15 +1124,19 @@ onBeforeUnmount(() => { ·{{ t("pluginPlatform.marketplaceGuideDescription") }} - -