fix(ui): reset War Room to idle when a hunt is declined or aborted#63
fix(ui): reset War Room to idle when a hunt is declined or aborted#63psigho wants to merge 2 commits into
Conversation
|
Looks good — this fixes a real stuck-button bug. |
A declined-approval hunt ("hunt not started") — or the red-X abort — left the
War Room stuck advertising an active run: the ENGAGE button stayed on the
"ENGAGING…" spinner (disabled), the LIVE fidelity banner kept claiming "real
tools probing the target", and the narration rail kept showing "Looking at your
target". completeMission() only toggled the button's display, never restoring
its label/disabled/opacity, and never cleared the fidelity banner or narration
rail; abortMission() had the same gap and no-op'd entirely when nothing was
"running" (so the red X did nothing on a declined hunt).
Add resetEngageUI(): restores the ENGAGE button (▶ ENGAGE, enabled) and clears
the fidelity banner (setFidelity('off')) + narration rail. Route both
completeMission() and abortMission() through it, and let the red X clear a
leftover engaging/probing UI even when missionRunning is already false.
Client-side only; no behavior change to an actually-running mission.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review nit: the idle-abort branch set cmdMissionName='STANDBY' but left
cmdMissionStatus unchanged, so after an approval-declined the header could read
STANDBY with a stale red "approval declined" line beneath it. Reset the
substatus to the initial idle state ("Awaiting orders", #666) too.
Verified: abort after a decline now shows STANDBY / "Awaiting orders" (grey).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
8cbf278 to
d43c405
Compare
jmagly
left a comment
There was a problem hiding this comment.
Re-reviewed current head d43c405. The follow-up commit clears the stale idle substatus in the red-X/no-running-mission path, so the previous nit is addressed.
This patch is scoped to the War Room UI reset paths and does the right thing: completeMission() restores the ENGAGE button and clears the fidelity/narration indicators, while abortMission() can now clean up leftover UI even when missionRunning is already false after a declined hunt. I also extracted the inline scripts from docs/index.html and ran node --check; no syntax errors found.
Approved.
What
A declined-approval hunt ("hunt not started") — or hitting the red-X abort — left the War Room stuck advertising an active run:
ENGAGING…spinner and disabled,Nothing was actually running (the hunt never started), so this was a purely cosmetic-but-alarming stuck state.
Why
completeMission()only toggled the button'sdisplay, never restoring its label /disabled/opacity, and never cleared the fidelity banner or narration rail.abortMission()had the same gap and no-op'd entirely whenmissionRunningwas alreadyfalse— so the red X did nothing after a declined hunt.Fix
Add
resetEngageUI()— restores the ENGAGE button (▶ ENGAGE, enabled) and clears the fidelity banner (setFidelity('off')) + narration rail. Route bothcompleteMission()andabortMission()through it, and let the red X clear a leftover engaging/probing UI even whenmissionRunningis alreadyfalse.Client-side only (
docs/index.html); no behavior change to an actually-running mission. Verified by simulating the stuck state and confirming both the decline and abort paths reset the button, banner, and rail.