Skip to content

fix(subagents): strip 与 footer 一处信息一个归属;dashboard overlay 留出呼吸空间 - #44

Closed
tt-a1i wants to merge 4 commits into
mainfrom
subagent-strip-ui
Closed

fix(subagents): strip 与 footer 一处信息一个归属;dashboard overlay 留出呼吸空间#44
tt-a1i wants to merge 4 commits into
mainfrom
subagent-strip-ui

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Closes #41

问题(截图里同屏出现的两条)

 ○ ■ user-input-fold · seal/glm-5.3        0/1 agents · 3m04s · 2%/1.0M · ↓ to manage
~            seal/glm-5.3 · 24%/1.0m · $0.00 · subagents: ■ 1 running · /subagents to view

两个 glyph 叠在开头;#36 之后的 dashboard 不一致;model 重复;两个 context 百分比同屏且单位大小写还不同(一个是子代理的、一个是父会话的,用户无法分辨);↓ to manage/subagents to view 同一件事说两遍;0/1 agents 措辞别扭。

原则:一处信息只由一个地方负责

strip 可聚焦、紧贴编辑框,它拿富展示;footer 状态退化成纯计数。

strip before → after

before   ○ ■ user-input-fold · seal/glm-5.3   0/1 agents · 3m04s · 2%/1.0M · ↓ to manage

after    ⠋ user-input-fold                                  3m04s · ↓ to manage        (运行中,glyph 动画)
         ❯ user-input-fold                          3m04s · enter open · ↑ back        (聚焦)
         ✓ user-input-fold                                  3m04s · ↓ to manage        (完成)
         ⠋ user-input-fold                       2/3 done · 3m04s · ↓ to manage        (多个子代理)

footer before → after

before                 subagents: ■ 1 running · /subagents to view
after (strip 可见)      subagents: ● 1 running
after (strip 隐藏)      subagents: ● 1 running · /subagents to view

review 修掉的一处 bug:会冻住的 spinner

子代理最初把 footer 的 也换成了 spinner。但 ui.setStatus() 存的是算好的静态字符串,而 updateStatus 只在被监视的工作发生变化时调用——不是每帧。所以那个 spinner 会冻在最后一次事件恰好落到的那一帧上:一个安静工作 30 秒的子代理,footer 上就是一个不动的 ,读起来像 UI 挂了。比它替换掉的静态标记更糟。

修法:footer 用静止的 ,动画归 strip(strip 自己有 render loop 和 120ms/500ms 自适应 timer)。这个约束写进了 formatActivityStatus 的 docstring,避免以后有人再"顺手加个动画"。

同时去掉了 shared/activity-status.tsextensions/subagents/src/ui/transcript.ts 的内部 import:shared/ 不该依赖某个具体扩展的内部实现。

dashboard overlay 留白

盒子上方、底边与 hints 之间、hints 下方各加一空行;body 高度 clamp 从 rows - 5 收到 rows - 8,因此总高度仍不超过原来的 rows - 2 上限(新增测试锁定)。

TakeoverView 一行没动——它占满全屏、高度预算是精确的 rows - 1#36 建立的不变量),加 margin 会破坏它;另有回归测试守住。

验证

  • bun run test747 + 29 全绿(基线 739 + 29)
  • bun run check 退出 0
  • 实测三态输出(strip 可见/隐藏、workflows 未受影响)符合预期
  • strip 的 timer 只在 interval 类别变化时重建(不是每帧 churn),dispose() 必清

tt-a1i added 4 commits August 21, 2026 01:18
The below-editor strip and Pi's footer status rendered the same facts
twice on adjacent lines. The strip is focusable and rich, so it keeps
one glyph column (focus marker when selected, otherwise the shared
spinner/✓/✗ status glyph), the title, a readable count, elapsed time,
and the navigation hint; it drops the model label and context
utilization, which Pi's footer and the dashboard already show.

The footer status degrades to a bare count: running work now uses the
shared spinner frame via a threaded now parameter, and it omits the
'/subagents to view' tail while the strip is visible (threaded from
updateSubagentWidget's widgetVisible) so only one 'how to open' hint
is on screen at a time.

A single subagent shows no count at all; several show 'N/M done'. The
strip's repaint timer re-arms at the spinner cadence while the shown
subagent runs and back to 500 ms once it settles.

Refs #41
The subagent dashboard box rendered flush against the transcript: its
top border touched the previous output line and the key-hints line
touched the next paragraph. render() now emits one blank row above the
box, one between the bottom border and the hints, and one below the
hints. The body clamp pays for them (rows - 5 becomes rows - 8), so
the overlay can never exceed its old rows - 2 maximum height.

TakeoverView is untouched: it covers the full screen with an exact
rows - 1 budget and a regression test now guards that.

Refs #41
…nner

Review caught an animation that cannot animate. ui.setStatus stores a
finished string and updateStatus only runs when the watched work changes,
so a spinner frame there freezes on whatever event wrote it last — a hung
UI is worse than an honest still marker. The strip owns the animated glyph
because it owns a render loop.

Also drops shared/ -> extensions/subagents/ internal import: shared code
must not depend on one extension's internals.

Refs #41
@tt-a1i

tt-a1i commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

关闭此 PR:当前 main 已经吸收并改进了其中大部分设计,包括单 glyph strip、移除重复 model、聚合多子代理标签,以及在 TUI 中由 strip 独占 subagent 状态(footer 不再重复显示)。该分支现已与 main 冲突,直接解决冲突会有回退新版 UI 语义的风险。仍有价值的剩余项(移除 strip 的子代理 ctx、按共享 cadence 刷新 spinner、dashboard 进一步留白)后续应基于最新 main 以小范围改动重新实现,而不是继续合并这个旧分支。

@tt-a1i tt-a1i closed this Aug 22, 2026
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.

子代理条与 footer 状态信息重复、glyph 不一致;dashboard overlay 紧贴正文

1 participant