You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Delete /agents/chat UI — This page was never requested. Only /agents/threads should exist as a UI route. Remove all related code: routes, pages, components, sidebar entry, API modules, hooks, types, mock data, and e2e tests for the chat page.
Fix API path — The gateway is exposed at /api, not /apiv2. All API calls must use /api. (Already fixed in PR fix(api): switch gateway to /api #23, but verify no remnants remain.)
Add a real e2e conversation test — A minimal but complete end-to-end test proving the chat actually works:
User A signs in
User B signs in
User B sends a message to User A (via ChatGateway)
User A can read this message
User A replies back
User B receives the reply
This test must exercise the real ChatGateway ConnectRPC API (/api/agynio.api.gateway.v1.ChatGateway/*), not mocks.
Specification
1. Remove /agents/chat feature
Files to delete:
src/pages/AgentsChat.tsx
src/features/chat/ChatPage.tsx
src/features/chat/ChatConversation.tsx
src/features/chat/ChatInput.tsx
src/features/chat/ChatList.tsx
src/features/chat/ChatMessageItem.tsx
src/features/chat/sortByTimestamp.ts
src/api/modules/chat.ts
src/api/hooks/chat.ts
src/api/types/chat.ts
test/e2e/chat-conversation.spec.ts
test/e2e/chat-list.spec.ts
test/e2e/chat-navigation.spec.ts
test/e2e/chat-send-message.spec.ts
test/e2e/chat-fixtures.ts
test/e2e/chat-helpers.ts
Files to modify:
src/App.tsx — Remove AgentsChat import and /agents/chat routes
src/layout/RootLayout.tsx — Remove agentsChat from MENU_ITEM_ROUTES and MENU_ITEMS, remove unused MessagesSquare import if only used by chat
src/api/index.ts — Remove chatApi export
vite-plugin-mock-api.ts — Remove all ChatGateway mock handlers, chatStore, chatMessagesByChat, chatUnreadIdsByChat, and related types/imports
2. Verify API paths (already fixed)
Confirm no /apiv2 references remain anywhere in the codebase. The fix was merged in PR #23.
3. Add real e2e conversation test
Create a new e2e test file (e.g., test/e2e/chat-e2e.spec.ts) that:
Acquires OIDC tokens for two different users (User A and User B) using the acquireOidcTokens helper (with different email env vars or parameterized calls).
User B creates a chat with User A via POST /api/agynio.api.gateway.v1.ChatGateway/CreateChat.
User B sends a message to that chat via POST /api/agynio.api.gateway.v1.ChatGateway/SendMessage.
User A reads messages from the chat via POST /api/agynio.api.gateway.v1.ChatGateway/GetMessages and verifies B's message is present.
User A sends a reply via POST /api/agynio.api.gateway.v1.ChatGateway/SendMessage.
User B reads messages and verifies A's reply is present.
The test should use the Connect protocol (JSON over HTTP with Connect-Protocol-Version: 1 header) to call the ChatGateway. Each user's requests must include their own OIDC access_token as a Bearer token in the Authorization header.
Authentication approach:
Use acquireOidcTokens() from test/e2e/auth-helper.ts, calling it twice with different email addresses.
User A: default e2e-tester@agyn.test or via E2E_OIDC_EMAIL_A env var
User B: e2e-tester-b@agyn.test or via E2E_OIDC_EMAIL_B env var
Gateway base URL: Use E2E_BASE_URL env var (same as other e2e tests), which should resolve to the app's ingress that routes /api/* to the gateway.
Important: This test calls the API directly (not through the browser UI) to verify the backend chat functionality works end-to-end. It is a Playwright test file but uses fetch/HTTP calls rather than page interactions.
User Request
Three critical fixes are required:
Delete
/agents/chatUI — This page was never requested. Only/agents/threadsshould exist as a UI route. Remove all related code: routes, pages, components, sidebar entry, API modules, hooks, types, mock data, and e2e tests for the chat page.Fix API path — The gateway is exposed at
/api, not/apiv2. All API calls must use/api. (Already fixed in PR fix(api): switch gateway to /api #23, but verify no remnants remain.)Add a real e2e conversation test — A minimal but complete end-to-end test proving the chat actually works:
This test must exercise the real ChatGateway ConnectRPC API (
/api/agynio.api.gateway.v1.ChatGateway/*), not mocks.Specification
1. Remove
/agents/chatfeatureFiles to delete:
src/pages/AgentsChat.tsxsrc/features/chat/ChatPage.tsxsrc/features/chat/ChatConversation.tsxsrc/features/chat/ChatInput.tsxsrc/features/chat/ChatList.tsxsrc/features/chat/ChatMessageItem.tsxsrc/features/chat/sortByTimestamp.tssrc/api/modules/chat.tssrc/api/hooks/chat.tssrc/api/types/chat.tstest/e2e/chat-conversation.spec.tstest/e2e/chat-list.spec.tstest/e2e/chat-navigation.spec.tstest/e2e/chat-send-message.spec.tstest/e2e/chat-fixtures.tstest/e2e/chat-helpers.tsFiles to modify:
src/App.tsx— RemoveAgentsChatimport and/agents/chatroutessrc/layout/RootLayout.tsx— RemoveagentsChatfromMENU_ITEM_ROUTESandMENU_ITEMS, remove unusedMessagesSquareimport if only used by chatsrc/api/index.ts— RemovechatApiexportvite-plugin-mock-api.ts— Remove all ChatGateway mock handlers,chatStore,chatMessagesByChat,chatUnreadIdsByChat, and related types/imports2. Verify API paths (already fixed)
Confirm no
/apiv2references remain anywhere in the codebase. The fix was merged in PR #23.3. Add real e2e conversation test
Create a new e2e test file (e.g.,
test/e2e/chat-e2e.spec.ts) that:acquireOidcTokenshelper (with different email env vars or parameterized calls).POST /api/agynio.api.gateway.v1.ChatGateway/CreateChat.POST /api/agynio.api.gateway.v1.ChatGateway/SendMessage.POST /api/agynio.api.gateway.v1.ChatGateway/GetMessagesand verifies B's message is present.POST /api/agynio.api.gateway.v1.ChatGateway/SendMessage.The test should use the Connect protocol (JSON over HTTP with
Connect-Protocol-Version: 1header) to call the ChatGateway. Each user's requests must include their own OIDCaccess_tokenas a Bearer token in the Authorization header.Authentication approach:
acquireOidcTokens()fromtest/e2e/auth-helper.ts, calling it twice with different email addresses.e2e-tester@agyn.testor viaE2E_OIDC_EMAIL_Aenv vare2e-tester-b@agyn.testor viaE2E_OIDC_EMAIL_Benv varGateway base URL: Use
E2E_BASE_URLenv var (same as other e2e tests), which should resolve to the app's ingress that routes/api/*to the gateway.Important: This test calls the API directly (not through the browser UI) to verify the backend chat functionality works end-to-end. It is a Playwright test file but uses
fetch/HTTP calls rather than page interactions.