feat(desktop): wire new HTML HUD into FaceWindow + auto-open shortcut support - #546
Draft
andresnunes1404 wants to merge 4 commits into
Draft
feat(desktop): wire new HTML HUD into FaceWindow + auto-open shortcut support#546andresnunes1404 wants to merge 4 commits into
andresnunes1404 wants to merge 4 commits into
Conversation
Adds a JARVIS_SHOW_HUD env var (mirroring JARVIS_VOICE_DEBUG) that makes the tray auto-show the face window on launch, plus a --hud flag on run_desktop_app.bat, so a desktop shortcut can open Jarvis straight into the HUD.
cmd.exe's %~dp0 stops reflecting the script's own folder once a `shift` has executed in the same invocation, silently resolving PROJECT_ROOT against the current directory instead. This broke run_desktop_app.bat whenever any argument (--voice-debug, --hud) was passed from a working directory other than the script's own folder, e.g. from a desktop shortcut. Resolve PROJECT_ROOT from %~dp0 at the very top, before the arg-parsing loop's `shift` runs.
face_hud.html ("Jarvis HUD v6.4") existed in desktop_assets but nothing
loaded it, so the tray's Face window still showed the old painted
LowPolyFaceWidget. Adds HudFaceWindow, which hosts face_hud.html in a
QWebEngineView and drives its existing JS hooks:
- window.setJarvisState(state): polls the real JarvisStateManager
(cross-process via its state file) every 300ms and forwards changes
- window.addJarvisLogLine(line): connected to the same log_signals
stream the LogViewerWindow already receives from the daemon, so the
HUD's "REGISTO DO SISTEMA" panel shows genuine debug_log lines
Falls back to the original LowPolyFaceWidget when QtWebEngine isn't
available. window.playJarvisAudio (audio-reactive visualization) is
left unwired for now - it needs new cross-process IPC to ship TTS
audio from the daemon subprocess to the desktop app, which is a
separate, larger piece of work.
Manually verified: launched the desktop app and confirmed the HUD
renders with live state ("EM ESPERA"/idle) and real log lines flowing
into the core log panel.
isair
force-pushed
the
develop
branch
2 times, most recently
from
July 26, 2026 20:17
075622a to
2d40388
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
desktop_assets/face_hud.html("Jarvis HUD v6.4") existed in the repo but nothing loaded it — the tray's Face window still showed the old paintedLowPolyFaceWidget. AddsHudFaceWindow(src/desktop_app/hud_window.py), which hostsface_hud.htmlin aQWebEngineViewand drives its existing JS hooks with real data:window.setJarvisState(state)— polled from the realJarvisStateManagerevery 300ms (polling, not just the Qt signal, because in dev mode the daemon is a separate process and only shares state via its cross-process state file)window.addJarvisLogLine(line)— wired to the samelog_signals.new_logstreamLogViewerWindowalready gets from the daemon, so the HUD's "REGISTO DO SISTEMA" panel shows genuinedebug_loglineswindow.playJarvisAudio(audio-reactive visualization) is left unwired — needs new cross-process IPC to ship TTS audio from the daemon subprocess to the desktop app, a separate larger piece of workLowPolyFaceWidgetwhen QtWebEngine isn't availableJARVIS_SHOW_HUD=1env var (mirrorsJARVIS_VOICE_DEBUG) makes the tray auto-open the HUD right after the tray icon shows. Exposed as--hudonscripts/run_desktop_app.bat, so a desktop shortcut can launch straight into it.run_desktop_app.batresolvedPROJECT_ROOTfrom%~dp0after the argument-parsing loop'sshifthad already run. cmd.exe's%~dp0stops reflecting the script's own folder once anyshifthas executed in the same invocation, so passing any flag (--voice-debug, or the new--hud) from a different working directory (e.g. a desktop shortcut) silently resolved the wrong project root and failed with "Mamba environment not found". Fixed by resolvingPROJECT_ROOTat the very top of the script, before anyshift.HudFaceWindowindesktop_app.spec.md.Test plan
pytest tests/test_desktop_app.py tests/test_face_widget.py tests/test_hud_window.py -q(83 passed)TestShouldShowHudOnStartupcovers theJARVIS_SHOW_HUDenv var gateTestPollState/TestAddLogLine/TestNoWebEngineFallbackcoverHudFaceWindow's JS-call construction and escaping