Skip to content

Commit 06fcae0

Browse files
cliffhallclaude
andcommitted
docs(network): clarify body-update emits list event only (#1387 sixth pass) (#1386)
Sixth-pass review (LGTM, all nits). Added a comment on `onFetchRequestBodyUpdate` noting it re-emits only `fetchRequestsChange`, not the per-entry `fetchRequest` event — list-reading consumers pick up the body on the next render; a future per-entry subscriber would need its own event. Other items left as-is per the review: full-string `BodyPreview` key (#1, micro-perf only if profiled), NaN under a sensitive key (#3, consistent with the mask-non-null-non-empty contract), `&`-only form separator (#4, OAuth never emits `;`). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 parent 2237d2d commit 06fcae0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎core/mcp/state/fetchRequestLogState.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ export class FetchRequestLogState extends TypedEventTarget<FetchRequestLogStateE
9292
...this.fetchRequests[idx]!,
9393
responseBody,
9494
};
95+
// Body fill-in re-emits the list event only, not the per-entry
96+
// `fetchRequest` event (that one fires once, on append). Consumers read
97+
// the full list (`useFetchRequests`), so they pick up the body on the
98+
// next list re-render. A future per-entry subscriber wanting incremental
99+
// body updates would need its own event here.
95100
this.dispatchTypedEvent("fetchRequestsChange", this.getFetchRequests());
96101
};
97102
this.client.addEventListener(

0 commit comments

Comments
 (0)