@scalio-cloud/ui 0.82.0 → 0.83.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/package.json +1 -1
- package/react/agent_scripts.js +5 -2
- package/react/agents.js +7 -2
package/README.md
CHANGED
|
@@ -625,6 +625,10 @@ list. Test IDs: `agents-panel`, `agents-code-create`, `agents-code-value`, `agen
|
|
|
625
625
|
`agent-role-<id>-<role>`, `agent-worker-state-<id>-<worker>`, `agent-worker-restart|stop|start-<id>-<worker>`,
|
|
626
626
|
`agent-block-<id>`, `agent-remove-<id>`, `agents-tasks`.
|
|
627
627
|
|
|
628
|
+
Since 0.83.0 the update state of an agent names the build (`Aktualisiert auf 2.0.0rc6`), not the version of the
|
|
629
|
+
offer, and `AgentScriptsPanel` opens the editor of a script in its own dialog (`PanelDialog`, also exported; test IDs
|
|
630
|
+
`agent-script-detail` = the dialog, `agent-script-dialog-close`; Markus 2026-11-15).
|
|
631
|
+
|
|
628
632
|
Since 0.82.0 (layout A, Markus 2026-11-15) the block is one column over the whole width, without the label column of
|
|
629
633
|
`SettingsSection`: a head with title, hint, «Agent herunterladen (MSI)» and «Agent hinzufügen» (a dialog with roles,
|
|
630
634
|
note and the one-time code), the open codes and the update rule each in one line, the agents with roles and worker
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalio-cloud/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.1",
|
|
4
4
|
"description": "Scalio Control Room design tokens, Tailwind preset, self-hosted fonts, the shared app header, sign-in layout, sidebar and page blocks",
|
|
5
5
|
"license": "SEE LICENSE IN README.md",
|
|
6
6
|
"private": false,
|
package/react/agent_scripts.js
CHANGED
|
@@ -12,6 +12,7 @@ const Icons = require("./icons");
|
|
|
12
12
|
const { StatusBadge } = require("./blocks");
|
|
13
13
|
const { SettingsSection, SettingsField: Field } = require("./settings");
|
|
14
14
|
const { askConfirm } = require("./dialog");
|
|
15
|
+
const { PanelDialog } = require("./agents");
|
|
15
16
|
|
|
16
17
|
const LABELS = {
|
|
17
18
|
de: {
|
|
@@ -266,7 +267,7 @@ function AgentScriptsPanel(props) {
|
|
|
266
267
|
h("input", { type: "radio", name: `agent-script-kind-${tid}`, checked: kind === k, disabled: busy || !canEdit, "data-testid": `agent-script-kind-${k}`,
|
|
267
268
|
onChange: () => { setKind(k); fillEditor(d, k); } }),
|
|
268
269
|
h("span", null, k === "hook" ? `${label}: ${d.hook}` : label)))));
|
|
269
|
-
parts.push(h("textarea", { key: "text", className: "scalio-input", rows:
|
|
270
|
+
parts.push(h("textarea", { key: "text", className: "scalio-input", rows: 20, value: text, disabled: busy || !canEdit, spellCheck: false,
|
|
270
271
|
"aria-label": L.content, "data-testid": "agent-script-content", style: { width: "100%", fontFamily: "var(--scalio-font-mono, monospace)" },
|
|
271
272
|
onChange: (e) => setText(e.target.value) }));
|
|
272
273
|
if (kind === "full") parts.push(h(DiffView, { key: "d", from: d.standard.content, to: text, testId: "agent-script-diff-edit" }));
|
|
@@ -284,7 +285,9 @@ function AgentScriptsPanel(props) {
|
|
|
284
285
|
(d.versions || []).length === 0 ? h("p", { className: "scalio-settings-text" }, L.noHistory)
|
|
285
286
|
: h("ul", { className: "scalio-settings-text" }, d.versions.map((v) => h("li", { key: v.number },
|
|
286
287
|
`${v.number} · ${v.kind === "hook" ? "Hook" : "Script"} · ${fill(L.by, { by: v.by })} · ${v.reason || ""}${v.status === "pending" ? ` · ${L.states.pending}` : ""}`)))));
|
|
287
|
-
|
|
288
|
+
// Markus 2026-11-15: the editor opens in its own dialog, not below the table
|
|
289
|
+
rows.push(h(PanelDialog, { key: "detail", title: `${d.worker} / ${d.name}`, L: { setClose: L.close }, onClose: () => setOpen(null),
|
|
290
|
+
testId: "agent-script-detail", closeTestId: "agent-script-dialog-close", maxWidth: "64rem" },
|
|
288
291
|
h("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" } }, parts)));
|
|
289
292
|
}
|
|
290
293
|
|
package/react/agents.js
CHANGED
|
@@ -596,7 +596,12 @@ function AgentsPanel(props) {
|
|
|
596
596
|
const u = a.update;
|
|
597
597
|
const out = [];
|
|
598
598
|
if (u && u.state) {
|
|
599
|
-
|
|
599
|
+
// The agent reports the version of the offer (2.0.0); show the build (2.0.0rc6): the running one after
|
|
600
|
+
// «installed», else the build of the bundle with that version (live test 2026-11-15).
|
|
601
|
+
const running = String(a.version || "").split("+")[0];
|
|
602
|
+
const bundled = upd && upd.available && upd.available.version === u.version && upd.available.build;
|
|
603
|
+
const shown = u.state === "installed" && running.startsWith(u.version || "\u0000") ? running : (bundled || u.version);
|
|
604
|
+
const text = fill((L.updStates || {})[u.state] || u.state, { version: shown, from: String(u.from_version || a.version || "").split("+")[0], reason: u.reason || "–" });
|
|
600
605
|
out.push(h("div", { key: "s" }, h(StatusBadge, { tone: UPDATE_TONE[u.state] || "neutral", testId: `agent-update-state-${a.id}` }, text)));
|
|
601
606
|
}
|
|
602
607
|
if (a.scripts) {
|
|
@@ -709,4 +714,4 @@ function AgentsPanel(props) {
|
|
|
709
714
|
return h("section", { className: "scalio-agents", id: "settings-agent", "data-testid": "agents-panel" }, rows);
|
|
710
715
|
}
|
|
711
716
|
|
|
712
|
-
module.exports = { AgentsPanel, agentsApi, agentInstallCommand: installCommand, AGENT_LABELS: LABELS };
|
|
717
|
+
module.exports = { AgentsPanel, PanelDialog, agentsApi, agentInstallCommand: installCommand, AGENT_LABELS: LABELS };
|