From 2f0afeddfc677f7b21533d5f11f75aa6dd16e04c Mon Sep 17 00:00:00 2001 From: felixx Date: Wed, 4 Nov 2026 09:17:36 +0100 Subject: [PATCH] Shell: create Show app only when the task has an app The button was in the page markup with the hidden attribute, but the design system's .button display rule overrides it, so every task showed it. --- client/app.js | 6 ++++-- client/index.html | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/app.js b/client/app.js index 83e531f..da6fa0f 100644 --- a/client/app.js +++ b/client/app.js @@ -121,7 +121,10 @@ function remember(key, value) { /** The App pane: the task's web app beside the agent, resizable, opened from the header. */ function setupAppPane(app) { - const button = document.getElementById('btn-app'); + const button = document.createElement('button'); + button.className = 'button button-text'; + button.setAttribute('aria-controls', 'app-pane'); + document.getElementById('btn-help').before(button); const pane = document.getElementById('app-pane'); const divider = document.getElementById('app-divider'); const frame = document.getElementById('app-frame'); @@ -150,7 +153,6 @@ function setupAppPane(app) { if (open && !frame.getAttribute('src')) frame.src = app.path; remember('cosmo.app.open', open ? '1' : '0'); }; - button.hidden = false; button.addEventListener('click', () => setOpen(pane.hidden)); setOpen(remember('cosmo.app.open') === '1'); diff --git a/client/index.html b/client/index.html index 8588d4b..4e280d7 100644 --- a/client/index.html +++ b/client/index.html @@ -27,7 +27,6 @@

Cosmo Agents

-