diff --git a/actions/setup/js/log_parser_bootstrap.cjs b/actions/setup/js/log_parser_bootstrap.cjs index 782da3d536a..47753b8051f 100644 --- a/actions/setup/js/log_parser_bootstrap.cjs +++ b/actions/setup/js/log_parser_bootstrap.cjs @@ -63,9 +63,13 @@ async function runLogParser(options) { logEntries: [], }; - // Write to step summary directly + // Write to step summary, wrapped in details/summary section if (result.markdown) { - core.summary.addRaw(result.markdown); + const wrappedMarkdown = wrapAgentLogInSection(result.markdown, { + parserName, + open: true, + }); + core.summary.addRaw(wrappedMarkdown); await core.summary.write(); core.info(`Wrote conversation markdown to step summary (${Buffer.byteLength(result.markdown, "utf8")} bytes)`); } diff --git a/actions/setup/js/log_parser_bootstrap.test.cjs b/actions/setup/js/log_parser_bootstrap.test.cjs index 57c08a8ba29..e5645863323 100644 --- a/actions/setup/js/log_parser_bootstrap.test.cjs +++ b/actions/setup/js/log_parser_bootstrap.test.cjs @@ -45,7 +45,7 @@ describe("log_parser_bootstrap.cjs", () => { (runLogParser({ parseLog: mockParseLog, parserName: "TestParser" }), expect(mockParseLog).toHaveBeenCalledWith("Test log content"), expect(mockCore.info).toHaveBeenCalledWith("TestParser log parsed successfully"), - expect(mockCore.summary.addRaw).toHaveBeenCalledWith("
\n🤖 TestParser CLI Session\n\n## Parsed Log\n\nSuccess!\n
"), + expect(mockCore.summary.addRaw).toHaveBeenCalledWith("
\nAgentic Conversation\n\n## Parsed Log\n\nSuccess!\n
"), expect(mockCore.summary.write).toHaveBeenCalled(), fs.unlinkSync(logFile), fs.rmdirSync(tmpDir)); @@ -57,7 +57,7 @@ describe("log_parser_bootstrap.cjs", () => { const mockParseLog = vi.fn().mockReturnValue({ markdown: "## Result\n", mcpFailures: [], maxTurnsHit: !1 }); (runLogParser({ parseLog: mockParseLog, parserName: "TestParser" }), expect(mockCore.info).toHaveBeenCalledWith("TestParser log parsed successfully"), - expect(mockCore.summary.addRaw).toHaveBeenCalledWith("
\n🤖 TestParser CLI Session\n\n## Result\n\n
"), + expect(mockCore.summary.addRaw).toHaveBeenCalledWith("
\nAgentic Conversation\n\n## Result\n\n
"), expect(mockCore.setFailed).not.toHaveBeenCalled(), fs.unlinkSync(logFile), fs.rmdirSync(tmpDir)); @@ -223,14 +223,17 @@ More content.`; const mockParseLog = vi.fn(); runLogParser({ parseLog: mockParseLog, parserName: "Copilot", supportsDirectories: true }); - // Should transform headers (# to ##, ## to ###, etc.) + // Should transform headers (# to ##, ## to ###, etc.) and wrap in details/summary const summaryCall = mockCore.summary.addRaw.mock.calls[0]; expect(summaryCall).toBeDefined(); + // Content should be wrapped in details/summary with "Agentic Conversation" title + expect(summaryCall[0]).toContain("
"); + expect(summaryCall[0]).toContain("Agentic Conversation"); + expect(summaryCall[0]).toContain("
"); + // Should transform headers (# to ##, ## to ###, etc.) expect(summaryCall[0]).toContain("## Main Title"); expect(summaryCall[0]).toContain("### Section 1"); expect(summaryCall[0]).toContain("#### Subsection"); - // Verify the original header level was transformed (check start of line) - expect(summaryCall[0].split("\n")[0]).toBe("## Main Title"); // Parser should not be called since conversation.md is used directly expect(mockParseLog).not.toHaveBeenCalled(); diff --git a/actions/setup/js/log_parser_shared.cjs b/actions/setup/js/log_parser_shared.cjs index f6c918bff69..b88fc1e5682 100644 --- a/actions/setup/js/log_parser_shared.cjs +++ b/actions/setup/js/log_parser_shared.cjs @@ -1430,8 +1430,7 @@ function wrapAgentLogInSection(markdown, options = {}) { } const openAttr = open ? " open" : ""; - const emoji = "🤖"; - const title = `${emoji} ${parserName} CLI Session`; + const title = "Agentic Conversation"; return `\n${title}\n\n${markdown}\n`; } diff --git a/actions/setup/js/log_parser_shared.test.cjs b/actions/setup/js/log_parser_shared.test.cjs index 6b157c27b47..43e2bc54762 100644 --- a/actions/setup/js/log_parser_shared.test.cjs +++ b/actions/setup/js/log_parser_shared.test.cjs @@ -2095,7 +2095,7 @@ describe("log_parser_shared.cjs", () => { const result = wrapAgentLogInSection(markdown, { parserName: "Copilot" }); expect(result).toContain("
"); - expect(result).toContain("🤖 Copilot CLI Session"); + expect(result).toContain("Agentic Conversation"); expect(result).toContain(markdown); expect(result).toContain("
"); }); @@ -2106,7 +2106,7 @@ describe("log_parser_shared.cjs", () => { const markdown = "Test content"; const result = wrapAgentLogInSection(markdown, { parserName: "Claude" }); - expect(result).toContain("🤖 Claude CLI Session"); + expect(result).toContain("Agentic Conversation"); }); it("should allow closed state when open is false", async () => { @@ -2125,7 +2125,7 @@ describe("log_parser_shared.cjs", () => { const markdown = "Test content"; const result = wrapAgentLogInSection(markdown); - expect(result).toContain("🤖 Agent CLI Session"); + expect(result).toContain("Agentic Conversation"); }); it("should return empty string for empty or undefined markdown", async () => {