feat(cli): rename server start command from visionset ui to visionset server - #333
Merged
Merged
Conversation
…set server` The command starts the FastAPI server; the browser application is one client of it, alongside REST, the SDK and MCP, so the old name described a single consumer of the process rather than the process itself. `cli/ui.py` becomes `cli/server.py` and `def ui` becomes `def server`; Typer derives the command name from the function, so that rename is the whole behaviour change. Same flags, same defaults, same `/app` mount, same one-sentence refusal at exit 1 outside a workspace. There is no alias: `visionset ui` now answers Typer's ordinary `No such command 'ui'`. The two call sites that actually run the command spell it as separate argv tokens, so a `visionset ui` text search cannot see them: `examples/http_end_to_end.py` and `tests/packaging/test_wheel.py` both pass `"ui"` as its own list element. Found by the example's own subprocess test. Closes #329
JArmandoAnaya
enabled auto-merge (squash)
August 5, 2026 05:02
This was referenced Aug 5, 2026
Closed
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.
visionset uistarts the FastAPI server; the browser app is one client of it, alongside REST,the SDK and MCP. The command now says what it does.
What changed
The command.
src/visionset/cli/ui.py→src/visionset/cli/server.pyanddef ui→def server. Typer derives the command name from the function (app.command()(server)), sothat one rename is the whole behaviour change — same flags, same defaults, same banner, same
/appmount, same one-sentence refusal at exit 1 outside a workspace.tests/cli/test_ui.py→
tests/cli/test_server.pyso the module keeps telling the truth; its basename is uniquesuite-wide, which is required with no
__init__.pyanywhere.No alias, per the issue:
visionset uinow answers Typer's ordinaryNo such command 'ui'. Verified by running it.Everything that named it — 42 files: docs,
README.md,CONTRIBUTING.md,CHANGELOG.md,docker/(compose, nginx, api-dev),scripts/cycle_server.sh,examples/,.github/workflows/ci.yml,the frontend comments and the
TokenGaterefusal string a user actually reads("No answer from the server. Is
visionset serverrunning?"), and prose that named the commandrather than quoting a shell line.
The grep the issue specifies cannot find the callers that matter
Worth recording, because it is the trap in this kind of rename: the two places that actually
run the command spell it as separate argv tokens, so the text
visionset uinever appearsand
git grep "visionset ui"reported zero remaining occurrences while the example was stillinvoking a command that no longer exists.
tests/examples/test_http_end_to_end.pycaught it — seven errors at setup, because that suitestarts the real server as a subprocess rather than patching
uvicorn.run. The follow-up sweepwas
git grep -nwE "ui"over code and config, which also turned upcli/mcp.py's docstringopening
``ui.py``'s shape exactly. Two things it turned up and I deliberately left:server/main.py'sname="ui"(a Starlette static-mount name) andsession.py's.ui-sessionfilename — neither is the CLI command.Also caught by hand, since a
visionset uigrep does not see them:cli.md#visionset-ui→cli.md#visionset-server(docs/api.md,docs/auth.md);`ui`command references indocs/cli.mdand two insrc/visionset/cli/mcp.py,which name the sibling command in prose;
tests/cli/test_ui.py, a path that no longer exists (docs/examples.md,tests/examples/test_http_end_to_end.py);README.mdquickstart,docs/cli.mdsynopsis), realigned —serveris four characters wider thanui.Grep
Two hits, both deliberate: the changelog entry documenting the rename has to name the old
command. Nothing else in the tree mentions it.
One small correction to the issue
The issue says "we are pre-PyPI";
0.0.1b2is in fact already on PyPI, so the old name didship once. There is no installed base to worry about and the decision is unchanged — no alias —
so this only shapes the wording of the CHANGELOG entry, which says a script calling the old
name needs one edit rather than resting on a premise that does not hold.
Found, not fixed
VISIONSET_UI_SESSION(env var, 6 files) andUI_PREFIX(the/appmount constant, 7 files)are untouched, as the issue directs. Both now read a little oddly beside a command called
server; a follow-up could settle them, but an env-var rename is its own decision with its owncompose/docs blast radius.
UI and API http://…and the help text still reads "Serve the API andthe UI from this workspace." Both name what is served, not the command, so both are still
accurate — left alone deliberately.
docs/ui.mdkeeps its filename: it documents the browser client, not the command.Test plan
bash scripts/check.sh— all three suites, including both browser ones.Note for anyone running it in a fresh worktree:
check.shexits witherror: node_modules is missing — run 'pnpm install' firstrather than skipping, so thefrontend and browser stages do not run until you have installed. Easy to mistake for a pass.
Closes #329