Skip to content

fix(ui): show one spinner throughout live turns - #3350

Open
Colafornia wants to merge 1 commit into
apache:mainfrom
Colafornia:fix/single-live-turn-spinner
Open

fix(ui): show one spinner throughout live turns#3350
Colafornia wants to merge 1 commit into
apache:mainfrom
Colafornia:fix/single-live-turn-spinner

Conversation

@Colafornia

@Colafornia Colafornia commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

During a live turn, a completed tool row could appear above the working status while no animated indicator showed that output was still in progress.

The expected behavior is one active spinner—not zero or two—throughout a live turn.

Live-turn phase Tool row Turn status Spinner owner
The model works before or between tool calls No running tool Shows the working phrase, elapsed time, and spinner Turn status
A tool call runs Shows its running state and spinner Keeps the working phrase and elapsed time Tool row
The tool settles and the model continues Shows its completed state Resumes the spinner with the working phrase and elapsed time Turn status

When the turn reaches a terminal state, the running status disappears and no spinner remains.

The previous implementation removed the spinner from TurnRunningStatus to prevent duplicate animation during tool calls. This also removed the only animated indicator between tool calls.

This change detects in-flight tools with the shared isInFlightToolStatus helper. The turn status renders the existing Astryx Spinner only when no tool owns the active spinner.

The working copy, elapsed timer, timeline folding, and tool-row behavior remain unchanged. The spinner is decorative for assistive technology, while the status row keeps its accessible name.

Before After
image image

Verification

  • npm --workspace @maka/ui test — 184 tests passed
  • The new regression test failed before the production change and passed after it
  • git diff --cached --check — passed
  • Real-window visual verification was not run

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex diagnosed the missing activity state, implemented conditional spinner ownership, added regression coverage, and drafted this pull request.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated Codex review on exact head e0c7eeadaefb5f2a243a0381663041b33ff3d2c2.

The product fix is first-principles and appropriately small: current main removed the turn-status spinner to avoid duplication during an active tool, which also left the before/between-tool phases with no spinner. Computing ownership from the existing isInFlightToolStatus contract restores exactly one spinner, and the focused test protects the running-tool → status-off / completed-tool → status-on transition.

There is one deterministic merge blocker: the required test check fails because adding Astryx Spinner to packages/ui/src/chat-turn.tsx changes the generated surface inventory, but docs/astryx-surface-file-inventory.md was not refreshed. This is not fixed merely by rebasing: run npm run astryx:surface-inventory:write, commit the generated inventory update, and let required CI rerun.

Required conclusions:

  1. Optimal for the actual problem: yes.
  2. Production code to delete: none identified.
  3. Tests to delete/replace: none identified.
  4. Deeper refactor: no; the existing tool-status source of truth is the right boundary.
  5. Ready to merge: no; required test is red and independent human review is missing.
  6. Residual risk/gaps: refresh the generated inventory; the UI behavior is material enough that the supplied before/after evidence and independent human judgment remain the acceptance boundary.

No security, licensing, release, governance, or public-contract effect was identified; this is a user-visible UI behavior change and therefore still requires independent human review under CONTRIBUTING.md.

@Colafornia
Colafornia force-pushed the fix/single-live-turn-spinner branch from e0c7eea to cccfa9b Compare August 21, 2026 01:44
@Colafornia

Copy link
Copy Markdown
Contributor Author

@jackwener Thanks for the review. I’ve refreshed and committed the Astryx surface inventory. The inventory check and all 184 UI tests now pass locally.

@hqhq1025 hqhq1025 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.

The current revision was reviewed completely and the focused local verification passed, but the current CI run concluded action_required with no jobs, so the required test check has not passed and this revision cannot be approved yet.

Codex-assisted review performed under the maintainer-approved review workflow.

Comment thread packages/ui/src/chat-turn.tsx Outdated

@hqhq1025 hqhq1025 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-review of the current head found no remaining actionable defect; the prior collapsed parallel-tool spinner finding is resolved. Exact-head root build, 185 UI tests, repository lint and format checks, Astryx inventory validation, and the current-main merge tree all passed. GitHub Actions run 32439079216 concluded action_required with zero jobs, so CI has not executed on this revision and I cannot approve it yet.

Codex-assisted review performed under the maintainer-approved review workflow.

@Colafornia
Colafornia marked this pull request as draft August 21, 2026 02:31
@Colafornia
Colafornia marked this pull request as ready for review August 21, 2026 02:32
@Colafornia
Colafornia marked this pull request as draft August 21, 2026 02:51
@Colafornia
Colafornia force-pushed the fix/single-live-turn-spinner branch from 9fc27ba to 04f917b Compare August 21, 2026 05:01
Hand spinner ownership between visible running tools and the turn status so live output keeps an activity indicator.

Generated-by: Codex
@Colafornia
Colafornia force-pushed the fix/single-live-turn-spinner branch from 04f917b to a74a272 Compare August 21, 2026 05:14
@Colafornia
Colafornia marked this pull request as ready for review August 21, 2026 05:14
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.

3 participants