diff --git a/web/hwlab-cloud-web/scripts/agent-observer-contract.test.ts b/web/hwlab-cloud-web/scripts/agent-observer-contract.test.ts index 5ef315aa..ae75d83b 100644 --- a/web/hwlab-cloud-web/scripts/agent-observer-contract.test.ts +++ b/web/hwlab-cloud-web/scripts/agent-observer-contract.test.ts @@ -27,9 +27,16 @@ test("Agent observer relation tree consumes the YAML node limit", () => { assert.equal(window.rows.length, 3); }); +test("Agent observer relation tree keeps a stable order across live activity reordering", () => { + const first = buildRelationWindow([observerRun("run_2"), observerRun("run_1")], null, new Set(), new Set(), 10); + const second = buildRelationWindow([observerRun("run_1"), observerRun("run_2")], null, new Set(), new Set(), 10); + assert.deepEqual(first.rows.map((row) => row.id), second.rows.map((row) => row.id)); +}); + function observerRun(id: string): AgentObserverRun { return { id, + title: null, taskId: null, taskStatus: null, commandId: null, diff --git a/web/hwlab-cloud-web/src/components/agents/AgentRunMindMap.vue b/web/hwlab-cloud-web/src/components/agents/AgentRunMindMap.vue index ee801755..ac616e69 100644 --- a/web/hwlab-cloud-web/src/components/agents/AgentRunMindMap.vue +++ b/web/hwlab-cloud-web/src/components/agents/AgentRunMindMap.vue @@ -1,5 +1,5 @@