Repository navigation
Commit 8dca0fd
authored
fix(desktop): show unknown context usage after compaction (#5548)
Treat measurements taken before a successful compaction as stale until a newer request settles. Update the composer display, localized tooltip, tests, and changelog.
Generated-by: Codex
fix(ui): keep post-compaction anchor over stale snapshot
Preserve the selected request anchor timestamp so the context usage resolver can order it against a retained diagnostics snapshot. Cover the post-compaction sequence in resolver tests.
Generated-by: Codex
fix(ui): order context usage anchors by request settlement
Persist the provider request completion time on usage anchors so a later transcript write cannot displace the same request snapshot and its metered window. Preserve legacy anchors and bump the runtime-host compatibility epoch for the new field.
Generated-by: Codex
docs(changelog): describe the post-compaction gauge fallback
The stale reading keeps the gauge chip on its localized Usage label with the compacted-context tooltip; it never rendered a question mark. Align the entry with the shipped ContextUsageAction.
Generated-by: Codex
docs(ui): explain context usage reading resolution
Describe what resolveContextUsage consumes (live Turn snapshot and durable transcript anchors/notes) and the ordering rule it applies after a compaction.
Generated-by: Codex
fix(ui): order usage anchors against the compaction apply time
Record context_compaction_applied when a compaction lands so the boundary carries the apply time rather than the turn's settlement time, and persist completedAt on the settlement usage anchor even without provider telemetry. A send that compacts mid-turn and never completes its retry settles the usage row after the compaction notes while the anchor still describes the pre-compaction request, so readers arbitrate the newest anchored row against a boundary found behind it by event time. The applied row is hidden from the user-facing notes; context_compacted stays the display row.
Refs #5547
Generated-by: Codex
test(ui): assert context usage tooltips for stale and unavailable readings
The share-resolution test only checked the visible label, so a stale
reading and an unavailable reading were indistinguishable. Resolve the
button aria-describedby to its tooltip element and assert the copy for
the stale, measured, and unavailable states so the tooltip follows the
reading across transitions in the same mounted control.
Generated-by: Codex
docs(runtime-host): cover the compaction note kind in the epoch-206 note
Generated-by: Codex
docs(changelog): name the compaction apply-time boundary row
The gauge entry credited context_compacted alone, but the mid-turn boundary is the context_compaction_applied row recorded when a compaction lands; context_compacted stays the settlement-time display note.
Refs #5547
Generated-by: Codex
fix(runtime): forward compaction boundaries while a turn is running
A mid-turn compaction only reached the composer gauge once the turn
settled and the transcript refreshed, so the pre-compaction figure stayed
on screen for the rest of a long turn. The runtime now emits a
context_compaction_applied event when a compaction lands, persists it as
the hidden boundary note, and the Runtime Host forwards it over the
session subscription. The live context usage tracker holds the gauge on
the compacted reading until a measurement that settled after the
boundary arrives.
Live and transcript readings share one ContextUsageSnapshot union, and
the measured reading's window is renamed to contextWindow.
Refs #5547
Generated-by: Codex
test(ui): align context usage assertions with shortened tooltips
Preserve the upstream measured and unavailable tooltip copy in the
post-compaction component assertions. The branch compatibility bump was
already reconciled while replaying the protocol changes: epoch 214 is
ahead of main at 212 and the 213 claims in open PRs #5394 and #5969.
Generated-by: Codex1 parent f757428 commit 8dca0fd
44 files changed
Lines changed: 1785 additions & 196 deletions
File tree
- apps/desktop
- src
- main/__tests__
- renderer
- application/contracts/session-inspector
- features
- conversation
- model
- ui
- workbar/tools/inspector
- workhub/ui
- stories
- packages
- core/src
- __tests__
- runtime-host/src
- __tests__
- adapter
- protocol
- server
- runtime/src
- __tests__
- ui/src
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
0 commit comments