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