From ce33de79af0e525dbe719048b4df1d2c45fa669e Mon Sep 17 00:00:00 2001 From: Xiaohui Yan Date: Mon, 9 Mar 2026 18:19:47 +0800 Subject: [PATCH] fix(onboard): map legacy 'textual' value to 'tui' for UI backend default (#21) Add mapping for legacy 'textual' value to current 'tui' value when selecting UI backend, preventing invalid default selection. --- EvoScientist/config/onboard.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/EvoScientist/config/onboard.py b/EvoScientist/config/onboard.py index 8184075..becb9f4 100644 --- a/EvoScientist/config/onboard.py +++ b/EvoScientist/config/onboard.py @@ -482,10 +482,17 @@ def _step_ui_backend(config: EvoScientistConfig) -> str: Choice(title="CLI (classic terminal, lightweight)", value="cli"), ] + # Map legacy values to current ones + default_backend = config.ui_backend + if default_backend == "textual": + default_backend = "tui" + elif default_backend not in ("tui", "cli"): + default_backend = "tui" + backend = questionary.select( "Select UI mode:", choices=choices, - default=config.ui_backend, + default=default_backend, style=WIZARD_STYLE, qmark=QMARK, use_indicator=True,