fix(tui): resolve checkout from any folder + back-compat [tui] extra#5
Merged
akozak-gd merged 2 commits intoJun 30, 2026
Merged
Conversation
awrobel-gd
reviewed
Jun 30, 2026
awrobel-gd
approved these changes
Jun 30, 2026
mkonopelski-gd
deleted the
fix/tui-install-resolve-checkout-from-any-folder
branch
July 1, 2026 11:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two issues with the installed
specflowCLI / TUI:uv tool install --editable "./mcp_server[tui]"warneddoes not have an extra named 'tui'.textualhad been moved to a base dependency, which deleted thetuiextra entirely, while older install commands still referenced[tui].specflow tuionly launched from inside the cloned repo. Run from any other folder it flashed the app open and exited with no visible message (the in-app gate could onlynotify()thenexit(), which tears the screen down before the toast paints).Fix
[tui]extra —textualis a base dependency, so a freshuv tool install --editable ./mcp_server(as documented in QUICKSTART) always has a working TUI. The now-unusedtuioptional-dependency extra is removed; the only references left were the extra itself and a stale test comment.Resolve the checkout from any folder — the documented install is
uv tool install --editable ./mcp_server, so the binary runs the code straight from the clone. Addedinstalled_repo_root()(derives the checkout from the module's own__file__) andresolve_repo_root()(cwd walk-up, else the install's own checkout), factored on a shared_find_sentinel_roothelper.run_tuiandspecflow initnow useresolve_repo_root, so they work from any directory with no extra setup — running from inside a different checkout still wins.Graceful failure — when no checkout can be resolved (non-editable / PyPI install with no clone), the TUI prints an actionable, audience-aware message instead of silently flashing open:
--root-path, or install editable;Notes / scope
./backend/Dockerfile(no published image) and compose bind-mounts./scripts,./workspaces,./agent_logs— the clone is the runtime, not just config. This change only fixes where the TUI finds the checkout.--root-pathonly, and self-host self-heals becausespecflow initreinstalls the tool editable.Tests
test_local_env.py—installed_repo_root/resolve_repo_root(cwd-wins, fallback, none-when-neither).test_tui_app.py— launches from a resolved checkout; refuses visibly when none resolves.test_cli_init.py— updated no-checkout case.mcp_serversuite passing.Verification
uv tool install --reinstall --editable .→ no warning,textualinstalled, TUI tests pass.cd /tmp && specflow tui→ resolves the clone and proceeds (no "must be run from checkout" error).cd ~ && specflow init→ runs against the same clone.