request insights: expose dev snapshots to tools and HMR (3/5) (#93976)
## What
Adds the `experimental.requestInsights` flag, a private dev snapshot
endpoint, and HMR snapshot/update transport so running dev servers can
expose recent request insights to tools and browser clients.
Stack:
1. request insights: record local framework spans (1/5)
2. request insights: derive request history and fetch data (2/5)
3. request insights: expose dev snapshots to tools and HMR (3/5) ←
current
4. request insights: add agent diagnosis access (4/5)
5. request insights: add DevTools request panel (5/5)
## Review Focus
- Dev-only gating for `experimental.requestInsights`.
- Private endpoint behavior when enabled and disabled.
- HMR snapshot/update shape and client-side retention.
## Proof In This PR
- `pnpm --filter=next types`
- Stack-tip Cache Components smoke verifies the endpoint and HMR-fed
overlay state against a running dev server.
## Deferred Coverage
- A dedicated isolated dev-server transport test can follow if reviewers
want cheaper per-PR coverage than the stack-tip smoke.
<!-- NEXT_JS_LLM_PR -->
---------
Co-authored-by:
Tim Neutkens <tim@timneutkens.nl>
Showing
Please
register
or
sign in
to comment