inspector/clients/web/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall bb01c1e73b fix: bound the body by draining a clone, not by rebuilding (#2319 round 21)
Rebuilding a Response around the buffered bytes could never be
faithful. `url`, `redirected` and `type` are internal slots, so
shadowing them as own properties satisfied a direct read and was lost
the moment a caller called clone() — which returns a fresh native
Response. The headers guard differed too, and the decoded bytes made
the inherited content-encoding and content-length wrong, so those had
to be stripped: four observable differences from the response fetch
actually produced.

The wrapper now drains `response.clone()` under the deadline and
returns the original. Cloning tees the body, so draining one branch
buffers the other: the bound is unchanged, the caller reads without a
second trip, and every native slot stays intact. rebuildResponse and
its null-body handling are gone, and with them the whole class.

Also: getServerUrl() throws for a non-HTTP configuration, and this
wrapped fetch can still be handed to a transport or a custom factory
that calls it — so the documented fail-open was reachable only until
that getter threw, at which point a configuration error propagated out
of a fetch. Caught, for the same reason readNegotiatesEndpoint catches.

Tests: response identity, the body still readable after the drain, a
re-clone keeping its metadata (the case a rebuild could not satisfy),
content-encoding preserved because nothing invalidates it now, a
null-body status passed through, and the throwing getter failing open
while still not slipping past the form-encoded check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YFnM6RqB4nXqNysgUYmjmq
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-09-11 07:25:56 -04:00
..
components fix: address Copilot review round 18 on #2248 2026-09-07 23:33:30 -04:00
hooks feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check 2026-09-07 18:10:37 -04:00
lib fix: the classifier does not survive structuredClone, and the test now proves it 2026-09-07 11:16:51 -04:00
test fix: bound the body by draining a clone, not by rebuilding (#2319 round 21) 2026-09-11 07:25:56 -04:00
theme Merge branch 'v2/main' into v2/feat/2263-skills-detail-pane 2026-09-06 08:42:37 -04:00
types chore: close a batch of quality-gate & tidy gaps (#1785 #1787 #1789 #1790 #1767) (#1792) 2026-07-26 10:43:11 -04:00
utils feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check 2026-09-07 18:10:37 -04:00
App.css feat(web): use the Ace JSON editor everywhere, and restore the raw-JSON toggle 2026-08-27 02:24:22 -04:00
App.test.tsx fix: resolve the clear's identity from the live client, in one place (#2217) 2026-09-04 00:02:45 -04:00
App.tsx feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check 2026-09-07 18:10:37 -04:00
index.ts feat: port CLI, TUI, and launcher from v1.5 into v2 (#1452) 2026-06-14 20:27:49 -04:00
main.tsx fix(a11y): make the form error color meet WCAG AA in both schemes 2026-08-23 12:56:13 -04:00