Skip to content

fix(ui): reset War Room to idle when a hunt is declined or aborted#63

Open
psigho wants to merge 2 commits into
elder-plinius:mainfrom
psigho:fix/mission-reset-on-decline
Open

fix(ui): reset War Room to idle when a hunt is declined or aborted#63
psigho wants to merge 2 commits into
elder-plinius:mainfrom
psigho:fix/mission-reset-on-decline

Conversation

@psigho

@psigho psigho commented Jul 9, 2026

Copy link
Copy Markdown

What

A declined-approval hunt ("hunt not started") — or hitting the red-X abort — left the War Room stuck advertising an active run:

  • the ENGAGE button stayed on the ENGAGING… spinner and disabled,
  • the LIVE fidelity banner kept claiming "real tools probing the target",
  • the narration rail kept showing "Looking at your target — finding the attack surface".

Nothing was actually running (the hunt never started), so this was a purely cosmetic-but-alarming stuck state.

Why

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 missionRunning was already false — 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 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 (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.

@jmagly

jmagly commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Looks good — this fixes a real stuck-button bug. startMissionFromDashboard sets ENGAGE to a disabled ENGAGING… spinner with no finally, so the decline path (completeMission('approval declined')) left it stuck; resetEngageUI() restores it and correctly covers both the decline and abort paths without touching timers or missionRunning. One cosmetic nit: the new abort-idle branch sets cmdMissionName='STANDBY' but leaves cmdMissionStatus unchanged, so the header can read STANDBY with a stale red "approval declined" substatus — worth clearing that too. Non-blocking.

psigho and others added 2 commits July 10, 2026 05:06
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>
@psigho psigho force-pushed the fix/mission-reset-on-decline branch from 8cbf278 to d43c405 Compare July 10, 2026 00:07

@jmagly jmagly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants