HERMES-GIELIE/static
nesquena-hermes 32d46f4450
Release v0.51.293 — Release JI (stage-s5 — thinking card no longer renders twice #3709) (#3715)
* fix(#3709): thinking card no longer renders twice (in Activity + below answer)

The #3592 inline-render branch (v0.51.258) emitted a thinking card for a
thinking-only message even when a sibling tool-message in the same turn already
built an Activity group carrying that turn's thinking — so the card showed twice,
the second one stranded below the answer + 'Done in …' footer (insertAdjacentHTML
'beforeend' on a segment that already had body+footer).

Fix (keeps #3592, does NOT revert it):
- A1: precompute turnsWithActivityGroup (turns whose segments have tool cards);
  the inline branch only renders when the anchor turn is NOT in that set.
- A2: when it does render inline, insert 'beforebegin' the .msg-body/.msg-foot so
  the card sits above the answer, not orphaned below the footer.
- B: strip thinking against the TURN's combined visible answer
  (_turnVisibleTextByRawIdx), so a trailing thinking-only message that echoes the
  answer gets de-duped even though its own body is empty.

Live-verified in browser: #3709 repro (tool+trailing-thinking) → exactly 1 card in
Activity, above footer; #3592 repro (thinking-only) → exactly 1 inline card, not
buried in a collapsed group. + regression test tests/test_issue3709_*.

Supersedes #3708 (which deleted the inline branch outright, re-breaking #3592).

* fix(#3709): merge suppressed sibling thinking into the Activity group (Codex re-gate)

Codex caught a content-loss edge in the first cut: when A1 suppresses a
thinking-only sibling's inline card (its turn has an Activity group), the group
only rendered assistantThinking.get(aIdx) for the TOOL message — so a sibling
with DISTINCT reasoning was neither inline nor in the group → dropped.

Fix: aggregate all of a turn's thinking (turnThinkingParts, de-duped, index
order) and render that merged text once per turn in the Activity group
(_renderedTurnThinking guard). Live-verified: tool-thinking A + distinct
sibling-thinking B → 1 merged node carrying both, no loss. + regression test.

* fix(#3709): shared anchor resolver so inline-suppression & group placement agree (Codex re-gate #2)

Codex caught a fallback-anchor mismatch: turnsWithActivityGroup was populated only
from assistantSegments.get(tcIdx) (direct segment), but the group-render path falls
back to a nearby earlier segment when a tool's assistant_msg_idx has no directly
rendered segment (legacy/rebased). So a fallback-anchored group's turn wasn't in
turnsWithActivityGroup → the sibling rendered inline AND the group rendered → dup
again. Fix: one shared _anchorRowForActivityIdx(aIdx) helper (direct-or-fallback)
used by the precompute, the inline branch, and the group render — they now agree.
Live-verified all three repros still pass.

* test(#3709): update test_compact_activity assertion to mergedThinking var

The brittle source-scan asserted _thinkingActivityNode(thinkingText, false) — the
#3709 fix renders the turn's MERGED thinking via _thinkingActivityNode(mergedThinking,
false) into the same Activity body. Intent (settled thinking renders inside the
Activity disclosure alongside tools) unchanged; only the source variable. Updated to
assert the new variable, kept all intent assertions.

---------

Co-authored-by: nesquena-hermes <[email protected]>
2026-06-06 00:19:29 -07:00
..
vendor fix: vendor math and yaml assets for CSP 2026-05-26 23:49:02 +02:00
apple-touch-icon.png
boot.js Release v0.51.286 — Release JB (stage-r21 — sidebar tab reordering #3067) (#3694) 2026-06-05 18:39:42 -07:00
commands.js Release v0.51.270 — Release IL (stage-u1 — un-hold batch: #3517 #3624 #3613) (#3674) 2026-06-05 11:35:26 -07:00
favicon-32.png
favicon-192.png
favicon-512.png
favicon-512.svg
favicon.ico
favicon.svg
i18n.js Release v0.51.286 — Release JB (stage-r21 — sidebar tab reordering #3067) (#3694) 2026-06-05 18:39:42 -07:00
icons.js Merge remote-tracking branch 'origin/master' into fix/session-list-touch-actions 2026-05-18 22:22:35 -06:00
index.html Release v0.51.288 — Release JD (stage-r24 — collapsible approval card #3515) (#3697) 2026-06-05 19:52:52 -07:00
login.js feat: add passkey sign-in 2026-05-25 00:14:38 +00:00
manifest.json Stage 405: PR #2842 — feat: polish installed PWA startup by @AJV20 2026-05-24 18:28:52 +00:00
messages.js Release v0.51.292 — Release JH (stage-s4 — compression-exhausted turns surface as errors #3316 fixes #3315) (#3705) 2026-06-05 22:45:09 -07:00
onboarding.js
panels.js Release v0.51.287 — Release JC (stage-r22 — WeCom session classification #3653 + worker-profile picker hiding #3662) (#3695) 2026-06-05 18:56:43 -07:00
pwa-startup.js Stage 405: PR #2842 — feat: polish installed PWA startup by @AJV20 2026-05-24 18:28:52 +00:00
sessions.js fix(sidebar): hoist _sessionAttentionState to fix ReferenceError crash (#3696) + scope-undef prevention gate (#3698) 2026-06-05 20:49:45 -07:00
style.css Release v0.51.288 — Release JD (stage-r24 — collapsible approval card #3515) (#3697) 2026-06-05 19:52:52 -07:00
sw.js fix: harden WebUI bugfix sweep 2026-05-28 13:38:50 -04:00
terminal.js Release v0.51.249 — Release HQ (stage-q21) (#3523) 2026-06-03 20:15:53 -07:00
ui.js Release v0.51.293 — Release JI (stage-s5 — thinking card no longer renders twice #3709) (#3715) 2026-06-06 00:19:29 -07:00
workspace.js Release v0.51.244 — Release HL (stage-q16) (#3509) 2026-06-03 18:19:09 -07:00