fix(acpmux): keep cleared Progress gone through older history
An explicit empty plan stays cleared when older transcript history is loaded, so Session Info does not resurrect a stale Progress section. Leo asked for “a live Progress section in Session Info (medium). Today the plan only shows in the transcript.” He also said, “yeah but the big point is ofc the styling and theming and spacing too.”
The live Progress state now distinguishes never-seen from explicitly cleared. Folding an older page preserves that clear marker, while older-plan adoption still works when no newer plan or clear exists.
Changelog
Changed: keep Session Info Progress absent after an explicit empty-plan clear, even when loadOlder() folds a historical plan.
Performance:
| metric | before | after | delta | harness |
|---|---|---|---|---|
| ghost Progress sections after clear + older-history load | 1 | 0 | -1 | bun test src/agent-session/acpmux/liveProgressClient.test.ts |
The regression uses the public client with an older historical plan, a current plan, an explicit empty-plan clear, and loadOlder().
🤖 Generated with Codex
Agent session: agent session
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Keeps an explicitly cleared Progress section absent from Session Info when older transcript history is folded in, so a stale plan no longer resurrects after an empty-plan clear.
- Progress state now distinguishes never-seen (
undefined) from explicitly cleared (null), and the clear marker survives older-page folds. - Adds regression tests for the clear-then-
loadOlder()sequence and for an active plan surviving an older historical clear; the shared fixture now starts empty so the historical plan lands beyond the attach page.