From f20ce61624ec58a33acb72de09ea1d1f9f0c217a Mon Sep 17 00:00:00 2001 From: FutureUnreal <42101210307@stu.xpu.edu.cn> Date: Wed, 29 Apr 2026 20:53:51 +0800 Subject: [PATCH 1/2] Fix onboarding layout and runner switching --- src/deepscientist/daemon/api/handlers.py | 11 ++ src/ui/src/components/landing/Hero.tsx | 2 +- src/ui/src/components/landing/HeroNav.tsx | 29 ++-- .../onboarding/OnboardingOverlay.tsx | 149 ++++++++++++++++-- .../projects/ExperimentLaunchModeDialog.tsx | 1 + .../src/components/settings/SettingsPage.tsx | 6 +- src/ui/src/lib/stores/onboarding.ts | 7 + 7 files changed, 175 insertions(+), 30 deletions(-) diff --git a/src/deepscientist/daemon/api/handlers.py b/src/deepscientist/daemon/api/handlers.py index 197e24f0..8d1637bd 100644 --- a/src/deepscientist/daemon/api/handlers.py +++ b/src/deepscientist/daemon/api/handlers.py @@ -2533,6 +2533,17 @@ def config_show(self, name: str) -> dict: } def config_save(self, name: str, body: dict) -> dict: + if name == "config" and isinstance(body.get("structured"), dict): + default_runner = self.app.config_manager._normalize_runtime_runner_name( + body["structured"].get("default_runner") + ) + if default_runner in {"codex", "claude", "kimi", "opencode"}: + os.environ["DEEPSCIENTIST_DEFAULT_RUNNER"] = default_runner + os.environ["DEEPSCIENTIST_ENABLE_RUNNER"] = default_runner + os.environ.pop("DS_DEFAULT_RUNNER", None) + os.environ.pop("DS_ENABLE_RUNNER", None) + os.environ.pop("DEEPSCIENTIST_ENABLE_RUNNERS", None) + os.environ.pop("DS_ENABLE_RUNNERS", None) if isinstance(body.get("structured"), dict): result = self.app.config_manager.save_named_payload(name, body["structured"]) else: diff --git a/src/ui/src/components/landing/Hero.tsx b/src/ui/src/components/landing/Hero.tsx index 80d0b51b..658fbab2 100644 --- a/src/ui/src/components/landing/Hero.tsx +++ b/src/ui/src/components/landing/Hero.tsx @@ -602,7 +602,7 @@ export default function Hero(props: { className="h-12 rounded-full bg-[#C7AD96] px-7 text-[#2D2A26] shadow-[0_12px_28px_-14px_rgba(45,42,38,0.55)] transition-all duration-200 hover:-translate-y-0.5 hover:bg-[#D7C6AE]" onClick={() => { window.setTimeout(() => { - setActiveDialog('autonomous') + setActiveDialog('launch') }, 120) }} data-onboarding-id="landing-start-research" diff --git a/src/ui/src/components/landing/HeroNav.tsx b/src/ui/src/components/landing/HeroNav.tsx index 8bf4d419..9c4cb44a 100644 --- a/src/ui/src/components/landing/HeroNav.tsx +++ b/src/ui/src/components/landing/HeroNav.tsx @@ -25,7 +25,7 @@ export default function HeroNav(props: { 'supports-[backdrop-filter]:bg-white/40' )} > -