Files
openclaw/packages/normalization-core
Peter Steinberger 9a947e4bb8 fix(sessions): flatten Markdown in session list previews (#125113)
* fix(sessions): flatten Markdown in session list previews

Session-list previews were extracted verbatim from the last transcript
message, so raw Markdown leaked into every surface that renders the
subtitle as plain text — Control UI sidebar, TUI picker, native session
lists, and the sessions_list tool. A finished session read as
"Landed [PR #124879](https://github.com/...)".

Flatten lastMessagePreview at the Gateway producer, inside the
watermark-validated title-field cache, so the cost is amortized and no
consumer re-implements stripping. The flattener is the regex chain that
already existed privately in the Control UI narration line; it moves to
@openclaw/normalization-core/markdown-plain-text and both surfaces now
share one implementation. Session titles keep their own normalization
and are unchanged.

Also let an unread final observer digest outrank the raw last reply in
the sidebar subtitle, so the utility model's headline wins the slot it
was written for. The finalDigestUnread gate is untouched, so an
already-read digest still falls back to the flattened preview.

* fix(ci): register Markdown preview module

* fix(sessions): preserve literal preview punctuation

* fix(sessions): flatten previews before truncation

* fix(test): adapt session projection callback
2026-08-17 00:40:16 -07:00
..