Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Fixed

- **PR #2408** by @Michaelyklam (fixes #2404) — Auto-compression cards now close the current live Activity burst before rendering, so post-compression tools start a fresh `Activity` row instead of joining the pre-compression tool group across a real timeline/context boundary.

## [v0.51.77] — 2026-05-16 — Release BA (stage-370 — 1-PR follow-up — live Activity grouping boundary fix)

### Fixed
Expand Down
8 changes: 8 additions & 0 deletions static/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -4718,6 +4718,13 @@ function ensureActivityGroup(inner, opts){
if(live) _startActivityElapsedTimer(group);
return group;
}
function closeCurrentLiveActivityGroup(){
const turn=$('liveAssistantTurn');
if(!turn) return;
turn.querySelectorAll('.tool-call-group[data-live-tool-call-group="1"][data-live-activity-current="1"]').forEach(group=>{
group.removeAttribute('data-live-activity-current');
});
}
function _compressionStateForCurrentSession(){
const state=window._compressionUi;
if(!state||!S.session||state.sessionId!==S.session.session_id) return null;
Expand Down Expand Up @@ -4845,6 +4852,7 @@ function appendLiveCompressionCard(state){
}
const inner=_assistantTurnBlocks(turn);
if(!inner) return false;
closeCurrentLiveActivityGroup();
const node=_compressionCardsNode(state);
if(!node) return false;
node.setAttribute('data-live-compression-card','1');
Expand Down
13 changes: 13 additions & 0 deletions tests/test_ui_tool_call_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,19 @@ def test_live_visible_interim_text_splits_tool_bursts_not_thinking(self):
"Tool starts must not split consecutive tools into one-tool Activity rows."
)

def test_live_compression_card_splits_current_tool_activity_burst(self):
compression_fn = _function_body(UI_JS, "appendLiveCompressionCard")
close_fn = _function_body(UI_JS, "closeCurrentLiveActivityGroup")
assert "closeCurrentLiveActivityGroup();" in compression_fn, (
"Auto-compression cards should close the current live Activity burst so later tools start a fresh group."
)
assert "data-live-activity-current" in close_fn, (
"The live compression boundary helper must clear the current Activity marker."
)
assert "removeAttribute('data-live-activity-current')" in close_fn, (
"Closing a live Activity burst should leave the row rendered but stop later tools from reusing it."
)


class TestToolCardDesignTokens:
def test_root_defines_shared_layout_design_tokens(self):
Expand Down
Loading