Repository navigation
feat: Debugger session integration P3 —— Debugger Pane and Trace Detail View #10715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cwangsmv
merged 9 commits into
develop
from
feat/cp-debug-integration-stack-debugger-as-global-tab
Nov 16, 2026
+1,139
−84
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5d6ba2f
feat(konnect): add debug session api integration
cwangsmv 7a3306a
add konnect debugger type
cwangsmv b129556
ui enhance
cwangsmv de17e9b
fix debug session error display ui
cwangsmv 53c762b
fix help link url
cwangsmv af2b504
update trace logics
cwangsmv 0306cfe
update trace helper and link ui
cwangsmv cb5a007
Add more elegant way to handle exceptions
cwangsmv c0bca98
fix from comment
cwangsmv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| import type { GrpcRequest, Request, WebSocketRequest, Workspace, WorkspaceChildrenForScope } from 'insomnia-data'; | ||
| import { models } from 'insomnia-data'; | ||
|
|
||
| import { getRouteIdFromKonnectRouteKey, type TraceSummaryBreakdown } from './debug-trace-helper'; | ||
|
|
||
| export interface KonnectRouteRequest { | ||
| request: Request | WebSocketRequest | GrpcRequest; | ||
| workspaceId: string; | ||
| workspaceName: string; | ||
| routeId: string; | ||
| /** Method and protocol segments of the konnectRouteKey. */ | ||
| method: string; | ||
| protocol: string; | ||
| } | ||
|
|
||
| // Local requests of the given workspaces that were synced from a Konnect route. | ||
| export function listKonnectRouteRequests( | ||
| workspaces: Pick<Workspace, '_id' | 'name'>[], | ||
| childrenByWorkspaceId: ReadonlyMap<string, WorkspaceChildrenForScope<'collection' | 'design'>>, | ||
| ): KonnectRouteRequest[] { | ||
| return workspaces.flatMap(workspace => | ||
| (childrenByWorkspaceId.get(workspace._id)?.data.requestsAndGroups ?? []).flatMap(doc => { | ||
| if ( | ||
| !models.request.isRequest(doc) && | ||
| !models.webSocketRequest.isWebSocketRequest(doc) && | ||
| !models.grpcRequest.isGrpcRequest(doc) | ||
| ) { | ||
| return []; | ||
| } | ||
| const routeId = getRouteIdFromKonnectRouteKey(doc.konnectRouteKey); | ||
| if (!routeId) { | ||
| return []; | ||
| } | ||
| // konnectRouteKey is `${route.id}:${method}:${pathSegment}:${protocol}`; the path may contain ':'. | ||
| const segments = doc.konnectRouteKey!.split(':'); | ||
| const method = (segments[1] ?? '').toUpperCase(); | ||
| const protocol = (segments.at(-1) ?? '').toUpperCase(); | ||
| return [{ request: doc, workspaceId: workspace._id, workspaceName: workspace.name, routeId, method, protocol }]; | ||
| }), | ||
| ); | ||
| } | ||
|
|
||
| // Picks the local request for a trace: same Kong route, and the same HTTP method and protocol as the trace. | ||
| export function findRouteRequestForTrace( | ||
| routeRequests: KonnectRouteRequest[], | ||
| trace: Pick<TraceSummaryBreakdown, 'method' | 'urlScheme' | 'routeId'>, | ||
| ): KonnectRouteRequest | null { | ||
| const method = trace.method?.toUpperCase(); | ||
| return ( | ||
| routeRequests.find( | ||
| candidate => | ||
| trace.routeId === candidate.routeId && | ||
| candidate.method.toUpperCase() === method && | ||
| candidate.protocol.toUpperCase() === trace.urlScheme?.toUpperCase(), | ||
| ) ?? null | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.