style(ui): present context compaction as a transcript checkpoint - #4989
Conversation
jackwener
left a comment
There was a problem hiding this comment.
Reviewed at exact head 8889e8a8a by two independent reviewers. One [P3], filed inline; no P0–P2. test was still queued on this commit and was not used as evidence either way.
The failing assertion this branch carried earlier is explained and fixed, and it was not what it looked like. actual 7 / expected 5 reads like two extra rows; it was a timestamp. The projection took the live event's ts where the test pinned the persisted turn's startedAt, and 8633db6ba moved it back. The merge semantics were never wrong — one note, one turn, and a second overlay still yields one. A count that differs by two and a timestamp that differs by two are indistinguishable from the number alone, which is why the number was treated as an entry point rather than a conclusion.
The three shapes behave: an unchanged compaction writes no durable note and leaves nothing claiming the transcript was compacted; two consecutive compactions produce two notes; a failure renders as failed, with no continuation marker and no divider.
One observation offered rather than filed, because it is a product call. The failure copy was shortened to avoid promising a continuation the implementation could not guarantee — the right instinct. But a fail-open session does continue, and the copy no longer says so. Having moved off over-promising, it now under-states: a reader who sees only that compaction failed may believe the session stopped and that something is required of them. Whether to restore one sentence is a judgement, not a defect.
Scope, so the result is not read as wider than it is: this was reviewed through SSR turn views and the materialise/overlay path, without a Desktop window and without a real SessionManager compaction.
简体中文
在 exact head 8889e8a8a 上由两位独立评审审查。一条 [P3],已发在行内;无 P0–P2。 该 commit 上 test 仍为 queued,两个方向上都没有把它当作证据。
这个分支先前那条失败断言已经解释清楚并修好了,而且它并不是看上去的那样。 actual 7 / expected 5 读起来像是多了两行;实际是时间戳。 投影取了 live 事件的 ts,而测试钉的是持久化 turn 的 startedAt,8633db6ba 把它改了回去。合并语义从未出错 —— 一个 turn 一条提示,再叠加一次 overlay 仍是一条。「行数差二」与「时间戳差二」,单看那个数字是无法区分的 —— 这正是把它当作入口而非结论的原因。
三种形状都正常:未发生变化的压缩不写 durable 提示,也不会留下任何声称「已压缩」的痕迹;连续两次压缩产生两条;失败态渲染为失败,没有继续标记,也不是分隔线。
一条提出而不立项的观察,因为它是产品判断。失败文案被缩短,是为了避免承诺一个实现保证不了的「会继续」—— 这个直觉是对的。但 fail-open 的会话确实会继续,而现在的文案不再说这件事。 从「过度承诺」挪开之后,它落到了另一侧:说得不足 —— 只看到「压缩失败」的读者,可能以为会话已经停止、并且需要自己做点什么。是否补回一句是判断,不是缺陷。
范围说明,免得结论被读得比实际更宽: 本次是通过 SSR turn view 与 materialise/overlay 路径审查的,没有 Desktop 窗口,也没有真实的 SessionManager 压缩。
Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.
jackwener
left a comment
There was a problem hiding this comment.
Approving at exact head 8889e8a8a. test is terminal green here. One [P3] stands, filed inline on my earlier review of this head — the removed assertions include the only one pinning which timestamp the elapsed clock reads, which is the behaviour the branch just corrected. It is worth restoring, and it does not block.
The earlier failing assertion is understood: actual 7 / expected 5 was a timestamp, not two extra rows, and the merge semantics were never wrong. The three shapes — unchanged, consecutive, failed — behave as intended.
The copy question stays with you. Shortening the failure text to stop promising a continuation was the right instinct; a fail-open session does continue, and the text no longer says so. Under-stating is better than over-promising, so it is not a defect — but a reader who sees only that compaction failed may think the session stopped.
Reviewed through SSR turn views and the materialise/overlay path, without a Desktop window or a real SessionManager compaction. This is not the independent human review CONTRIBUTING.md requires, and it is not a merge decision.
简体中文
在 exact head 8889e8a8a 上批准。test 在此已终态转绿。一条 [P3] 仍然成立,已发在我先前针对该 head 的评审行内 —— 被删掉的断言里,包含唯一一条钉住「elapsed 时钟读的是哪个时间戳」的断言,而那正是本分支刚刚修正的行为。值得补回,但不阻塞。
先前那条失败断言已经弄清:actual 7 / expected 5 是时间戳,不是多了两行,合并语义从未出错。三种形状 —— 未变化、连续、失败 —— 表现都符合预期。
文案那个问题留给你。 缩短失败文案以停止承诺「会继续」,这个直觉是对的;但 fail-open 的会话确实会继续,而文案不再说这件事。说得不足好过过度承诺,所以不是缺陷 —— 但只看到「压缩失败」的读者,可能以为会话已经停止。
本次通过 SSR turn view 与 materialise/overlay 路径审查,没有 Desktop 窗口,也没有真实的 SessionManager 压缩。这不是 CONTRIBUTING.md 所要求的独立人类审查,也不是合并决定。
Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.
Generated-by: Codex
Generated-by: Codex Generated-by: Gemini 3.8 Flash (Antigravity)
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
8889e8a to
b36e3ca
Compare
Summary
When context compaction starts, its transcript notice now uses body text (14px/20px), an Astryx Spinner, and elapsed time derived from the existing Turn start. Running and completed notices share an Astryx divider, keeping the context boundary visible through the state change without a fade or height shift. Failure notices use the same body typography and retain their inline status presentation, without claiming that the request continued.
The elapsed display is extracted from
TurnRunningStatusand reused, including its deterministic-fixture gate. Spinner and clock are hidden from assistive technology so ticking does not repeatedly announce the status. This changes presentation only; there is no storage migration or new execution state.Refs #3651. Toast terminal handling (#4854) and missing durable notes (#4974) remain separate follow-ups.
Verification
c58c48182and AFTER from this branch. Chromium checks covered running/completed/failed, light/dark, and 1440px/900px English, Simplified Chinese, and Traditional Chinese layouts: body typography, equal 20px running/completed rows, no overflow or page errors.Running
Completed
中文说明
压缩状态统一为 14px/20px。运行中显示 Spinner 和来自 Host 开始时间的已耗时,运行与完成始终保留两侧细线,不加淡入淡出;失败保持普通状态提示。计时复用普通 Turn 运行状态的实现,不新增执行权威。截图为相同视口的真实 Storybook 对比,静态 fixture 按已有规则隐藏秒数。
AI use
Tool(s) and scope: Codex — implementation, targeted tests, and visual verification following user-approved design comparisons. Gemini 3.8 Flash (via Antigravity) — localized transcript copy polishing, reviewed and applied by Codex.
Checklist
Does this PR entail a change in behavior?