Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

test(ide): read the light pane's opaque paper as the ground it reports

rubenluetke10-beep4cb80b23e1bd
diff --git a/tests/unit/agentic_ide/test_terminal_input.py b/tests/unit/agentic_ide/test_terminal_input.py
index 1fd6fba548..d486b6839a 100644
--- a/tests/unit/agentic_ide/test_terminal_input.py
+++ b/tests/unit/agentic_ide/test_terminal_input.py
@@ -150,14 +150,18 @@ def test_the_answered_colours_match_the_theme_the_pane_is_drawn_with(
)
assert block is not None, f"no {appearance} theme found in terminalThemes.ts"
declared = dict(re.findall(r"(\w+): \"(#[0-9a-fA-F]{6})\"", block.group(1)))
- # The theme's background stays transparent on screen but carries the pane
- # shell's RGB at alpha 0, so xterm's minimum-contrast floor measures
- # against the real ground. That RGB is the one the CLI must be told.
- ground = re.search(
- r"background: \"rgba\((\d+), (\d+), (\d+), 0\)\"", block.group(1)
- )
- assert ground is not None, f"no ground RGB in the {appearance} theme"
- background = "#" + "".join(f"{int(c):02x}" for c in ground.groups())
+ # A light pane is opaque, so its background is the paper itself. The dark
+ # theme stays transparent on screen but carries the pane shell's RGB at
+ # alpha 0, so xterm's minimum-contrast floor measures against the real
+ # ground. Either way that RGB is the one the CLI must be told.
+ if "background" in declared:
+ background = declared["background"].lower()
+ else:
+ ground = re.search(
+ r"background: \"rgba\((\d+), (\d+), (\d+), 0\)\"", block.group(1)
+ )
+ assert ground is not None, f"no ground RGB in the {appearance} theme"
+ background = "#" + "".join(f"{int(c):02x}" for c in ground.groups())
assert THEME_COLOURS[appearance] == (
declared["foreground"].lower(),