feat(web-app-dashboard): move the tile switch to services.dashboard.display

The dashboard read `display` from the role's meta/info.yml, which no inventory can override, so a host could not hide a tile. docker_cards now skips a card when `services.dashboard.display` in the merged applications is false, and absent still means shown; a non-bool value fails loudly. roles_with_service drops the same role from the dashboard tile-reachability targets so the Playwright spec does not wait for a hidden tile, and the inventory validator accepts `services.dashboard.display` for every role that declares `services.dashboard`, since no role default carries it. `display` leaves the meta/info.yml allowlist, web-app-jellyfin drops its redundant `display: true`, and base.md and layout.md document the new switch.

Real lookups with web-app-gitea set to display false render the Dashboard and Jellyfin cards and only jellyfin as a tile target, and all three without the override; the nine tests for the new behaviour fail against the old code.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5.5 committed 2026-10-29 17:46:03 +01:00
1 parent abee135c53
commit 3ef937a9d8
12 files changed
+269 -36

No files matched your search

@@ -105,6 +105,33 @@ class TestCompareApplicationKeys(unittest.TestCase):
defaults = {"web-app-cst-demo": {"services": {"port": 8080}}}
self.assertEqual(compare_application_keys(apps, defaults, "src"), [])
def test_dashboard_display_is_legal_where_dashboard_is_declared(self):
apps = {"app1": {"services": {"dashboard": {"display": False}}}}
defaults = {"app1": {"services": {"dashboard": {"enabled": False}}}}
self.assertEqual(compare_application_keys(apps, defaults, "src"), [])
def test_dashboard_display_is_legal_where_a_variant_declares_dashboard(self):
apps = {"app1": {"services": {"dashboard": {"display": False}}}}
defaults = {"app1": {"services": {}}}
variants = {"app1": [{"services": {"dashboard": {"enabled": True}}}]}
self.assertEqual(compare_application_keys(apps, defaults, "src", variants), [])
def test_dashboard_display_without_a_dashboard_binding_is_flagged(self):
apps = {"app1": {"services": {"dashboard": {"display": False}}}}
defaults = {"app1": {"services": {"port": 8080}}}
result = compare_application_keys(apps, defaults, "src")
self.assertEqual(
sorted(err.rsplit(": ", 1)[1] for err in result),
["services.dashboard", "services.dashboard.display"],
)
def test_other_undeclared_dashboard_keys_stay_flagged(self):
apps = {"app1": {"services": {"dashboard": {"dispaly": False}}}}
defaults = {"app1": {"services": {"dashboard": {"enabled": False}}}}
result = compare_application_keys(apps, defaults, "src")
self.assertEqual(len(result), 1)
self.assertIn("services.dashboard.dispaly", result[0])
def test_declaration_keys_on_an_in_tree_role_are_flagged(self):
apps = {"app1": {"custom": True, "source": {"url": "https://x/y.git"}}}
defaults = {"app1": {"services": {}}}