From eada1e99794ec239fa062527286f292bb63cbbd1 Mon Sep 17 00:00:00 2001 From: claude Date: Wed, 10 Jun 2026 07:41:21 +0000 Subject: [PATCH] file-tree: show python packages button for all quarto projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous approach (pdfFile?.path === 'output.html') caused a chicken-and-egg problem: the button only appeared after a successful RevealJS compile, but you need to add packages before the first compile. Use compiler === 'quarto' from ProjectSettingsContext instead — this is set from project metadata and available immediately, before any compile. Quarto supports Jupyter Python cells in all output formats (RevealJS HTML, PDF via LaTeX, PDF via Typst), so showing the button for any Quarto project is the correct behaviour. Co-Authored-By: Claude Sonnet 4.6 --- .../file-tree/components/file-tree-action-buttons.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-action-buttons.tsx b/services/web/frontend/js/features/file-tree/components/file-tree-action-buttons.tsx index 7f2abc9273..4768e28147 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-action-buttons.tsx +++ b/services/web/frontend/js/features/file-tree/components/file-tree-action-buttons.tsx @@ -8,7 +8,7 @@ import { usePermissionsContext } from '@/features/ide-react/context/permissions- import FileTreeActionButton from './file-tree-action-button' import { useRailContext } from '../../ide-react/context/rail-context' import PythonRequirementsModal from './python-requirements-modal' -import { useDetachCompileContext as useCompileContext } from '@/shared/context/detach-compile-context' +import { useProjectSettingsContext } from '@/features/editor-left-menu/context/project-settings-context' export default function FileTreeActionButtons({ fileTreeExpanded, @@ -20,8 +20,8 @@ export default function FileTreeActionButtons({ const { write } = usePermissionsContext() const { handlePaneCollapse } = useRailContext() const [showPythonModal, setShowPythonModal] = useState(false) - const { pdfFile } = useCompileContext() - const isRevealJs = pdfFile?.path === 'output.html' + const { compiler } = useProjectSettingsContext() + const isQuarto = compiler === 'quarto' const { canCreate, @@ -115,7 +115,7 @@ export default function FileTreeActionButtons({ iconType="delete" /> )} - {write && isRevealJs && ( + {write && isQuarto && (