From a7af3900bd65f625da068aab69ead48961c8e7e4 Mon Sep 17 00:00:00 2001 From: can1357 Date: Mon, 25 May 2026 20:27:22 +0200 Subject: [PATCH] feat(coding-agent/task): added parent-aware labels to nested live task snapshots - Updated nested task-rendering tests to use parent-qualified IDs for completed child task results. - Updated in-flight nested snapshot expectations to verify parent-aware `Parent>Subtask` labeling. - Documented the live nested task rendering behavior in the package changelog. --- packages/coding-agent/CHANGELOG.md | 1 + .../test/task/render-nested-live.test.ts | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 3b6070933..3e8a3404c 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -5,6 +5,7 @@ - Added inline `|TEXT` payload support to `»` and `«` hashline insert operations, allowing single-line inserts on the op line and still supporting additional payload lines - Added support for using inline payloads with BOF/EOF inserts so `|TEXT` is treated as inserted content at file boundaries +- Added live nested-`task` rendering: while a subagent is mid-flight, the parent UI now surfaces both completed nested `task` sub-calls and the in-flight nested snapshot (forwarded from `tool_execution_update`), matching the finished-result tree - Added `omp auth-gateway check` (and matching `GET /v1/credentials/check` endpoint) — probes each broker-supplied credential against its provider's auth-verifying usage endpoint and prints per-credential health, so when a multi-account pool starts returning 401s you can identify which row in the broker is the bad one. The existing `/v1/usage` endpoint silently drops failed credentials, which is the wrong shape for diagnosing auth — the new endpoint captures errors and surfaces the credential's id, provider, type, email/accountId, and the upstream error string. CLI groups results per-provider, exits non-zero when any credential failed, and supports `--json` for scripting. The probe also exercises OAuth refresh on expired tokens, so a working refresh + working access reports as `ok` and a revoked refresh token reports as `oauth refresh failed: …` instead of being masked by the cached expired access token. ### Fixed diff --git a/packages/coding-agent/test/task/render-nested-live.test.ts b/packages/coding-agent/test/task/render-nested-live.test.ts index 111acaaeb..17aad3725 100644 --- a/packages/coding-agent/test/task/render-nested-live.test.ts +++ b/packages/coding-agent/test/task/render-nested-live.test.ts @@ -90,14 +90,15 @@ describe("task renderer: nested live rendering", () => { it("renders completed nested task results stored in extractedToolData.task while parent is in-progress", async () => { const parent = makeRunningProgress({ + id: "1-Parent", recentTools: [{ tool: "task", args: "", endMs: Date.now() }], extractedToolData: { task: [ { projectAgentsDir: null, results: [ - makeCompletedSubResult("1.0-AlphaSub", "Alpha child"), - makeCompletedSubResult("1.1-BetaSub", "Beta child"), + makeCompletedSubResult("1-Parent.0-AlphaSub", "Alpha child"), + makeCompletedSubResult("1-Parent.1-BetaSub", "Beta child"), ], totalDurationMs: 1000, } satisfies TaskToolDetails, @@ -109,11 +110,12 @@ describe("task renderer: nested live rendering", () => { // Parent label is intact. expect(text).toContain("Parent Level 1 work"); - // Both nested completed children labels surface. + // Both nested completed children labels surface (formatTaskId collapses + // dotted ids → "1.0 Parent>AlphaSub"). expect(text).toContain("Alpha child"); expect(text).toContain("Beta child"); - expect(text).toContain("1.0 AlphaSub"); - expect(text).toContain("1.1 BetaSub"); + expect(text).toContain("1.0 Parent>AlphaSub"); + expect(text).toContain("1.1 Parent>BetaSub"); }); it("renders the in-flight nested task snapshot (progress[]) before the call ends", async () => { @@ -122,11 +124,12 @@ describe("task renderer: nested live rendering", () => { results: [], totalDurationMs: 0, progress: [ - makeRunningSubProgress("2.0-GammaSub", "Gamma child running"), - makeRunningSubProgress("2.1-DeltaSub", "Delta child running"), + makeRunningSubProgress("2-Parent.0-GammaSub", "Gamma child running"), + makeRunningSubProgress("2-Parent.1-DeltaSub", "Delta child running"), ], }; const parent = makeRunningProgress({ + id: "2-Parent", currentTool: "task", currentToolStartMs: Date.now(), inflightTaskDetails: inflight, @@ -137,8 +140,8 @@ describe("task renderer: nested live rendering", () => { expect(text).toContain("Parent Level 1 work"); expect(text).toContain("Gamma child running"); expect(text).toContain("Delta child running"); - expect(text).toContain("2.0 GammaSub"); - expect(text).toContain("2.1 DeltaSub"); + expect(text).toContain("2.0 Parent>GammaSub"); + expect(text).toContain("2.1 Parent>DeltaSub"); }); it("combines completed and in-flight nested snapshots in one tree", async () => {