Skip to content
Open
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
18 changes: 18 additions & 0 deletions services/hackbot-ui/components/RunDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ function commentPreview(a: RunAction): string | null {

const POLL_MS = 4000;

const BUGZILLA_URL = "https://bugzilla.mozilla.org/show_bug.cgi?id=";

Comment on lines +22 to +23
function formatBytes(n: number): string {
if (n < 1024) return `${n} B`;
if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`;
Expand Down Expand Up @@ -132,6 +134,8 @@ export function RunDetail({ runId }: { runId: string }) {
}

const log = extractLog(run);
const bugId =
typeof run.inputs.bug_id === "number" ? run.inputs.bug_id : null;
const findings = run.summary?.findings ?? {};
const hasFindings = Object.keys(findings).length > 0;

Expand Down Expand Up @@ -173,6 +177,20 @@ export function RunDetail({ runId }: { runId: string }) {
<dd>{run.run_id}</dd>
<dt>Agent</dt>
<dd>{run.agent}</dd>
{bugId !== null && (
<>
<dt>Bug</dt>
<dd>
<a
href={`${BUGZILLA_URL}${bugId}`}
target="_blank"
rel="noreferrer"
>
Bug {bugId}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be redundant

Suggested change
Bug {bugId}
{bugId}

</a>
</dd>
</>
)}
<dt>Inputs</dt>
<dd>{JSON.stringify(run.inputs)}</dd>
<dt>Created</dt>
Expand Down