[Bug]: Agents panel opens at the oldest subagent on every thread switch, never the newest
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 66/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
从 apps/web/src/components/AgentsPanel.tsx 开始,检查线程或标签页变化时 ScrollArea 的挂载方式。查看 packages/client-runtime/src/state/subagentRuntime.ts,确认列表顺序。实现商定的初始位置行为,使新打开的 Agents 面板显示最新的 agent。然后使用包含许多 subagents 的线程进行验证,并按照 CONTRIBUTING.md 的要求截取更改前后的屏幕截图。
由索引模型根据 Issue 内容生成。
描述
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Open a thread that has spawned many subagents. 20+ makes it obvious; I routinely have tens per thread.
- Open the right panel's Agents tab. The roster renders oldest-first, so the newest agent is at the very bottom.
- Scroll to the bottom to see the agent that is actually running.
- Switch to another thread and switch back. The same thing happens when switching the right panel to Files and back, or hiding and showing the right panel.
- Look at the Agents roster.
Expected behavior
Opening the Agents panel should land on the newest subagent, at the bottom of the list, because that is the one doing work right now. The oldest agent in a 30-agent roster finished twenty minutes ago and is the least useful thing to show.
A per-thread restored position would be an acceptable alternative for threads I have already visited, but a thread opened for the first time should still start at the newest agent rather than the oldest.
Actual behavior
The roster always mounts at the top, showing the oldest subagent. Every thread switch costs a manual scroll to the bottom to find the live agent. With tens of agents per thread this is constant friction.
Two things combine to produce it on current main:
- The roster is sorted oldest-first.
packages/client-runtime/src/state/subagentRuntime.ts:853sortsdirectAgentsby ascendingfirstSeenAt; workflow members sort by phase index thenagentIndex(same file, lines 784-824). The newest agent is always last. - The panel has no scroll handling at all.
apps/web/src/components/AgentsPanel.tsx:548renders a bareScrollAreawith no initial offset, no bottom anchoring, and no restoration across remounts, so it mounts atscrollTop: 0every time.
Impact
Minor bug or occasional failure
Version or commit
main @ e67abcf798f8
Environment
macOS
Logs or stack traces
Workaround
Scroll to the bottom of the Agents panel by hand after every thread switch.
Prior art, please read before marking this a duplicate
Three PRs have attempted the neighbouring problem, all closed unmerged:
- #9637 and #14512 were closed for incomplete UI verification, specifically a missing before capture.
- #14525 was closed as part of the orchestrator V2 transition (#2829), with the explicit note: "We're closing the current implementation without assuming the underlying request is resolved." That closure also said V2 removed
AgentsPanel.tsx; the file is present on currentmain, so whatever V2 did, the panel is back and still has no scroll handling.
All three solved scroll preservation, restoring the offset you last had on that thread. This issue is a different ask: land on the newest agent, including on a thread opened for the first time, where there is no saved offset to restore. The two could ship together, but preservation alone would not fix this.
Related but distinct: #8759 (right tabs should persist state and scroll position, generic, filed against the diff tab), #11571 (diff tab loses scroll position on thread switch), #17751 (Agents panel horizontal overflow, different axis).
Happy to contribute
I'm glad to pick this up and open the PR if a maintainer confirms the direction, in particular whether you want plain bottom-anchoring on mount or bottom-anchoring plus per-thread position restore. Given that two of the three prior PRs died on verification evidence rather than on the code, I'd rather agree the behavior first and then come with before/after captures that match CONTRIBUTING.md.
- 主要语言
- TypeScript
- 星标
- 24.8k
- 派生
- 6.4k
- 平均合并
- 1 小时 22 分钟
- 30 天内合并 PR
- 18
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
MCP endpoint matches the Authorization scheme case-sensitively and logs the same reason for "absent" and "wrong scheme" (ChatGPT connector gets missing_bearer_token)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug needs-triage
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
[Bug]: OpenCode steer drops the thread's `agent` (and `variant`), so steered messages run on opencode's default_agent可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 74/100
pingdotgg/t3code#23175 · 2 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
area:agent-view area:tui bug platform:macos
难度 2/5 1-3 小时 新手友好度 70/100
anthropics/claude-code#104558 ·
维护者通常 1 天内回复
-
updater
难度 2/5 1-3 小时 新手友好度 68/100
UniversityOfHelsinkiCS/oodikone#5141 ·
-
maintanance
难度 2/5 1-3 小时 新手友好度 74/100
inmanta/web-console#7606 ·
维护者通常 1 天内回复
-
bug skills
难度 2/5 1-3 小时 新手友好度 77/100
equinor/fusion-framework#5846 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 74/100