hermes-agent/scripts
Teknium 952f44f841 fix(desktop): focus the update progress window, then hand focus to the relaunched Desktop
Two focus polish items from the first fully-working hand-off run
(ryanc, 2026-08-09):

1. The progress window came up backgrounded: the script is spawned via
   `cmd start /min`, and Form.Show() + TopMost keeps it above other
   windows without ACTIVATING it. Claim activation explicitly
   (Form.Activate + SetForegroundWindow) right after Show.

2. The relaunched Desktop came up behind whatever the user had focused:
   a WMI-spawned process starts unfocused and cannot take foreground by
   itself. Since the hand-off owns foreground while its progress window
   is up, delegate it: AllowSetForegroundWindow(new pid), poll up to 20s
   for Electron's MainWindowHandle, then ShowWindow(SW_RESTORE) +
   SetForegroundWindow. Best-effort at every step -- a focus failure
   never affects the update result.

Sequence on success: progress window foreground during the update ->
window closes -> freshly relaunched Hermes.exe takes foreground.

Verified live on the incident machine: Add-Type shim compiles under
PS 5.1; WMI spawn + AllowSetForegroundWindow + MainWindowHandle poll +
ShowWindow all execute against a real spawned window. (In the bg test
shell SetForegroundWindow returns False by OS design -- only the
current foreground owner may delegate; the real flow's TopMost progress
window IS that owner.) PS parse clean, check-windows-footguns clean.
2026-08-09 02:01:57 -07:00
..
ci
lib
observability
sandbox
tests
toolperf_abeval
whatsapp-bridge fix(deps): patch 31 known CVEs across Python and npm lockfiles 2026-08-08 14:06:48 -07:00
LIVETEST_README.md
add_contributor.py
analyze_livetest.py
audit_pr_attribution.py
benchmark_browser_eval.py
build_model_catalog.py
build_skills_index.py
capture-cage-terminal.sh
check-windows-footguns.py
check_subprocess_stdin.py
contributor_audit.py
desktop-update.ps1 fix(desktop): focus the update progress window, then hand focus to the relaunched Desktop 2026-08-09 02:01:57 -07:00
dev-sandbox.sh
discord-voice-doctor.py
docker_config_migrate.py
docker_rebootstrap_nous_session.py
generate_conformance_vectors.py
hermes-gateway
install.cmd
install.ps1 fix(install): replay npm's debug log into the bootstrap stream on failure 2026-08-08 22:55:00 -07:00
install.sh
install_psutil_android.py
iso-certify.py
keystroke_diagnostic.py
kill_modal.sh
lint_diff.py
micro_compaction_report.py
profile-tui.py
release.py
run_tests.sh
run_tests_parallel.py
sample_and_compress.py
smoke_nemo_relay_shared_metrics.py
tool_search_livetest.py
tool_search_livetest2.py
tool_search_livetest_ue.py
tool_search_livetest_ue_disc.py
tool_search_livetest_ue_hard.py