refactor: simplify error display to show clean error messages only

- Remove collapsible <details> section for error messages
- Display errors in simple code blocks since messages are now clean and short
- Makes error messages more direct and readable

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ashwin Bhat
2025-05-28 17:55:40 -07:00
parent baa1ecb265
commit 44e276ae4f
2 changed files with 3 additions and 5 deletions

View File

@@ -183,7 +183,7 @@ export function updateCommentBody(input: CommentUpdateInput): string {
// Add error details if available
if (actionFailed && errorDetails) {
newBody += `\n\n<details>\n<summary>Error details</summary>\n\n\`\`\`\n${errorDetails}\n\`\`\`\n\n</details>`;
newBody += `\n\n\`\`\`\n${errorDetails}\n\`\`\``;
}
newBody += `\n\n---\n`;

View File

@@ -51,11 +51,9 @@ describe("updateCommentBody", () => {
const result = updateCommentBody(input);
expect(result).toContain("**Claude encountered an error after 45s**");
expect(result).toContain("[View job]");
expect(result).toContain("<details>");
expect(result).toContain("<summary>Error details</summary>");
expect(result).toContain("Failed to fetch issue data");
expect(result).toContain("```\nFailed to fetch issue data\n```");
// Ensure error details come after the header/links
const errorIndex = result.indexOf("<details>");
const errorIndex = result.indexOf("```");
const headerIndex = result.indexOf("**Claude encountered an error");
expect(errorIndex).toBeGreaterThan(headerIndex);
});