Skip to content

fix(server): serve SPA index.html for /debug/*wild routes (#1021) - #1024

Merged
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-kvszxsywkwwk
Sep 17, 2026
Merged

kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-kvszxsywkwwk

Conversation

@kyasbal

@kyasbal kyasbal commented Sep 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Register /debug/*wild as an SPA fallback route serving index.html in SetupFrontendRoutes (pkg/server/server.go), alongside /session/*wild.
  • Extract the index.html handler into a shared serveIndexHTML closure.
  • Add table-driven test cases in pkg/server/server_test.go covering /debug/task-graph both with default root base path and with a custom server base path.

Closes #1021

@kyasbal kyasbal added type:bug Something isn't working as expected area:backend-core Core backend frameworks, DAG task runner, and server API labels Sep 17, 2026
@kyasbal kyasbal added type:bug Something isn't working as expected area:backend-core Core backend frameworks, DAG task runner, and server API labels Sep 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the frontend routing setup in the Go backend by extracting the SPA index.html serving logic into a reusable helper function. It then introduces a new '/debug/*wild' route to serve the SPA index.html, alongside the existing '/session/*wild' route. Corresponding unit tests have been added to verify that the new debug route correctly serves the index.html under both default and custom base path configurations. No review comments were provided, and the changes look clean and well-tested, so there is no additional feedback.

@kyasbal
kyasbal added this pull request to the merge queue Sep 17, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 797d801 Sep 17, 2026
17 checks passed
@kyasbal
kyasbal deleted the push-kvszxsywkwwk branch September 17, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend-core Core backend frameworks, DAG task runner, and server API type:bug Something isn't working as expected

1 participant