From a46ebee30cfbbac86abb45068411bc28e1c65503 Mon Sep 17 00:00:00 2001 From: Agando Date: Sat, 7 Nov 2026 19:29:06 +0100 Subject: fix(newos4): workspace re-opened the modules panel every tick; picker lost two cards; commander was black MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three defects reported against v4.6.155, each reproduced before touching code: 1. 'the modules tab keeps opening' (workspace). api.capture() runs dispatchCommand() for real, and the Modules card called bare 'modules' — whose only effect is terminal.openModuleManager(). Every 15 s refresh re-opened the panel (measured: #module-manager display:flex at t+9s and t+18s). The card now captures 'listmods' (same inventory as text), and api.capture() refuses UI-only commands outright so a future card cannot reintroduce it. 2. 'the picker got reduced to 4 items'. showPicker() used this.list() once four modes were registered — but modes are lazy, so that is 'modes you have already visited'. It now always renders the six in level order, taking registered specs for label/tagline. 3. 'commander is mostly black' on a phone. The base sheet's #ui-root rule used body[data-ui-mode]:not(...) #ui-root (1,2,1) and therefore beat every mode's own body[data-ui-mode='x'] #ui-root (1,1,1): commander/studio/cockpit asked for display:grid and got flex column. Commander collapsed to a 253 px centre column in an 844 px page with both rails hidden. Base specificity is now (1,0,0) with an explicit !important hide for classic/boot, and the commander phone query pins grid-template-rows: minmax(0,1fr) so the single row fills. Measured after: picker 6 cards after visiting four modes; #module-manager stays display:none across a refresh cycle; commander display:grid, phone centre 390x810 with a 673 px terminal, desktop 232/788/260 columns. probe-ui-modes.py --cycle -> ALL PASS, 13 checks; shell test 25/25. v4.6.156 --- modules/ext/ui-commander.js | 4 +++- modules/ext/ui-workspace.js | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/ext') diff --git a/modules/ext/ui-commander.js b/modules/ext/ui-commander.js index 03af5be..873d7cc 100644 --- a/modules/ext/ui-commander.js +++ b/modules/ext/ui-commander.js @@ -61,7 +61,9 @@ body[data-ui-mode="commander"] #ui-root { display: grid; grid-template-columns: #cm-palette li.sel { background: var(--bg-tertiary); border-left: 3px solid var(--accent-color); } #cm-palette li .d { color: var(--text-muted); font-size: .82em; display: block; margin-top: 2px; } @media (max-width: 900px) { - body[data-ui-mode="commander"] #ui-root { grid-template-columns: 1fr; } + /* one row that FILLS the viewport: without an explicit 1fr row the single grid row is auto, so + the centre column stopped at its content height and the rest of the screen was black. */ + body[data-ui-mode="commander"] #ui-root { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); } #cm-left, #cm-right { display: none; } } `); diff --git a/modules/ext/ui-workspace.js b/modules/ext/ui-workspace.js index ee20aac..d660283 100644 --- a/modules/ext/ui-workspace.js +++ b/modules/ext/ui-workspace.js @@ -71,7 +71,10 @@ body[data-ui-mode="workspace"] #ui-root { display: flex; flex-direction: column; const cards = [ { id: 'files', ico: '📁', title: 'Files', cmd: 'ls -la' }, { id: 'sys', ico: '🖥', title: 'Heap', cmd: 'cat /sys/heap/stats' }, - { id: 'modules', ico: '🧩', title: 'Modules', cmd: 'modules' }, + // `modules` OPENS the module-manager panel — capturing it re-opened the panel on every + // 15 s refresh ("the modules tab keeps opening", reported 2026-11-07). `listmods` prints + // the same inventory as text. + { id: 'modules', ico: '🧩', title: 'Modules', cmd: 'listmods' }, { id: 'agents', ico: '🤖', title: 'Agents', cmd: 'agent-list' }, { id: 'cron', ico: '⏱', title: 'Scheduled', cmd: 'cron-list' }, { id: 'errors', ico: '🐞', title: 'Recent errors', cmd: 'cat /sys/logs/errors' } -- cgit v1.2.3