Skip to content

Guard validate UI against submitting with no artifact - #16

Merged
ErenAri merged 1 commit into
mainfrom
fix/validate-ui-missing-artifact-guard
Jun 19, 2026
Merged

ErenAri merged 1 commit into
mainfrom
fix/validate-ui-missing-artifact-guard

Conversation

@ErenAri

@ErenAri ErenAri commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What

The Validate panel sent the request even when no .bpf.o (artifact tab) or source (source tab) was provided, so the server rejected it with a raw HTTP 400: provide artifact_file, source_file, or source_code. Reported as "can't run validation on the live demo, 400 error".

Fix

Client-side guard in internal/api/ui.go that blocks submit and shows a clear message before sending:

  • artifact tab, no file → "Choose a compiled BPF object (.bpf.o) to validate, or switch to the source tab."
  • source tab, no source → "Provide BPF source (upload a .c file or paste source code) before running."

Testing

  • go test ./internal/api/ passes
  • Verified the live backend itself is healthy: ran a real validation against bpfcompat.kernelguard.net end-to-end (202 → completed, exit_code 0)
  • Built the binary, served locally, confirmed both guard strings render in the UI

🤖 Generated with Claude Code

Clicking Run in the Validate panel without selecting a .bpf.o (artifact
tab) or providing source (source tab) sent a request with no artifact,
so the server rejected it with a raw HTTP 400
("provide artifact_file, source_file, or source_code").

Add a client-side check that blocks the submit and shows a clear,
actionable message before the request is sent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ErenAri
ErenAri merged commit ace468d into main Jun 19, 2026
7 of 8 checks passed
@ErenAri
ErenAri deleted the fix/validate-ui-missing-artifact-guard branch June 19, 2026 11:23
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.

1 participant