feat(tui): live status + labeled spinner for delegation (#3101)#3115
Open
aheritier wants to merge 3 commits into
Open
feat(tui): live status + labeled spinner for delegation (#3101)#3115aheritier wants to merge 3 commits into
aheritier wants to merge 3 commits into
Conversation
cce5185 to
e581cc1
Compare
Contributor
Author
|
/review |
The transfer_task card hardcoded ✓, so an in-flight delegation looked finished while the sub-agent was still running. Drive the leading glyph from ToolStatus instead: animate the spinner while Running/Pending, show ✓ on completion and ✗ on error. Keep the icon a single fixed-width glyph (no elapsed-time suffix) so the wrapped task-text indent stays stable across statuses. Refs #3101
While the root agent waited on a sub-agent, the pending spinner showed an anonymous whimsical word with no hint of who was working. Track an agentStack in lockstep with streamDepth (pushed on StreamStarted, popped on StreamStopped, reset alongside streamDepth on cancel/submit) and, for delegated streams only (depth ≥ 2), render the spinner as an animated glyph plus "parent → child" in the child's accent color via a new types.SpinnerLabeled. The normal top-level turn keeps the playful spinner. messages.AddAssistantMessage now takes (sender, label) to carry this context through to the rendered spinner. Refs #3101
a952e37 to
8ed8de7
Compare
|
❌ PR Review Failed — The review agent encountered an error and could not complete the review. View logs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes a single
transfer_taskdelegation legible at a glance. Two focused, presentation-only changes:transfer_taskcard hard-coded a green✓, so an in-flight delegation looked finished while the sub-agent was still running. The leading glyph is now driven byToolStatus: an animated spinner while Running/Pending,✓on completion,✗on error. The icon stays a single fixed-width glyph (no elapsed-time suffix) so the wrapped task-text indent doesn't drift across statuses.root → helperin the child's accent color, via a newtypes.SpinnerLabeled. AnagentStackis tracked in lockstep withstreamDepth. The normal top-level turn keeps the playful spinner.Screenshots
While
rootwaits onhelper: the card animates a spinner and the pending line readsroot → helper. (The sidebarroot ▸ helperbreadcrumb is added in #3102 — the demo was recorded on the full stack.)Tests
pkg/tui/components/tool/transfertask— renderer asserts the spinner/✓/✗ glyph perToolStatus+ a fixed-icon-width invariant.pkg/tui/components/message— labeled spinner renders theparent → childtext and stays spinner-driven (animated, uncached); a bare spinner is unchanged.pkg/tui/page/chat—pendingSpinnerContextdepth logic (0/1/2/3).task build/task lintclean; touched-package tests pass. (Repo-wide, the only failure is the pre-existing, unrelatedpkg/teamloader/TestLoadExamples, a DMR model-pull 416 with nopkg/tuidependency.)Stack
Base of the delegation-readability stack (tracking #3104): #3101 ← #3102 ← #3103. Pure UI/UX; no config/schema changes.
Refs #3101
This is part 2 of 2 in a stack made with GitButler: