Files
openclaw/ui
heichl_xydigit 00f5df24e5 fix(webchat): keep context indicator visible with stale token data (#89772)
* fix(webchat): keep context indicator visible with stale token data

The context usage indicator was disappearing after sending a message because
totalTokensFresh was set to false during the run, even though we had valid
token count data from before the message was sent.

Changes:
- Modified getContextNoticeViewModel to show the indicator even when
  totalTokensFresh is false, as long as totalTokens is non-zero
- Added isStale flag to indicate when token data is not fresh
- Applied subtle visual styling for stale data (lighter colors, 5% opacity)
- Added "(updating)" suffix to the percentage text and title when stale
- Updated tests to verify the new behavior

Fixes #89662

* test(ui): cover stale context indicator behavior

* docs(changelog): note Control UI fix

---------

Co-authored-by: 黑承亮0668000844 <bladin@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-06 06:44:41 +01:00
..
2026-06-04 20:57:09 -04:00