From aac2b1c0689aefeb140e08c24278ec486611fe10 Mon Sep 17 00:00:00 2001 From: Agando Date: Sat, 7 Nov 2026 18:19:47 +0100 Subject: feat(newos4): six interface modes (easy -> cockpit) over one terminal Symptom: newOS4 had exactly one layout. A first-time user had no way in that did not require learning commands, and an operator had no surface showing live runtime state; the only way to see heap/VFS/tool-call telemetry was to type cat /sys/... Root cause: no UI layer existed. main.html hard-codes one flex column, and terminal.js binds the stock nodes by id at construction, so an alternative layout had to either duplicate the output stream or reparent the real nodes. Fix: - modules/core/module-uishell.js (new): mode registry, #ui-root, stock-node snapshot/restore, identity check that reverts to classic when a mode removes or clones #terminal-container, shell-docked #ui-foot (the AI stop button exists in every mode), ui command, gated first-run picker, ?ui= honoured only if the mode actually registers, lazy mode loading via the same loader ext modules use. - modules/ext/ui-{easy,chat,studio,workspace,commander,cockpit}.js (new): six reparenting skins with scoped CSS. Workspace/commander/cockpit read real /sys/* mounts and captured command output; no value on screen is invented. - modules/test/test-ui-shell.js (new): 25 assertions - teardown, clone rejection, failed-mount fallback, footer docking, destructive-mode rejection. - terminal.js: register the shell; make one failing ext module stop aborting the rest of the serial load loop (it did, silently, which is why six ui-* files at the end of extKeys never loaded). - module-loader.js: LATEST_VER v4.6.152. The six ui-* keys are deliberately NOT in extKeys - see the rate-limit note below. - admin/scripts/probe-ui-modes.py (new): 6 modes x 2 viewports plus a --cycle pass that switches all seven states on ONE page and asserts the output node keeps its identity. Also fixed, found while testing (pre-existing, production-affecting): - nginx limit_req zone=webx11 burst 50 -> 200. One newOS4 boot fans out ~40 assets; the bucket emptied mid-boot and every later module got 503. Measured in webx11.error.log: "limiting requests, excess: 50.696 by zone webx11" against modules/ext/ui-chat.js. A reload within ~50 s silently broke modules. Sustained rate unchanged at 60r/m. Verified: node modules/test/test-ui-shell.js -> 25/25; removing both _restoreStock() calls measures 20/25 with five FAILs; probe-ui-modes.py --cycle against production -> ALL PASS, 13 checks; served bytes: v4.6.152 x3 in main.html, class UIShellModule x1 in core-bundle.js, six ui-* packages in packages.json. --- README.md | 7 + help.html | 15 ++ main.html | 9 +- modules-index.json | 3 +- modules/core/core-bundle.js | 531 ++++++++++++++++++++++++++++++++++++++++- modules/core/module-loader.js | 5 +- modules/core/module-uishell.js | 508 +++++++++++++++++++++++++++++++++++++++ modules/core/terminal.js | 21 +- modules/ext/ui-chat.js | 99 ++++++++ modules/ext/ui-cockpit.js | 122 ++++++++++ modules/ext/ui-commander.js | 188 +++++++++++++++ modules/ext/ui-easy.js | 83 +++++++ modules/ext/ui-studio.js | 146 +++++++++++ modules/ext/ui-workspace.js | 133 +++++++++++ modules/test/test-ui-shell.js | 214 +++++++++++++++++ packages.json | 30 +++ scripts/rebuild-bundles.py | 1 + 17 files changed, 2107 insertions(+), 8 deletions(-) create mode 100644 modules/core/module-uishell.js create mode 100644 modules/ext/ui-chat.js create mode 100644 modules/ext/ui-cockpit.js create mode 100644 modules/ext/ui-commander.js create mode 100644 modules/ext/ui-easy.js create mode 100644 modules/ext/ui-studio.js create mode 100644 modules/ext/ui-workspace.js create mode 100644 modules/test/test-ui-shell.js diff --git a/README.md b/README.md index eb8ef20..168ff7c 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,13 @@ a few paths that existed in the source tree (`backups/`, `data/`, personal profi See `CHANGELOG.md`; the loader version is `vX.Y.Z` in `main.html` and `modules/module-loader.js`. +## Interface modes (v4.6.152) + +Six interfaces over the same terminal: `ui easy` (cards + bubbles), `ui chat` (conversation), +`ui studio` (chat + files), `ui workspace` (live card grid), `ui commander` (rails + Ctrl-K palette), +`ui cockpit` (eight /sys panes). `ui picker` opens the chooser, `ui classic` returns to the original +layout, and `?ui=` deep-links. + ## Licence MIT — see `LICENSE`. diff --git a/help.html b/help.html index 7f9161d..ebf5e29 100644 --- a/help.html +++ b/help.html @@ -482,6 +482,21 @@ diff a.txt b.txt +
+

🖥 Interface modes

+

newOS4 ships six interfaces over the same terminal. Switch any time — classic is the original layout.

+
    +
  • ui — list the modes and show usage
  • +
  • ui easy — four action cards and bubble chat; nothing to memorise
  • +
  • ui chat — single-column conversation with slash chips
  • +
  • ui studio — chat plus a files / preview / editor pane
  • +
  • ui workspace — card grid of live panes (files, heap, modules, agents, cron, errors)
  • +
  • ui commander — terminal with side rails and a Ctrl-K command palette
  • +
  • ui cockpit — eight live /sys panes plus a terminal strip, 5 s refresh
  • +
  • ui next — cycle · ui picker — the chooser · ui classic — back
  • +
+
+

📖 New to feedback? How feedback works — which channel to use, what gets sent, and when to expect an answer.

diff --git a/main.html b/main.html index d9fa261..b3f7bca 100644 --- a/main.html +++ b/main.html @@ -2,7 +2,7 @@ - + WebX11 Module System