Skip to content

feat(cli): rename server start command from visionset ui to visionset server - #333

Merged
JArmandoAnaya merged 1 commit into
mainfrom
feat/329-rename-ui-to-server
Aug 5, 2026
Merged

feat(cli): rename server start command from visionset ui to visionset server#333
JArmandoAnaya merged 1 commit into
mainfrom
feat/329-rename-ui-to-server

Conversation

@JArmandoAnaya

Copy link
Copy Markdown
Contributor

visionset ui starts 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.pysrc/visionset/cli/server.py and def ui
def server. Typer derives the command name from the function (app.command()(server)), so
that one rename is the whole behaviour change — same flags, same defaults, same banner, same
/app mount, same one-sentence refusal at exit 1 outside a workspace. tests/cli/test_ui.py
tests/cli/test_server.py so the module keeps telling the truth; its basename is unique
suite-wide, which is required with no __init__.py anywhere.

No alias, per the issue: visionset ui now answers Typer's ordinary
No 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 TokenGate refusal string a user actually reads
("No answer from the server. Is visionset server running?"), and prose that named the command
rather 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 ui never appears
and git grep "visionset ui" reported zero remaining occurrences while the example was still
invoking a command that no longer exists.

# examples/http_end_to_end.py
["visionset", "ui", "--host", HOST, ...]
# tests/packaging/test_wheel.py
[str(binary), "ui", "--workspace", ...]

tests/examples/test_http_end_to_end.py caught it — seven errors at setup, because that suite
starts the real server as a subprocess rather than patching uvicorn.run. The follow-up sweep
was git grep -nwE "ui" over code and config, which also turned up cli/mcp.py's docstring
opening ``ui.py``'s shape exactly. Two things it turned up and I deliberately left:
server/main.py's name="ui" (a Starlette static-mount name) and session.py's
.ui-session filename — neither is the CLI command.

Also caught by hand, since a visionset ui grep does not see them:

  • two docs anchors, cli.md#visionset-uicli.md#visionset-server (docs/api.md, docs/auth.md);
  • three bare `ui` command references in docs/cli.md and two in src/visionset/cli/mcp.py,
    which name the sibling command in prose;
  • two references to tests/cli/test_ui.py, a path that no longer exists (docs/examples.md,
    tests/examples/test_http_end_to_end.py);
  • the two column-aligned blocks (README.md quickstart, docs/cli.md synopsis), realigned —
    server is four characters wider than ui.

Grep

$ git grep -n "visionset ui"
CHANGELOG.md:51:- **`visionset ui` is now `visionset server`** (#329). …
CHANGELOG.md:56:  **There is no alias, and this is a breaking change.** `visionset ui` now fails with Typer's …

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.1b2 is in fact already on PyPI, so the old name did
ship 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) and UI_PREFIX (the /app mount 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 own
    compose/docs blast radius.
  • The banner still prints UI and API http://… and the help text still reads "Serve the API and
    the UI from this workspace." Both name what is served, not the command, so both are still
    accurate — left alone deliberately.
  • docs/ui.md keeps 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.sh exits with
error: node_modules is missing — run 'pnpm install' first rather than skipping, so the
frontend and browser stages do not run until you have installed. Easy to mistake for a pass.

Closes #329

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): rename the server start command from visionset ui to visionset server

1 participant