feat(subagent): add an active-only toggle collapsing idle topology branches - #381
Open
q862877400-ux wants to merge 1 commit into
Open
feat(subagent): add an active-only toggle collapsing idle topology branches#381q862877400-ux wants to merge 1 commit into
q862877400-ux wants to merge 1 commit into
Conversation
…anches The Subagent page renders the FULL topology of the current tree, which is the right default but gets noisy once one-shot subagents pile up: finished branches keep occupying the page and there was no way to tuck them away short of deleting sessions. Add an "Active only" pill under the main agent card. When pressed, the topology hides every branch without running work: a node stays visible iff it is running or its subtree contains a running descendant (hiding an idle parent must never orphan its running children); diagnostics hide too. Toggling off restores the full tree. The preference is a pure client-side view setting persisted in localStorage (default off), so refreshes keep the chosen posture without touching host state. - subagent-detect: add runningVisibilitySet(byId, rootId) computing that keep-set over the summary mirror (cycle-safe, side threads ignored). - SubagentView: thread the set through RowsProps/CatalogRows, guard visibleEntries (entry.activity === 'running' always passes so a catalog row never lags its own summary flag), render the toggle only when the tree actually has subagents. - locales: new keys shipped across zh/en plus all 19 third-language dictionaries (key parity guarded by tests/locales.spec.ts).
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.
What
任务管理页(Subagent topology)主代理卡片下新增一个「只看活跃 / Active only」胶囊开关。开启后,拓扑隐藏所有没有运行活动的分支:
空闲父链被隐藏不会让运行中的子代理"消失"(祖先链保留);诊断行一并隐藏。关闭即恢复完整拓扑。
Why
一次性子代理大量堆积后,已结束的分支长期占据页面且无法收起。高频派发子代理的工作流里,「只看正在跑的」是最常用的视图需求。
How
unningVisibilitySet(byId, rootId):基于 summary 镜像计算 keep-set(运行中 ∪ 有运行中后代的祖先;环安全、忽略 Side 线程)。
Tests