mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-14 09:27:41 +00:00
## Summary Bake the frontend git commit hash into the build so it no longer needs to be fetched from the server via `/api/system_stats`. ## Changes - **What**: Add `__COMFYUI_FRONTEND_COMMIT__` build-time constant (via Vite `define`) sourced from `git rev-parse HEAD` at build time. Falls back to `"unknown"` if git is unavailable. `SystemStatsPanel` uses this baked-in value for the "Frontend Version" row in cloud mode instead of the server-provided `comfyui_frontend_version` field. ## Testing Confirmed to display the actual commit. <img width="1448" height="908" alt="Screenshot 2026-03-12 at 7 09 52 PM" src="https://github.com/user-attachments/assets/2b42348a-5c3e-4509-aa84-1a259bba5f3f" /> ## Review Focus - The `getDisplayValue` override for `comfyui_frontend_version` — cleanest way to swap the data source without restructuring the column system. - No cloud-side changes needed: the `sync-frontend-build` workflow already checks out the frontend repo at the exact commit ref, so `git rev-parse HEAD` returns the correct hash.
19 KiB
19 KiB