Skip to content

feat: migrate Gateways component from /gateways to /servers endpoint#4604

Open
vishu-bh wants to merge 2 commits intoepic/ui-rewritefrom
feat/migrate-gateways-to-servers-endpoint
Open

feat: migrate Gateways component from /gateways to /servers endpoint#4604
vishu-bh wants to merge 2 commits intoepic/ui-rewritefrom
feat/migrate-gateways-to-servers-endpoint

Conversation

@vishu-bh
Copy link
Copy Markdown
Collaborator

@vishu-bh vishu-bh commented May 5, 2026

Migrates Gateways.tsx from legacy /gateways to new /servers endpoint with updated types, comprehensive tests, and new virtual servers listing UI.

Key Changes:

  • Created BaseServer interface to eliminate field duplication
  • Added VirtualServer type with camelCase fields matching /servers response
  • Updated Gateways component to use /servers endpoint
  • Added new virtual servers list UI with server cards showing status, tools, resources, and prompts
  • Updated field mappings: reachable to enabled, tool_count to associatedToolIds.length
  • Updated timestamps to camelCase: createdAt/updatedAt
  • Fixed unit tests and added comprehensive E2E test suite (18 test cases)

Test Results: 63 unit tests passing, 30 E2E tests passing (1 skipped)

- Refactor type hierarchy with BaseServer interface to eliminate duplication
- Add VirtualServer interface with camelCase fields matching /servers response
- Update Gateways.tsx to use /servers endpoint and VirtualServer type
- Change field mappings: reachable→enabled, tool_count→associatedToolIds.length
- Update timestamps to use camelCase: createdAt/updatedAt
- Remove transport field from getServerTags (not in VirtualServer)
- Fix unit tests to match new endpoint and response structure
- Add comprehensive E2E test suite (18 tests, 30 passing, 1 skipped)
- Update test expectations for new API structure

Closes #<issue-number>

Signed-off-by: Vishu Bhatnagar <vishu.bhatnagar@ibm.com>
@vishu-bh vishu-bh requested review from a-effort and marekdano and removed request for brian-hussey and crivetimihai May 5, 2026 14:53
- Remove unused 'page' parameter from skipped test in gateways.spec.ts
- Replace 'any' types with 'Record<string, unknown>' in server.ts for metrics and oauthConfig fields

Signed-off-by: Vishu Bhatnagar <vishu.bhatnagar@ibm.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