Skip to content

The open-source agent harness - the runtime layer that turns an LLM into a working agent.

chore: increase timeout for post mcp auth screen (#161)

sayan-truefoundry5685ce8f96c1
diff --git a/packages/trueforge-ui-sdk/src/containers/McpOauthContainer/PostMcpOauthScreen.tsx b/packages/trueforge-ui-sdk/src/containers/McpOauthContainer/PostMcpOauthScreen.tsx
index e4e84f739..49da7843e 100644
--- a/packages/trueforge-ui-sdk/src/containers/McpOauthContainer/PostMcpOauthScreen.tsx
+++ b/packages/trueforge-ui-sdk/src/containers/McpOauthContainer/PostMcpOauthScreen.tsx
@@ -6,7 +6,7 @@ import { MCP_AUTH_POPUP_CHANNEL, type McpAuthPopupMessage } from '../../hooks/us
import { Icon } from '../../icons/Icon.js';
const BROADCAST_RETRY_DELAY_MS = 1000;
-const WINDOW_CLOSE_DELAY_MS = 2000;
+const WINDOW_CLOSE_DELAY_MS = 5000;
const PostMcpOauthScreen = () => {
const [result, setResult] = useState<McpAuthPopupMessage | null>();
diff --git a/packages/trueforge-ui-sdk/test/containers/McpOauthContainer/PostMcpOauthScreen.test.tsx b/packages/trueforge-ui-sdk/test/containers/McpOauthContainer/PostMcpOauthScreen.test.tsx
index 8dcd5ae0d..40721b396 100644
--- a/packages/trueforge-ui-sdk/test/containers/McpOauthContainer/PostMcpOauthScreen.test.tsx
+++ b/packages/trueforge-ui-sdk/test/containers/McpOauthContainer/PostMcpOauthScreen.test.tsx
@@ -73,7 +73,7 @@ describe('PostMcpOauthScreen', () => {
});
});
- it('does not broadcast an invalid result but still closes the popup after two seconds', () => {
+ it('does not broadcast an invalid result but still closes the popup after five seconds', () => {
window.history.replaceState({}, '', '/oauth/callback?isSuccess=true');
render(<PostMcpOauthScreen />);
@@ -83,7 +83,7 @@ describe('PostMcpOauthScreen', () => {
expect(channels).toHaveLength(0);
act(() => {
- vi.advanceTimersByTime(1999);
+ vi.advanceTimersByTime(4999);
});
expect(window.close).not.toHaveBeenCalled();
@@ -101,7 +101,7 @@ describe('PostMcpOauthScreen', () => {
unmount();
act(() => {
- vi.advanceTimersByTime(3000);
+ vi.advanceTimersByTime(6000);
});
expect(channels).toHaveLength(1);