Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

chore: reconcile dynamic UI foundation with current main

Abdurrahman Fakhruld8b55e96337a
diff --cc docs/CHANGELOG.md
index eea5a966,14b5d7d9..c461014e
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@@ -13,7 -13,7 +13,8 @@@ this is the *what*, and it is what Sett
**Fixed**
+- `ui` preserve workspace state and share dynamic shell layout
+ - `ci` stop the CodeQL analysis job from gating on open alerts
- `export` create the markdown export atomically, closing a TOCTOU write
- `a11y` scope the drawer inert to the compact layout
- `tui` the panel no longer scrolls itself away, and command output survives (#261)
diff --cc docs/PROGRESS.md
index dfd4d1c9,ae026f74..d98ba940
--- a/docs/PROGRESS.md
+++ b/docs/PROGRESS.md
@@@ -1,22 -1,76 +1,95 @@@
+## 2026-11-03: dynamic shell presentation and workspace recovery (local verification)
+
+The shell manifest now accepts per-shell layout metrics. Feature frames can override those
+metrics while shared controls, dialogs and the Integrations iframe inherit the active values.
+Viewport projection preserves preferred window geometry across resize, shell changes and
+reload; layout persistence flushes before page exit and ignores malformed cache entries.
+
+Mobile shells forward window identity to shared feature state. URL sync defers rewrites until
+a restored connected app appears in the asynchronous registry, preserving reload on phones.
+
+Integrations uses opaque navigation, one sidebar scroll, initial compact-pane inert state,
+deduplicated account badges and an explicit same-origin ready handshake. Workflows adds a
+real Sources action, distinct empty/filter states and unsaved-change guards. Desktop widgets
+remain reachable after resize, the dock keeps a usable size floor, n8n refreshes cancel stale
+requests, and live System Monitor no longer displays a fabricated GPU gauge.
+
+Validation and release status are recorded in `docs/UI-UX-FOUNDATION.md`. This entry describes
+local work on the task branch; it does not claim deployment or release to main.
+
+ ## 2026-11-03 (later): the security gate was gating itself
+
+ Two CodeQL alerts were open when this session started, and both turned out to be the same
+ kind of problem: a check that measured the wrong thing.
+
+ ### #197 js/file-system-race, high, `scripts/mso-agent-export-markdown.mjs:191`
+
+ Real bug. The overwrite refusal was a check-then-write:
+
+ ```js
+ if (fs.existsSync(resolved) && !force) throw ...
+ fs.writeFileSync(resolved, content, "utf8");
+ ```
+
+ Anything created between those lines was silently overwritten — the exact case the guard exists
+ to prevent. Fixed by letting the kernel decide: `flag: "wx"` creates-or-fails in one operation,
+ and `EEXIST` maps back to the same user-facing message. `mkdir` lost its `existsSync` too, since
+ `recursive: true` already treats an existing directory as success.
+
+ **The first version of the test passed against the vulnerable code.** It called the function
+ twice and checked it refused — but both shapes refuse in the same cases, so behaviour cannot
+ distinguish them. The difference is a window neither call can observe. Test 4b now spies on
+ `writeFileSync` and requires the exclusive flag:
+
+ ```
+ red (old shape): expected [ undefined ] to include 'wx'
+ green (fix): 7/7
+ ```
+
+ ### #137 Scorecard SASTID, "29 of 30 commits checked"
+
+ Not a finding. A **closed loop in CI**, which is why it had been open since 2026-09-17:
+
+ ```
+ one open alert -> CodeQL analysis run red
+ red analysis -> Scorecard counts that commit as not SAST-checked
+ its SASTID alert stays open -> keeps the analysis step red
+ ```
+
+ `codeql.yml` ran `security-alerts.mjs` in failing mode inside the analysis job, while
+ `security-alerts.yml` already gated on the same inventory. Two gates, one of them self-defeating:
+ **57 of the last 100 CodeQL runs on `main` were red**, every one reporting
+ `CODE_SCANNING_OPEN 1` — the Scorecard alert, never a code finding.
+
+ The analysis step now passes `--inventory` (report, annotate, exit 0). `security-alerts.yml`
+ keeps the failing gate, unchanged.
+
+ **And the test had the loop baked in**: `scripts/security-alerts.test.ts` asserted that
+ `codeql.yml` may *never* contain `--inventory`. Written to stop a gate being weakened, it
+ required the duplicate that caused the loop. The invariant is "exactly one gate", not "two", so
+ it now asserts report-only for `codeql.yml` and still-strict for `security-alerts.yml`. Red first:
+ removing `--inventory` fails with `expected false to be true`.
+
+ ### Result
+
+ ```
+ open code-scanning alerts 0 (#137 and #197 both fixed)
+ dependabot alerts 0
+ bun run coverage 1009 files / 6562 tests, rc=0
+ audit.mjs --strict clean at high/critical
+ main 4c69c354, tree clean, remote heads: main only
+ open PRs 0
+ all workflows on main success (Security alert inventory included)
+ ```
+
+ Lesson worth keeping: a red gate is evidence only if it measures the thing it claims to. Two of
+ these three defects were in the checks, not the code.
+
+ ### Still open
+
+ - `perf-baseline.json` predates several dependency bumps; re-measure on an idle host.
+ - Local branches from other tracks remain under `~/.cache/mso-worktrees` and own their worktrees.
+ Left alone.
## 2026-11-03: integrations UI closed out, and one merged fix that had been silently deleted
Everything below is merged. `main` at `269b6721`, working tree clean, gate green.