Skip to content

fix(frontend): Version state not updating after auto-update restart #73

@sagarsrc

Description

@sagarsrc

Bug Description

After clicking "Update" and server successfully restarts with new version, the frontend notification still shows the old version (e.g., "v0.2.1 → v0.2.2") instead of either:

  1. Showing "Updated to v0.2.2!" toast
  2. Hiding the notification (since update_available is now false)

Steps to Reproduce

  1. Install older version: uvx quickcall-supertrace@0.2.1
  2. Open UI - see update notification "v0.2.1 → v0.2.2"
  3. Click "Update" button
  4. Wait for "Installing..." → "Restarting..." states
  5. Server comes back (verified via curl /api/version returns 0.2.2)
  6. Bug: Notification still shows "v0.2.1 → v0.2.2"
  7. Manual page refresh fixes it (notification disappears)

Expected Behavior

After server comes back:

  1. Show "Updated to v0.2.2!" toast for 5 seconds
  2. checkVersion() runs and updates versionInfo state
  3. Notification hides (since update_available: false)

Actual Behavior

  • "Restarting..." state clears but old version info remains displayed
  • checkVersion() either doesn't run or state doesn't update
  • Requires manual refresh to see correct state

Technical Details

File: packages/web/src/hooks/useVersionCheck.ts

The issue is in pollHealth function (lines 106-129):

if (healthResponse.ok) {
  setUpdateState({ status: 'idle', message: `Updated to v${data.new_version}!` });
  await checkVersion();  // <-- This should update versionInfo state
  // ...
}

Possible causes:

  • Race condition between state updates
  • checkVersion() failing silently
  • React state not triggering re-render

Environment

  • Version: 0.2.1 → 0.2.2
  • Install method: uvx
  • Browser: (any)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfrontend

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions