Compare commits

...

1 Commits

Author SHA1 Message Date
Alexander Whitestone
8d237f8e36 fix: remove duplicate atlas toggle button markup (#1442)
Some checks failed
CI / validate (pull_request) Failing after 1m13s
Review Approval Gate / verify-review (pull_request) Successful in 7s
CI / test (pull_request) Failing after 1m35s
2026-04-14 22:10:46 -04:00
2 changed files with 22 additions and 1 deletions

View File

@@ -165,10 +165,10 @@
<!-- Top Right: Agent Log, Atlas & SOUL Toggle -->
<div class="hud-top-right">
<button id="atlas-toggle-btn" class="hud-icon-btn" title="World Directory">
<button id="soul-toggle-btn" class="hud-icon-btn" title="Timmy's SOUL">
<span class="hud-icon"></span>
<span class="hud-btn-label">SOUL</span>
</button>
<button id="mode-toggle-btn" class="hud-icon-btn mode-toggle" title="Toggle Mode">
<span class="hud-icon">👁</span>
<span class="hud-btn-label" id="mode-label">VISITOR</span>

View File

@@ -0,0 +1,21 @@
from pathlib import Path
def _hud_button_block() -> str:
text = (Path(__file__).resolve().parents[1] / 'index.html').read_text(encoding='utf-8')
start = text.index('<!-- Top Right: Agent Log, Atlas & SOUL Toggle -->')
end = text.index('<div id="bannerlord-status"')
return text[start:end]
def test_hud_toggle_buttons_have_unique_ids():
block = _hud_button_block()
assert block.count('id="atlas-toggle-btn"') == 1
assert block.count('id="soul-toggle-btn"') == 1
assert block.count('id="mode-toggle-btn"') == 1
def test_hud_toggle_buttons_are_balanced_and_closed():
block = _hud_button_block()
assert block.count('<button') == 3
assert block.count('</button>') == 3