Skip to content

test(agent-platform): add ui.go coverage for SPA serving and env config#1135

Open
jomcgi wants to merge 3 commits intomainfrom
test/agent-platform-ui-coverage
Open

test(agent-platform): add ui.go coverage for SPA serving and env config#1135
jomcgi wants to merge 3 commits intomainfrom
test/agent-platform-ui-coverage

Conversation

@jomcgi
Copy link
Owner

@jomcgi jomcgi commented Mar 14, 2026

Summary

  • ui.go was introduced in 96f598f7 (serve orchestrator UI from container layer) with no corresponding test file
  • Reviewed commits 9321065..b6ab9ae: the only Go/Python file changed was sandbox_test.go (already a test); model.go is handled by PR test(agent-orchestrator): add model type tests after recipe-path refactor #1129
  • Added ui_test.go covering the two functions in ui.go:
    • getUIDir: default /opt/ui fallback when UI_DIR unset; reads UI_DIR env var when set
    • registerUI: root / path serves index.html; existing static assets served directly; unknown routes fall back to index.html (SPA behaviour); nested unknown routes also fall back

Test plan

  • bb test //projects/agent_platform/orchestrator:orchestrator_unit_test passes (6 new tests, 0.0s)
  • CI bazel test //... passes

🤖 Generated with Claude Code

goose and others added 3 commits March 14, 2026 03:13
ui.go was introduced in 96f598f (serve orchestrator UI from container
layer) with no corresponding test file. Add ui_test.go covering:
- getUIDir: default /opt/ui fallback and UI_DIR env-var override
- registerUI: root path serves index.html
- registerUI: existing static assets are served directly
- registerUI: unknown routes fall back to index.html (SPA behaviour)
- registerUI: nested unknown routes also fall back to index.html

Update BUILD to include ui_test.go in both orchestrator_unit_test and
orchestrator_test targets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant