Skip to content

fix(web): /server/update silently fails — user sees no feedback when git pull or restart aborts #729

@doobidoo

Description

@doobidoo

Observed behavior

User clicks Settings > Server > Update & Restart in the dashboard. Expected: server pulls latest code, installs deps, restarts, dashboard header shows new version. Actual: process keeps running its original version (PID unchanged, _version.py in running code is stale).

Reproduction (production, macOS):

  1. Running HTTP server process started days before a new release
  2. _version.py on disk was already updated to v10.38.2 (via git pull elsewhere)
  3. Clicked Update & Restart in dashboard — saw a progress toast, no error
  4. Dashboard continued displaying v10.36.3 in the header (from the still-running old process)
  5. ps aux confirmed PID unchanged and start-time unchanged (days-old)

Likely causes (one or more)

  1. Uncommitted / conflicting working treegit pull in /server/update may bail silently. git status showed locally modified files (.claude/settings.json, untracked .claude/agents/, config/) at the time.
  2. _restart_server_delayed() execv path failure — in src/mcp_memory_service/web/api/server.py lines 162–187 the execv call's error is logged but never surfaces to the user; HTTP response returns "restart scheduled" regardless.
  3. Auth / network error in update route — if /server/update returns 4xx/5xx, dashboard toast may not make that visible enough.

Desired UX

  • Update endpoint must pre-check git status and refuse (with a clear, user-facing message) when working tree is dirty — or accept --force via explicit dashboard confirmation.
  • Update endpoint must stream / return git pull + pip install stdout/stderr so the dashboard can show them, not just a generic "updating…" toast.
  • Restart endpoint must verify the old process actually exits (health poll after RESTART_DELAY_SECONDS + N) and warn the user if the new process never responds with a different PID / start-time / version.
  • Version badge in dashboard header should auto-poll or refresh after a successful restart so the user sees the new version without a manual hard-reload.

Tangentially related

PR #728 fixes the adjacent UX bug where "Update Available: Checking..." never resolved on its own.

Affected files

  • src/mcp_memory_service/web/api/server.py (/server/update, /server/restart, _restart_server_delayed)
  • src/mcp_memory_service/web/static/app.js (updateAndRestart, restartServer, version badge refresh)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions