Files
hermes-webui/tests/test_issue2867_tool_output_visual_distinction.py
T
nesquena-hermes 6951d10ae5 rebase #4411 onto master (v0.51.542) for deep-review — Stable Assistant Turn Anchors capstone
franksong2702's activity_scene_v1 anchor-scene model: live-stream/settled/refresh/re-entry
show the same ordered turn. Rebased clean (no conflicts) onto current master.
Co-authored-by: franksong2702 <franksong2702@users.noreply.github.com>
2026-06-20 21:48:55 +00:00

29 lines
1.2 KiB
Python

from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
UI_JS = (ROOT / "static" / "ui.js").read_text(encoding="utf-8")
STYLE_CSS = (ROOT / "static" / "style.css").read_text(encoding="utf-8")
def test_tool_cards_use_legacy_compact_header_without_tool_output_badge():
"""Tool cards keep the compact header without surfacing output as a badge."""
build_start = UI_JS.index('function buildToolCard(tc){')
build_end = UI_JS.index('function _syncToolCallGroupSummary', build_start)
build_tool_card = UI_JS[build_start:build_end]
assert 'tool-card-badge' not in build_tool_card
assert 'Tool output' not in build_tool_card
assert '<span class="tool-card-name-label">${esc(displayName)}</span>' in build_tool_card
assert '<span class="tool-card-name-generic">${esc(genericName)}</span>' in build_tool_card
def test_tool_card_badge_style_is_absent():
assert '.tool-card-badge{' not in STYLE_CSS
assert '.tool-card:hover .tool-card-badge' not in STYLE_CSS
def test_tool_cards_use_legacy_muted_rail():
assert '.tool-card{background:var(--surface-subtle);' in STYLE_CSS
assert 'border-left:2px solid var(--border-muted)' in STYLE_CSS
assert 'border-left:3px solid var(--accent-bg-strong)' not in STYLE_CSS