feat(webui): distinguish context compaction reasons (NAN-324) (#6389)

* feat(webui): distinguish context compaction reasons (NAN-324)

* fix(webui): describe idle compaction cancellation as interruption

* docs: omit compaction notice details from configuration guide

* fix(i18n): make compaction notices read naturally

* fix(i18n): keep CJK compaction notices concise

* fix(i18n): describe idle compaction as unfinished
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-22 16:13:25 +08:00
1 parent 084b6bb394
commit bc5c58d239
38 files changed
+540 -23

No files matched your search

@@ -1026,6 +1026,7 @@ async def test_codex_compacts_state_at_ninety_percent_before_next_request(
)
assert timeline == ["started", "compact-request", "succeeded", "generation-request", "answer:done"]
assert all(notice.reason == "provider_native" for notice in notices)
assert len({notice.compaction_id for notice in notices}) == 1
assert response.provider_compaction_event_id == (None if inline_compaction else notices[0].compaction_id)
assert response.content == "done"
@@ -1135,6 +1136,7 @@ async def test_codex_disables_unsupported_native_compaction_and_continues(
assert response.content == "done"
assert [notice.phase for notice in notices] == ["started", "failed"]
assert all(notice.reason == "provider_native" for notice in notices)
assert len({notice.compaction_id for notice in notices}) == 1
assert len(bodies) == 2
assert bodies[0]["input"][-1] == {"type": "compaction_trigger"}
@@ -1192,6 +1194,7 @@ async def test_codex_native_compaction_terminal_survives_cancellation(monkeypatc
await task
terminal = "cancelled" if cancel_during == "compaction" else "succeeded"
assert [notice.phase for notice in notices] == ["started", terminal]
assert all(notice.reason == "provider_native" for notice in notices)
assert len({notice.compaction_id for notice in notices}) == 1
assert requests == (["compaction", "generation"] if cancel_during == "generation" else ["compaction"])