feat: Show component versions in UI sidebar with hover details #76

Open
opened 2026-04-07 11:25:17 +00:00 by mahmoud · 2 comments
Owner

Problem

The UI sidebar currently shows a version string (e.g. 0.1.4 (8db0acc)) which is actually the my_hypervisor version, not hero_compute's. There's no way to see which versions of the stack components are running.

Objective

Display the running hero_compute version (with git hash) in the sidebar, and show all component versions on hover.

Requirements

Sidebar version display

  • Show hero_compute <version> (<git_hash>) as the primary version in the sidebar
  • This should come from the running binary's version, not a hardcoded string

Hover tooltip

When hovering over the version, show a tooltip with all component versions:

hero_compute     0.1.6 (abc1234)
my_hypervisor    0.1.4 (8db0acc)
hero_proc        0.4.4
cloud-hypervisor v50.0.0
mycelium         0.7.3

Implementation Notes

Backend (hero_compute_ui/src/server.rs)

  • The existing /version endpoint returns version info — extend it to include all components
  • For each component, shell out to <binary> --version (or version for my_hypervisor) and capture the output
  • Return as structured JSON:
    {
      "hero_compute": "0.1.6 (abc1234)",
      "my_hypervisor": "0.1.4 (8db0acc)",
      "hero_proc": "0.4.4",
      "cloud_hypervisor": "v50.0.0",
      "mycelium": "0.7.3"
    }
    
  • Components not found should show not installed

Frontend (static/js/dashboard.js + templates)

  • Fetch /version on page load
  • Display hero_compute version in the sidebar version area
  • Add a CSS tooltip (or Bootstrap popover) on hover showing all component versions
  • Use monospace font for the tooltip for alignment

Git hash for hero_compute

  • Embed the git hash at compile time using env!("GIT_HASH") or a build.rs that captures git rev-parse --short HEAD
  • The workspace currently doesn't have this — needs to be added

Acceptance Criteria

  • Sidebar shows hero_compute 0.1.x (hash)
  • Hover tooltip shows versions of: hero_compute, my_hypervisor, hero_proc, cloud-hypervisor, mycelium
  • Missing components show not installed
  • Version info updates on page refresh
## Problem The UI sidebar currently shows a version string (e.g. `0.1.4 (8db0acc)`) which is actually the my_hypervisor version, not hero_compute's. There's no way to see which versions of the stack components are running. ## Objective Display the running hero_compute version (with git hash) in the sidebar, and show all component versions on hover. ## Requirements ### Sidebar version display - Show `hero_compute <version> (<git_hash>)` as the primary version in the sidebar - This should come from the running binary's version, not a hardcoded string ### Hover tooltip When hovering over the version, show a tooltip with all component versions: ``` hero_compute 0.1.6 (abc1234) my_hypervisor 0.1.4 (8db0acc) hero_proc 0.4.4 cloud-hypervisor v50.0.0 mycelium 0.7.3 ``` ## Implementation Notes ### Backend (`hero_compute_ui/src/server.rs`) - The existing `/version` endpoint returns version info — extend it to include all components - For each component, shell out to `<binary> --version` (or `version` for my_hypervisor) and capture the output - Return as structured JSON: ```json { "hero_compute": "0.1.6 (abc1234)", "my_hypervisor": "0.1.4 (8db0acc)", "hero_proc": "0.4.4", "cloud_hypervisor": "v50.0.0", "mycelium": "0.7.3" } ``` - Components not found should show `not installed` ### Frontend (`static/js/dashboard.js` + templates) - Fetch `/version` on page load - Display `hero_compute` version in the sidebar version area - Add a CSS tooltip (or Bootstrap popover) on hover showing all component versions - Use monospace font for the tooltip for alignment ### Git hash for hero_compute - Embed the git hash at compile time using `env!("GIT_HASH")` or a `build.rs` that captures `git rev-parse --short HEAD` - The workspace currently doesn't have this — needs to be added ## Acceptance Criteria - [ ] Sidebar shows `hero_compute 0.1.x (hash)` - [ ] Hover tooltip shows versions of: hero_compute, my_hypervisor, hero_proc, cloud-hypervisor, mycelium - [ ] Missing components show `not installed` - [ ] Version info updates on page refresh
Member

#81

image

https://forge.ourworld.tf/lhumina_code/hero_compute/pulls/81 ![image](/attachments/d8a523e8-c1aa-4489-9e8d-f659f778af6e)
Author
Owner

Lets use the central config since it has all versions

Lets use the central config since it has all versions
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_compute#76
No description provided.