Wire Report actions, harden /api/analyze errors, enrich HAR picker#1
Merged
Merged
Conversation
…cker Item 1 — Report actions: Re-run and Export-markdown were rendering but non-functional. Re-run now re-fires whichever input produced the current Report (composer state, uploaded HAR, fixture id, captured DevTools entry). Export-markdown copies a TS-port of core.render.markdown to the clipboard with a transient "Copied" indicator. Share is hidden in v1 — persistence is out of scope; comment in ReportView gates re-enabling it. Item 2 — Extension on certain targets: backend pipeline traced end-to-end with simulated chrome.devtools.network.Request payloads (rich + minimal) against the production Lambda — all produced the expected auth.missing finding for httpbin/401, so no fix shipped for that specific symptom. The trace did surface a real category bug: malformed HAR entries (missing request.method/url, non-integer/out-of-range response.status) were escaping as KeyError or Pydantic ValidationError and yielding silent 500s. parse_har now validates required request fields up front and the Lambda handler catches both ValueError and KeyError, so the user sees an actionable 400 detail instead. Regression tests cover the previous silent-500 paths plus the chrome.devtools.network.Request-shaped 401 end-to-end. expired.badssl.com is now a named example in the extension README's known-limitations section. Item 3 — HAR picker meta: post-upload display now also shows uncompressed file size, capture date (log.pages[0].startedDateTime preferred, entries[0].startedDateTime fallback), and unique-host count. Fields omit cleanly when absent. Strip-banner placement unchanged. CHANGELOG [Unreleased] reflects all three. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three small, independently revertable changes:
Re-runandExport markdownnow work;Share reportis hidden in v1 (persistence is out of scope). Re-run re-fires the input that produced the current Report (composer state / uploaded HAR / fixture / captured DevTools entry). Export markdown copies a TS port ofcore.render.markdownto the clipboard with a transient "Copied" indicator. Comment inReportViewgates re-enabling Share once persistence ships.chrome.devtools.network.Requestpayload shape (rich + minimal, with/without headers, with status as int/string) produced the expectedauth.missingfinding end-to-end. The trace surfaced a real category bug: malformed entries with missingrequest.method/request.urlor non-integer / out-of-rangeresponse.statuswere escaping asKeyErroror PydanticValidationErrorand yielding silent 500s.parse_harnow validates required request fields up front; the Lambda handler also catchesKeyErrorso any post-parse engine failure returns a 400 withdetailrather than a generic 500.expired.badssl.comis now a named example inextension/README.mdknown-limitations.log.pages[0].startedDateTimepreferred,entries[0].startedDateTimefallback), and unique-host count. Fields omit cleanly when absent. Strip-banner placement unchanged.Decisions worth flagging
ReportView.tsx.frontend/src/lib/markdown.ts. The Report is already in React state with all data needed, so client-side keeps it less invasive than a backend round-trip.JSON.stringifyof a realchrome.devtools.network.Request(some properties may be non-enumerable getters) — the regression tests added here will catch any drift in either the parser shape or the panel render path.Test plan
pytest— 330 passed (was 322; +8 acrosstest_parser.pyandtest_lambda_handler.py)ruff check .— cleanruff format --check .— cleanfrontend tsc -b— cleanextension tsc -b— cleanfrontend vitest— 73 passed (was 66; +7 in ReportView/RequestComposer/HarUpload)extension vitest— 17 passed (was 16; +1 regression for the 401 path)frontend npm run build+extension npm run build— both succeedfrontendvianpm run dev, exercise Run / HAR / Demos tab actions; loadextension/dist/unpacked and exercise the panel againsthttps://httpbin.org/status/401. Recommended before merge — sandbox couldn't drive a browser.Out of scope (noticed, not fixed)
None on the paths I touched.
🤖 Generated with Claude Code