Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/frontend/src/pages/TasksPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ describe("TasksPage", () => {
);

expect(await screen.findByText("Diagnostics")).toBeInTheDocument();
expect(screen.getByText(/Error: captured stderr/)).toBeInTheDocument();
expect(screen.getByText(/Stdout: line-11/)).toBeInTheDocument();
expect(screen.getByText("Error")).toBeInTheDocument();
expect(screen.getByText("captured stderr")).toBeInTheDocument();
expect(screen.getByText("Stdout")).toBeInTheDocument();
expect(screen.getByText(/line-11/)).toBeInTheDocument();
});

it("shows fallback diagnostics label when no diagnostics exist", async () => {
Expand Down
20 changes: 9 additions & 11 deletions packages/frontend/src/pages/TasksPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ const formatErrorText = (value?: string | null) => {
if (!value || !value.trim()) {
return "-";
}
const normalized = value.trim();
if (normalized.length <= 80) {
return normalized;
}
return `${normalized.slice(0, 77)}...`;
return value.trim();
};

const formatWorkflowLastRun = (workflow: WorkspaceWorkflowSummary) => {
Expand Down Expand Up @@ -93,12 +89,14 @@ const renderWorkflowDiagnosticsSummary = (diagnostics: WorkflowDiagnostics) => {
<span>Started: {formatDateTime(diagnostics.lastStartedAt)}</span>
<span>Finished: {formatDateTime(diagnostics.lastFinishedAt)}</span>
</div>
<div className="meta-secondary">
Error: {formatErrorText(diagnostics.lastStderr ?? diagnostics.lastError)}
</div>
<div className="meta-secondary">
Stdout: {formatErrorText(diagnostics.lastStdout)}
</div>
<div className="meta-secondary">Error</div>
<pre className="workflow-diagnostics__output">
{formatErrorText(diagnostics.lastStderr ?? diagnostics.lastError)}
</pre>
<div className="meta-secondary">Stdout</div>
<pre className="workflow-diagnostics__output">
{formatErrorText(diagnostics.lastStdout)}
</pre>
</details>
);
};
Expand Down
14 changes: 14 additions & 0 deletions packages/frontend/src/styles/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -483,3 +483,17 @@
gap: 0.35rem;
cursor: pointer;
}

.workflow-diagnostics__output {
margin: 0;
max-height: 12rem;
overflow: auto;
white-space: pre-wrap;
word-break: break-word;
padding: 0.5rem 0.6rem;
border-radius: 0.5rem;
border: 1px solid var(--panel-border);
background: var(--surface-strong);
color: var(--text);
font-size: 0.82rem;
}
Loading