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 #2517** (refs #2477) — Make live automatic-compression cards show the running compression phase, with a spinner-style status label and elapsed time, instead of presenting the in-progress state like a completed auto-compression event.

## [v0.51.89] — 2026-05-18 — Release BM (stage-382 — 6-PR full sweep batch — runtime adapter approval/clarify seam + SOUL.md memory panel + #1855 resolve_model_provider fast-path + PWA sidebar spinner fix + /model active-provider preference + contributor contract docs index)

### Changed
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions static/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,7 @@ function attachLiveStream(activeSid, streamId, uploaded=[], options={}){
phase:'running',
automatic:true,
message:d.message||'Auto-compressing context...',
startedAt:Date.now(),
};
setCompressionUi(state);
const liveAnswerStarted=!!(assistantRow||String(((_parseStreamState&&_parseStreamState())||{}).displayText||'').trim());
Expand Down
8 changes: 6 additions & 2 deletions static/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -4956,15 +4956,19 @@ function _autoCompressionCardsHtml(state){
const detail=running
? (String(state.message||'Auto-compressing context...').trim()||'Auto-compressing context...')
: (String(state.message||fallback).trim()||fallback);
const startedAt=Number(state&&state.startedAt||0);
const elapsed=(running&&startedAt>0)
? `Elapsed ${_formatTurnDuration(Math.max(0,(Date.now()-startedAt)/1000))}`
: '';
const preview=running
? detail
: (String(state.summary?.headline||detail).trim()||detail);
return `
<div class="tool-card-row compression-card-row" data-compression-card="1">
${_compressionStatusCardHtml({
statusLabel: t('auto_compress_label'),
statusLabel: running ? t('compress_running_label') : t('auto_compress_label'),
previewText: preview,
detail,
detail: [detail, elapsed].filter(Boolean).join('\n'),
icon: running ? '<span class="tool-card-running-dot"></span>' : li('check',13),
open: running,
variantClass: running
Expand Down
5 changes: 5 additions & 0 deletions tests/test_auto_compression_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def test_auto_compression_running_sse_uses_active_session_running_card():
assert "phase:'running'" in block
assert "automatic:true" in block
assert "message:d.message||'Auto-compressing context...'" in block
assert "startedAt:Date.now()" in block


def test_auto_compression_running_sse_is_emitted_from_agent_lifecycle_status():
Expand Down Expand Up @@ -136,7 +137,11 @@ def test_auto_compression_card_reuses_compression_card_renderer():

assert "if(state.automatic) return _autoCompressionCardsHtml(state);" in src
assert "tool-card-row compression-card-row" in helper
assert "running ? t('compress_running_label') : t('auto_compress_label')" in helper
assert "tool-card-compress-running tool-card-compress-auto" in helper
assert "tool-card-compress-complete tool-card-compress-auto" in helper
assert "Elapsed ${_formatTurnDuration" in helper
assert "detail: [detail, elapsed].filter(Boolean).join('\\n')" in helper
assert "auto_compress_label" in helper


Expand Down
Loading