update: show node component versions in UI sidebar with hover details #81

Open
nabil_salah wants to merge 4 commits from development_show_node_versions into development
Member

Summary

  • Backend /version endpoint returns structured JSON with all 5 component versions (hero_compute, my_hypervisor, hero_proc, cloud-hypervisor, mycelium)
  • hero_compute uses compile-time version + git hash from build.rs environment variables
  • External components queried via shell commands with 5s timeouts; missing binaries display "not installed"
  • Frontend: sidebar displays hero_compute version with git hash; hover shows all components in monospace tooltip format

Changes

  • crates/hero_compute_ui/build.rs: Embed GIT_HASH at compile time
  • crates/hero_compute_ui/src/server.rs: Refactor version_handler to return structured component data
  • crates/hero_compute_ui/static/js/dashboard.js: Update version fetch and build component tooltip

Test plan

  • Verify sidebar displays correct hero_compute version with git hash
  • Verify tooltip shows all 5 component versions on hover
  • Verify "not installed" displays for missing binaries
  • Verify version info refreshes on page reload

Resolves #76

image

## Summary - Backend `/version` endpoint returns structured JSON with all 5 component versions (hero_compute, my_hypervisor, hero_proc, cloud-hypervisor, mycelium) - hero_compute uses compile-time version + git hash from build.rs environment variables - External components queried via shell commands with 5s timeouts; missing binaries display "not installed" - Frontend: sidebar displays hero_compute version with git hash; hover shows all components in monospace tooltip format ## Changes - `crates/hero_compute_ui/build.rs`: Embed GIT_HASH at compile time - `crates/hero_compute_ui/src/server.rs`: Refactor version_handler to return structured component data - `crates/hero_compute_ui/static/js/dashboard.js`: Update version fetch and build component tooltip ## Test plan - [x] Verify sidebar displays correct hero_compute version with git hash - [x] Verify tooltip shows all 5 component versions on hover - [x] Verify "not installed" displays for missing binaries - [x] Verify version info refreshes on page reload Resolves #76 ![image](/attachments/ea6a4177-6bf0-4ee5-bdf5-a303ae79b785)
fix(configure): handle Ubuntu 22 virtiofsd setup and complete issue #62
All checks were successful
Test / test (push) Successful in 1m27s
Test / test (pull_request) Successful in 1m49s
b13dfb0451
- Complete issue #62 by making configure.sh install qemu fallback packages and ensure virtiofsd is available in PATH via symlink check/warn flow.

This commit is the second part of the fix.
The first part was done in:
a711a138b2

Signed-off-by: Nabil-Salah <nabil.salah203@gmail.com>
feat(ui): display component versions in sidebar with hover tooltip
All checks were successful
Test / test (push) Successful in 1m24s
Test / test (pull_request) Successful in 1m48s
7ec370bffd
- Backend: /version endpoint returns structured JSON with all 5 component versions
  (hero_compute, my_hypervisor, hero_proc, cloud-hypervisor, mycelium)
- hero_compute uses compile-time version + git hash (env!() macros)
- External components queried via shell commands with 5s timeout
- Missing binaries display "not installed"
- Frontend: sidebar shows hero_compute version, hover shows all components
- Closes #76

Signed-off-by: Nabil-Salah <nabil.salah203@gmail.com>
Owner

Good job, I think it might be better if we used a UI card that displays on hover instead of using the element title property, for example, see the status on the navbar

Good job, I think it might be better if we used a UI card that displays on hover instead of using the element title property, for example, see the status on the navbar
SKILL.md Outdated
@ -0,0 +1,1032 @@
---
Owner

This file should not be committed

This file should not be committed
@ -1,4 +1,17 @@
fn main() {
// Embed git hash at compile time so it works in production (no .git dir).
let git_hash = std::process::Command::new("git")
Owner

Let's use a better way, i would suggest that we remove the hash since we already have the release version

Let's use a better way, i would suggest that we remove the hash since we already have the release version
refactor: remove hash viewing and use a UI card that displays on hover
All checks were successful
Test / test (pull_request) Successful in 1m24s
Test / test (push) Successful in 1m56s
bfbab6c9dc
Signed-off-by: Nabil-Salah <nabil.salah203@gmail.com>
fix: overlay components
All checks were successful
Test / test (pull_request) Successful in 3m15s
Test / test (push) Successful in 3m16s
2bcb414af7
Signed-off-by: Nabil-Salah <nabil.salah203@gmail.com>
nabil_salah force-pushed development_show_node_versions from 2bcb414af7
All checks were successful
Test / test (pull_request) Successful in 3m15s
Test / test (push) Successful in 3m16s
to 785fbe3212
All checks were successful
Test / test (push) Successful in 2m25s
Test / test (pull_request) Successful in 2m26s
2026-04-08 10:25:22 +00:00
Compare
Owner

As we now have the central config, i would recommend that we use it to get the versions, no need for the hash

As we now have the central config, i would recommend that we use it to get the versions, no need for the hash
feat: use central config to fetch versions and remove: version handler
Some checks failed
Test / test (pull_request) Failing after 1m19s
Test / test (push) Failing after 1m45s
0e960f8218
Signed-off-by: Nabil-Salah <nabil.salah203@gmail.com>
Some checks failed
Test / test (pull_request) Failing after 1m19s
Test / test (push) Failing after 1m45s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin development_show_node_versions:development_show_node_versions
git switch development_show_node_versions

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch development
git merge --no-ff development_show_node_versions
git switch development_show_node_versions
git rebase development
git switch development
git merge --ff-only development_show_node_versions
git switch development_show_node_versions
git rebase development
git switch development
git merge --no-ff development_show_node_versions
git switch development
git merge --squash development_show_node_versions
git switch development
git merge --ff-only development_show_node_versions
git switch development
git merge development_show_node_versions
git push origin development
Sign in to join this conversation.
No reviewers
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!81
No description provided.