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: hide pylsp error on the home page (#7416)

Myles Scolnickf1f4708d5730
diff --git a/frontend/src/components/app-config/user-config-form.tsx b/frontend/src/components/app-config/user-config-form.tsx
index 657db33d13..64db954654 100644
--- a/frontend/src/components/app-config/user-config-form.tsx
+++ b/frontend/src/components/app-config/user-config-form.tsx
@@ -41,6 +41,7 @@ import {
} from "@/core/config/config-schema";
import { getAppWidths } from "@/core/config/widths";
import { marimoVersionAtom } from "@/core/meta/state";
+import { viewStateAtom } from "@/core/mode";
import { useRequestClient } from "@/core/network/requests";
import { isWasm } from "@/core/wasm/utils";
import { useDebouncedCallback } from "@/hooks/useDebounce";
@@ -119,7 +120,19 @@ export const UserConfigForm: React.FC = () => {
const [activeCategory, setActiveCategory] = useAtom(
activeUserConfigCategoryAtom,
);
- const capabilities = useAtomValue(capabilitiesAtom);
+
+ let capabilities = useAtomValue(capabilitiesAtom);
+ const isHome = useAtomValue(viewStateAtom).mode === "home";
+ // The home page does not fetch kernel capabilities, so we just turn them all on
+ if (isHome) {
+ capabilities = {
+ terminal: true,
+ pylsp: true,
+ ty: true,
+ basedpyright: true,
+ };
+ }
+
const marimoVersion = useAtomValue(marimoVersionAtom);
const { locale } = useLocale();
const { saveUserConfig } = useRequestClient();