Add dev overlay with resource timestamps and tool timing#26
Merged
Conversation
The dev server now injects a small overlay into every resource showing
when the HTML was served and how long the tool handler took. Both values
are baked into the HTML at readResource time; the inspector also updates
timing live via _meta._sunpeak.requestTimeMs on PostMessage.
The overlay is dev-only (never in production builds) and can be disabled
via the devOverlay=false URL param, SUNPEAK_DEV_OVERLAY=false env var,
or defineLiveConfig({ devOverlay: false }). Template e2e tests hide it
by default; a dedicated dev-overlay.spec.ts (excluded from sunpeak new)
tests the overlay itself. The standalone inspector injects the overlay
into resources from arbitrary MCP servers too.
Also adds sidebar=false URL param to hide the inspector sidebar.
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
_meta._sunpeak.requestTimeMson tool results so the overlay updates live on inspector Re-run. The standalone inspector also injects the overlay into resources from arbitrary MCP servers.sidebar=falseanddevOverlay=falseURL params,SUNPEAK_DEV_OVERLAY=falseenv var, anddefineLiveConfig({ devOverlay: false })for controlling visibility. Template e2e tests hide the overlay by default via ahelpers.tswrapper;dev-overlay.spec.tstests the overlay itself (excluded fromsunpeak new).Test plan
devOverlay: false(4 resource tests without overlay clutter)