feat(web-console): rebuild intelligent cockpit sync interface

This commit is contained in:
vee
2026-08-18 13:24:36 +08:00
parent 344f662970
commit 9b24d5c8c9
30 changed files with 4100 additions and 12594 deletions
@@ -47,27 +47,16 @@ class FrontendVehicleStateSyncContractTests(unittest.TestCase):
self.extension_source,
)
def test_shared_twin_theme_tracks_demo_role_and_extension_is_always_user(self) -> None:
def test_shared_twin_theme_is_fixed_to_user(self) -> None:
self.assertIn("function applyTwinSceneTheme(", self.app_source)
self.assertIn('canvas.dataset.themeRole = themeRole', self.app_source)
self.assertIn('canvas.dataset.themeRole = "user"', self.app_source)
self.assertIn(
'canvas.dataset.themeAccent = `#${palette.accent.toString(16).padStart(6, "0")}`',
self.app_source,
)
self.assertIn("accent: 0x0e7773", self.app_source)
self.assertIn("accent: 0x315eaa", self.app_source)
self.assertIn(
'if (document.body.dataset.module === "self-extension") return "user"',
self.app_source,
)
self.assertIn(
'const themeRole = document.body.dataset.module === "self-extension"',
self.app_source,
)
self.assertIn(
'window.addEventListener("cognitive-agent:demo-role-change"',
self.app_source,
)
self.assertNotIn("accent: 0x315eaa", self.app_source)
self.assertNotIn("cognitive-agent:demo-role-change", self.app_source)
def test_shared_twin_ground_uses_theme_radial_alpha_texture(self) -> None:
self.assertIn("function createTwinGroundTexture(", self.app_source)