Skip to content

fix(devtools): correct browser asset path in UI server#306

Closed
elliottcrif wants to merge 1 commit into
google:mainfrom
elliottcrif:fix-devtools-ui-asset-path
Closed

fix(devtools): correct browser asset path in UI server#306
elliottcrif wants to merge 1 commit into
google:mainfrom
elliottcrif:fix-devtools-ui-asset-path

Conversation

@elliottcrif
Copy link
Copy Markdown
Contributor

@elliottcrif elliottcrif commented Apr 28, 2026

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 ./browser relative to adk_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') to path.join(__dirname, '../browser'). This correctly points the express server to the parent directory where the browser assets are actually located during runtime, allowing the devtools UI to load properly.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Summary of passed npm test results:
Existing tests pass successfully. The dev package builds without compilation errors (npm run build succeeds).

Manual End-to-End (E2E) Tests:

  1. Built the @google/adk-devtools package locally.
  2. Verified that when running the ADK agent server with serveDebugUI: true enabled, the browser assets load properly at the /dev-ui endpoint.
  3. No 404 errors are present in the browser's network tab when attempting to fetch the devtools static resources (HTML, CSS, JS).

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

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.

@elliottcrif elliottcrif marked this pull request as ready for review April 28, 2026 16:22
Copy link
Copy Markdown
Collaborator

@kalenkevich kalenkevich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked locally and fix is not going to help, closing this pr in favor of #309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants