fix(desktop): stop spinning animation on archived in_progress todo items - #42666
fix(desktop): stop spinning animation on archived in_progress todo items#42666liuhao1024 wants to merge 1 commit into
Conversation
When an assistant turn completes, the hoisted todo panel could still show a spinning Loader2Icon for archived in_progress items, making the completed session appear stuck. Add an isLive prop to HoistedTodoPanel that controls whether in_progress items render with animate-spin (live) or a static dot (archived). Thread passes messageStatus === 'running' so the panel distinguishes streaming from completed state. Fixes NousResearch#42662
The composer status stack rendered in_progress todo items with a live spinner regardless of whether the owning assistant turn was still running. After turn completion, archived in_progress rows looked like active execution — the root cause of NousResearch#42662. Changes: - Add isLive flag to ComposerStatusItem, derived from $workingSessionIds - When isLive=false and todoStatus=in_progress: static dot instead of animated spinner, dimmer opacity (70% vs 100%) - When isLive=true: spinner as before - Non-todo items (background, subagent) unaffected Ported semantics from PR NousResearch#42666 (todo-tool.tsx HoistedTodoPanel) to the current status-stack architecture where todo rendering moved in NousResearch#44630. Tests: 4 new tests for isLive transitions (live→archived, non-todo unset). All 12 composer-status tests pass. All 9 todo store/lib tests pass. TypeScript clean compile.
|
The single CI failure on this PR ( The test acknowledges sibling-shard leakage in its own comments (lines 5176-5183) — a prior 247 other tests in that slice passed. The PR only touches 3 files in A maintainer can unblock this by:
cc @teknium1 @brooklyn @kshitijk4poor — this is a small Desktop-only fix for #42662 that has been sitting unreviewed for 2 weeks. The only red check is a pre-existing flaky test. Would one of you be able to take a look? |
Closing — code refactoredThe files touched by this PR have been significantly refactored:
New architectureTodos now render through the composer status stack (
Bug may persist in new codeThe underlying issue (spinning animation on
Closing this PR as the original changes are no longer applicable to the current codebase. |
Problem
After an assistant turn completes in Desktop, the hoisted todo card still renders archived
in_progressitems with a spinningLoader2Icon, making the completed session appear stuck.The backend correctly preserves the final todo snapshot (including unfinished items), but the Desktop renderer treats all
in_progressitems as if they were actively streaming.Fixes #42662
Solution
Add an
isLiveprop toHoistedTodoPanel(and its internalCheckmarkcomponent) that distinguishes between live streaming and archived states:isLive=true, message is running):in_progressitems render withanimate-spinLoader2Icon at full opacity — unchanged behaviorisLive=false, message completed):in_progressitems render with a static dot at 70% opacity — clearly shows incomplete but not "running"thread.tsxpassesisLive={messageStatus === 'running'}toHoistedTodoPanel.Files Changed
apps/desktop/src/components/assistant-ui/todo-tool.tsxisLiveprop toCheckmarkandHoistedTodoPanel; render static dot when archivedapps/desktop/src/components/assistant-ui/thread.tsxisLive={messageStatus === 'running'}toHoistedTodoPanelapps/desktop/src/components/assistant-ui/streaming.test.tsxin_progressshows static dot, live shows spinnerTesting
All existing todo tests continue to pass. No type errors in modified files.
Screenshots
in_progressrow spins indefinitely after turn endsin_progressrow shows muted static dot