From d584b7f00d8aba4221d6e79215bd7f117fe56076 Mon Sep 17 00:00:00 2001 From: kert Date: Thu, 29 Oct 2026 14:46:35 -0400 Subject: [PATCH] fix(notebooks): strip Tutorials, settings and Shutdown from marimo's home page The landing page's top-right cluster (Tutorials dropdown, user-settings gear, server Shutdown X) is removed in the overlay. Unlike the Resources strip, this step fails the image build if an upstream bump leaves any of the three on the home page, so they cannot quietly come back. The editor keeps its gear: that component hosts the settings dialog the notebook menu, AI footer and packages panel open. --- infra/marimo/theme/scripts/apply-overlay.sh | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/infra/marimo/theme/scripts/apply-overlay.sh b/infra/marimo/theme/scripts/apply-overlay.sh index d2fbdfd..f5c55e2 100755 --- a/infra/marimo/theme/scripts/apply-overlay.sh +++ b/infra/marimo/theme/scripts/apply-overlay.sh @@ -90,6 +90,28 @@ open(p, 'w').write(s) PY fi +# 4c. Strip the home page's top-right cluster: the Tutorials dropdown, the +# user-settings gear and the server Shutdown X. None of them may ever +# reach the landing page, so unlike 4b this fails the build when an +# upstream bump leaves any of them in place rather than skipping quietly. +# (The editor keeps its own gear: it hosts the settings dialog that the +# notebook menu, AI footer and packages panel open.) +python3 - "$SRC/frontend/src/components/pages/home-page.tsx" <<'PY' +import sys, re +p = sys.argv[1] +s = open(p).read() +s = re.sub( + r'^[ \t]*]*>\s*.*?^[ \t]*\n', + '', s, count=1, flags=re.M | re.S, +) +s = re.sub(r'^import \{ (ConfigButton|ShutdownButton) \} from "[^"]+";\n', '', s, flags=re.M) +s = re.sub(r'\bOpenTutorialDropDown,\s*', '', s) +left = sorted(set(re.findall(r'\b(OpenTutorialDropDown|ConfigButton|ShutdownButton)\b', s))) +if left: + sys.exit(f"overlay: home page still references {', '.join(left)} in {p}") +open(p, 'w').write(s) +PY + # 5. Inject the lucide-react → shim alias into vite.config.mts. # Match the `resolve: {` block and insert an `alias` entry right after. if ! grep -q 'lucide-shim' "$SRC/frontend/vite.config.mts"; then