fix(devtools): correct browser asset path in UI server#306
Closed
elliottcrif wants to merge 1 commit into
Closed
Conversation
kalenkevich
approved these changes
Apr 28, 2026
kalenkevich
reviewed
Apr 28, 2026
Collaborator
kalenkevich
left a comment
There was a problem hiding this comment.
Checked locally and fix is not going to help, closing this pr in favor of #309
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
2. Or, if no issue exists, describe the change:
Problem:
The devtools UI server (
AdkApiServer) fails to serve the static browser assets for the debug UI, resulting in 404 errors when attempting to access the devtools in the browser. This happens because the static files path is configured as./browserrelative toadk_api_server.ts, which incorrectly resolves to.../server/browser. The actual browser assets directory is located in the parent directory (.../browser).Solution:
Update the static directory path from
path.join(__dirname, './browser')topath.join(__dirname, '../browser'). This correctly points the express server to the parent directory where thebrowserassets are actually located during runtime, allowing the devtools UI to load properly.Testing Plan
Unit Tests:
Summary of passed npm test results:
Existing tests pass successfully. The
devpackage builds without compilation errors (npm run buildsucceeds).Manual End-to-End (E2E) Tests:
@google/adk-devtoolspackage locally.serveDebugUI: trueenabled, the browser assets load properly at the/dev-uiendpoint.Checklist
Additional context
This fix is necessary for local developers trying to utilize the ADK devtools UI, as the incorrect path prevented the UI from rendering entirely.