Skip to content

Add a patch panel to preview a run's changes - #6856

Open
evgenyrp wants to merge 1 commit into
mozilla:masterfrom
evgenyrp:build-repair-patch-panel-ui
Open

evgenyrp wants to merge 1 commit into
mozilla:masterfrom
evgenyrp:build-repair-patch-panel-ui

Conversation

@evgenyrp

@evgenyrp evgenyrp commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

The panel looks like this. I dropped the description because the agent doesn't commit the changes by design now. It will be a part of the Phabricator action.
Screenshot 2026-09-15 at 3 44 19 PM

@evgenyrp
evgenyrp requested a review from a team as a code owner September 15, 2026 20:37
Comment on lines +41 to +51
const res = await fetch(url, { cache: "no-store" });
if (!res.ok) {
throw new HackbotError(
`Could not read ${artifactName} (${res.status})`,
res.status
);
}
const buf = await res.arrayBuffer();
const truncated = buf.byteLength > RAW_MAX_BYTES;
const text = new TextDecoder().decode(buf.slice(0, RAW_MAX_BYTES));
return NextResponse.json({ text, truncated });

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.

Why are we doing this here instead of on the client side? The redirect approach makes it free for us since the artifacts are served from GCS directly instead of us processing it in the middle.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This requires setting a CORS policy on the results bucket

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Either way works for me. All this code is expendable.

Comment thread services/hackbot-ui/components/PatchView.tsx
@evgenyrp
evgenyrp force-pushed the build-repair-patch-panel-ui branch from b49098a to 5eab40f Compare September 15, 2026 22:42
@evgenyrp evgenyrp changed the title feat(hackbot-ui): Add a patch panel to preview a run's changes Add a patch panel to preview a run's changes Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants