Skip to content

fix(hal): spinner for Doctor and Fix plan - #304

Merged
MCamner merged 1 commit into
mainfrom
fix/hal-fix-plan-spinner
Nov 13, 2026
Merged

MCamner merged 1 commit into
mainfrom
fix/hal-fix-plan-spinner

Conversation

@MCamner

@MCamner MCamner commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • HAL menu rows 6. Doctor and 7. Fix plan sat silent for 8–9 s (measured: first byte at 8.4 s and 9.3 s) while mq-hal built the report.
  • Both now run through _hal_run_wait, which uses the shared ui_spinner. The report is captured and printed once the spinner has cleared its line. Streamed instead, its first line would land after the spinner's label, the case _run_agent_menu_passthrough in the agent menu warns about.
  • Capturing is safe for these two commands: they print plain text, don't depend on a tty and read no stdin. The exit status is returned unchanged.
  • Without ui_spinner (a standalone menu without mq-ui), the command runs as before.

The other front-menu rows are also silent until done (brief ~2 s, release readiness ~3.4 s, CI ~0.8 s) and are left as they are.

Test plan

  • tests/hal-menu-smoke.sh step 13, written failing first: both arms use the wrapper. Under a pty with a fake mq-hal, the spinner label is drawn, the report starts on its own line, the body is kept, and exit status 3 comes back.
  • Live under a pty with the real mq-hal fix-doctor in bash and zsh: 112/130 spinner frames, the report starts on a cleared line, rc 0
  • shellcheck on the menu and the smoke
  • ./release-check.sh passes all checks

🤖 Generated with Claude Code

mq-hal doctor-summary and fix-doctor print nothing for 8-9 s and then
the whole report. The two rows now run behind ui_spinner. The report
is captured and printed after the spinner clears its row; streamed, its
first line landed after the spinner's label. Both commands print plain
text and read no stdin, so capturing changes nothing else. The exit
status is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MCamner
MCamner force-pushed the fix/hal-fix-plan-spinner branch from 6b6bdd6 to 4e7d970 Compare November 13, 2026 12:43
@MCamner
MCamner merged commit c102826 into main Nov 13, 2026
3 checks passed
@MCamner
MCamner deleted the fix/hal-fix-plan-spinner branch November 13, 2026 15:46
@MCamner MCamner mentioned this pull request Nov 16, 2026
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.

1 participant