Commit Graph
21 Commits
Author SHA1 Message Date
nesquena-hermes 38c5c69b63 Merge PR #6717 into stage/0924-i 2026-09-24 14:26:32 +00:00
Thireus ☠ 2d48f4c306 ui: give the renderMessages probes the block helper
Four upstream tests read renderMessages out of ui.js and run a slice of it against a fake segment object. Since the message block goes in through _insertSegmentBlock, three of them stopped at "ReferenceError: _insertSegmentBlock is not defined" and the fourth still pinned the old seg.insertAdjacentHTML line, which took twelve of the fifteen test shards red on this branch and nowhere else.

test_status_command_card.py defines the helper in its own harness, one line that does what the real helper does without a browser. test_compaction_current_summary_fallback.py and test_anchor_fallback_ownership.py evaluate the real helper from ui.js alongside the functions they already evaluate; their DOM shims return no template content, so it takes its insertAdjacentHTML fallback exactly as before. test_sprint49.py pins the new call, and its point is unchanged: the footer still rides in the same block as the body.

A new case in tests/test_issue2051_duplicate_assistant_answer.py pins why the helper exists, which answers a review note: the block is parsed into a template and the nodes are MOVED, so a repeated call adds nothing, and insertAdjacentHTML survives only as the fallback. All three insertions go through it.

tests/test_anchor_fallback_ownership.py, tests/test_compaction_current_summary_fallback.py, tests/test_sprint49.py, tests/test_status_command_card.py: 34 passed. The three #2051 files: 12 passed.
2026-09-21 19:28:49 +01:00
Anthony Ruiz 44b2a57109 fix(ui): preserve all pre-window compaction cards 2026-09-20 03:48:19 +00:00
Anthony Ruiz 3eb06c192c fix(ui): preserve compaction cards across virtual windows 2026-09-20 03:48:18 +00:00
Anthony Ruiz c13819b6b0 test: stub _loadedCompactionMarkerRawIdxs in anchor-ownership node harness
The renderMessages node harness added in origin/master (#7125 lineage)
evals renderMessages in isolation; the new loaded-compaction gate calls
_loadedCompactionMarkerRawIdxs, which must be stubbed like the other
render helpers (_postProcessWithAnchorSuppression, _usedModelTurnChipLabel).
2026-09-20 03:48:18 +00:00
webtecnica b1ea6141b3 fix(perf): keep burst-reset before early returns within renderMessages guard window (#6654)
The cycle-aware burst tracking re-gate reset the measurement burst at the
top of renderMessages(), but the added block pushed the session-load
loading-placeholder guard past the 1400-char window asserted by
test_renderMessages_preserves_loading_placeholder_for_session_switch, and
the standalone renderMessages harness in test_anchor_fallback_ownership.py
lacked the new _resetMessageVirtualMeasurementBurst dependency. Compact the
reset (identical behavior: every unmarked external render starts a fresh
burst before any early return or rAF coalescing) and add the helper stub to
the harness. CI test shard 2 is green again.
2026-08-30 21:29:24 -03:00
b3nw 2e8d213e99 test: stub _usedModelTurnChipLabel in renderMessages Node harness
Fixes CI shard 2 after #6068 wired renderMessages to the new footer helper.
2026-07-21 16:02:49 +00:00
8cc2d6f881 Release: model-picker Selected badge + Transparent Stream dupe-prefix suppression (#5757, #5758) (#5850)
Two visible render PRs, gate-passed (deep-review round), Nathan-approved to ship.

- #5757 (rodboev): mark active model with a Selected badge + open its provider group (#5748).
  Screenshot-verified (badge clear + correctly placed on active row).
- #5758 (rodboev): suppress the live-token prose row that is a strict prefix of the final
  answer (#5749). Provenance-gated (live-prose:* token rows after last tool row only) so it
  can't eat legitimate narration; reproduction test proves the dupe is gone.

Codex SAFE + full regression green (1576 render tests). 18 own tests pass together.

Co-authored-by: t <a@b>
Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-07-09 12:51:18 -07:00
allenliang2022 d06e463e2b test(chat): stub _postProcessWithAnchorSuppression in the renderMessages node harness (#5338)
The Node-executed gate in test_anchor_fallback_ownership.py
(test_render_messages_keeps_anchor_owned_turn_out_of_legacy_activity_rebuilds)
eval()s the real renderMessages(). Commit 7536f6f1 made renderMessages schedule
its post-render pass via _postProcessWithAnchorSuppression(), but the harness
only stubbed postProcessRenderedMessages() — so the eval threw
'ReferenceError: _postProcessWithAnchorSuppression is not defined' and the test
failed on Linux CI (shard 2). It passed locally only because Windows hit the
unrelated WinError 206 command-line-too-long first, masking the real error.

Add a no-op stub for _postProcessWithAnchorSuppression alongside the existing
postProcessRenderedMessages stub. Verified by dumping the generated node script
to a temp .js file and running 'node file.js' (bypassing the Windows -e length
limit): the eval no longer throws and the test's assertions pass.
2026-07-01 17:46:03 +00:00
sheldon-im 944d57eedc Improve latest assistant response landmark 2026-06-30 17:13:45 +00:00
Frank Song eff01bf322 Gate settled anchor fallbacks by raw index 2026-06-30 08:00:54 +08:00
Frank Song 7f98952db0 test: harden anchor fallback harness 2026-06-29 19:37:37 +00:00
Frank Song 7cdcadcbc4 test: lock anchor fallback render ownership 2026-06-29 19:37:37 +00:00
Frank SongandPaperclip 2ef838be8c test(anchor): widen JS regex extraction guard
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-28 17:05:16 +08:00
Frank SongandPaperclip 5b96da8c1d test(anchor): locate JS body after params
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-28 16:11:21 +08:00
Frank SongandPaperclip 770d877467 test(anchor): harden JS helper extraction
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-28 15:32:45 +08:00
Frank SongandPaperclip 9c0eecfbe9 test(anchor): include node stderr in behavior guard failures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-28 15:03:19 +08:00
Frank SongandPaperclip 02a8582711 test(anchor): skip node behavior check when node missing
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-28 14:32:22 +08:00
Frank SongandPaperclip ce4466bbf2 test(anchor): handle template interpolation in fallback guards
Teach the lightweight JavaScript extractor used by the anchor ownership tests to skip template literals with nested interpolation, so braces inside ${...} expressions cannot truncate the inspected function body.

Add a synthetic regression for nested template literals before the ownership-order assertions exercise static/ui.js.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-28 13:31:27 +08:00
Frank SongandPaperclip 2587eedb54 test(anchor): harden fallback ownership guards
Defer fixture file reads to test-time helpers so missing assets fail with clear assertion messages instead of import-time collection errors.

Use one Python-side function extractor for both source-structure checks and the Node behavior check, and skip JavaScript strings/comments while matching delimiters so braces inside literals do not truncate the inspected function body.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-28 12:14:18 +08:00
Frank Song 571db9d81e Document anchor fallback ownership 2026-06-28 12:09:12 +08:00