HERMES-GIELIE/static
b3nw 1f56fad73f fix(chat): flush pending render before segment reset at tool/interim boundaries
Fixes #2713 — live assistant text can truncate at tool-call segment
boundaries during streaming.

Before _resetAssistantSegment() in the tool and interim_assistant SSE
handlers, synchronously flush any pending rAF render work so tokens that
arrived during the 66ms throttle window are written to the DOM before
assistantBody is cleared. Without this flush, the pending _doRender
callback fires after assistantBody is null and skips the write silently,
causing the tail of the pre-tool segment to disappear from the live view.

Implementation:
- Extract _flushPendingSegmentRender() helper (guarded by assistantBody
  && _renderPending) that cancels the pending rAF and synchronously
  writes via smd/renderMd/esc — same cascade as _doRender.
- Call the helper from both the tool and interim_assistant handlers
  before their respective _resetAssistantSegment() calls.
- Normal cases where the rAF has already fired are unaffected (guard
  skips immediately).

Completed transcripts were never affected (renderMessages rebuilds from
the full assistantText accumulator on done).

Adds tests/test_issue2713_streaming_segment_flush.py with 11 static
analysis regression tests pinning the helper shape and call-site
ordering.
2026-05-24 04:08:33 +00:00
..
vendor chore: vendor streaming-markdown@0.2.15, remove CDN dependency 2026-04-24 01:05:20 +00:00
apple-touch-icon.png feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
boot.js feat: add Hepburn skin (magenta-rose palette) 2026-05-24 03:03:32 +00:00
commands.js fix: honour skin value in theme command 2026-05-20 00:09:06 +00:00
favicon-32.png fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon-192.png feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
favicon-512.png feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
favicon-512.svg feature: add manifest and icons to enable app install on android 2026-05-02 19:06:39 +02:00
favicon.ico fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon.svg fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
i18n.js feat: add per-skill enable/disable toggle in Skills panel 2026-05-22 19:43:00 +00:00
icons.js Stage 382: PR #2500 (with whitespace polish on panels.js + ARCHITECTURE.md) 2026-05-18 03:45:02 +00:00
index.html feat: add Hepburn skin (magenta-rose palette) 2026-05-24 03:03:32 +00:00
login.js Fix login health probe credentials 2026-05-12 20:09:54 +08:00
manifest.json feat: add browser offline recovery and PWA cache hardening 2026-05-08 21:16:17 +00:00
messages.js fix(chat): flush pending render before segment reset at tool/interim boundaries 2026-05-24 04:08:33 +00:00
onboarding.js docs: clarify Anthropic auth choices in onboarding 2026-05-06 06:26:43 +00:00
panels.js feat: add Hepburn skin (magenta-rose palette) 2026-05-24 03:03:32 +00:00
sessions.js fix: clear stale inflight UI state (closes #2795, squashed from 5 commits) 2026-05-24 04:08:25 +00:00
style.css feat: add Hepburn skin (magenta-rose palette) 2026-05-24 03:03:32 +00:00
sw.js fix: reduce browser storage pressure 2026-05-16 08:44:04 -07:00
terminal.js fix: anchor active sessions per browser tab 2026-05-01 19:52:05 +08:00
ui.js fix(chat): rename _inflightStateLimits() to _getInflightStateLimits() to fix v0.51.117 collision 2026-05-22 23:17:00 +00:00
workspace.js fix: time out hung browser api requests 2026-05-20 02:41:00 +08:00