@@ -31,20 +31,21 @@ import { useConnection } from "./lib/hooks/useConnection";
31
31
import { useDraggablePane } from "./lib/hooks/useDraggablePane" ;
32
32
import { StdErrNotification } from "./lib/notificationTypes" ;
33
33
34
- import { Tabs , TabsList , TabsTrigger } from "@/components/ui/tabs" ;
34
+ import { Tabs , TabsContent , TabsList , TabsTrigger } from "@/components/ui/tabs" ;
35
35
import { Button } from "@/components/ui/button" ;
36
36
import {
37
37
Bell ,
38
38
Files ,
39
39
FolderTree ,
40
40
Hammer ,
41
41
Hash ,
42
+ Key ,
42
43
MessageSquare ,
43
44
} from "lucide-react" ;
44
45
45
46
import { z } from "zod" ;
46
47
import "./App.css" ;
47
- const AuthDebugger = React . lazy ( ( ) => import ( "./components/AuthDebugger" ) ) ;
48
+ import AuthDebugger from "./components/AuthDebugger" ;
48
49
import ConsoleTab from "./components/ConsoleTab" ;
49
50
import HistoryAndNotifications from "./components/History" ;
50
51
import PingTab from "./components/PingTab" ;
@@ -259,21 +260,25 @@ const App = () => {
259
260
( serverUrl : string ) => {
260
261
setSseUrl ( serverUrl ) ;
261
262
setTransportType ( "sse" ) ;
263
+ setIsAuthDebuggerVisible ( false ) ;
262
264
void connectMcpServer ( ) ;
263
265
} ,
264
266
[ connectMcpServer ] ,
265
267
) ;
266
268
267
269
// Auto-connect to previously saved serverURL after OAuth callback
268
- const onOAuthDebugConnect = useCallback ( ( serverUrl : string , authorizationCode ?: string ) => {
269
- setIsAuthDebuggerVisible ( true ) ;
270
- if ( authorizationCode ) {
271
- updateAuthState ( {
272
- authorizationCode,
273
- oauthStep : "token_request" ,
274
- } ) ;
275
- }
276
- } , [ ] ) ;
270
+ const onOAuthDebugConnect = useCallback (
271
+ ( serverUrl : string , authorizationCode ?: string ) => {
272
+ setIsAuthDebuggerVisible ( true ) ;
273
+ if ( authorizationCode ) {
274
+ updateAuthState ( {
275
+ authorizationCode,
276
+ oauthStep : "token_request" ,
277
+ } ) ;
278
+ }
279
+ } ,
280
+ [ ] ,
281
+ ) ;
277
282
278
283
// Load OAuth tokens when sseUrl changes
279
284
useEffect ( ( ) => {
@@ -537,14 +542,14 @@ const App = () => {
537
542
538
543
// Helper component for rendering the AuthDebugger
539
544
const AuthDebuggerWrapper = ( ) => (
540
- < Suspense fallback = { < div > Loading... </ div > } >
545
+ < TabsContent value = "auth" >
541
546
< AuthDebugger
542
547
sseUrl = { sseUrl }
543
548
onBack = { ( ) => setIsAuthDebuggerVisible ( false ) }
544
549
authState = { authState }
545
550
updateAuthState = { updateAuthState }
546
551
/>
547
- </ Suspense >
552
+ </ TabsContent >
548
553
) ;
549
554
550
555
// Helper function to render OAuth callback components
@@ -659,6 +664,10 @@ const App = () => {
659
664
< FolderTree className = "w-4 h-4 mr-2" />
660
665
Roots
661
666
</ TabsTrigger >
667
+ < TabsTrigger value = "auth" >
668
+ < Key className = "w-4 h-4 mr-2" />
669
+ Auth
670
+ </ TabsTrigger >
662
671
</ TabsList >
663
672
664
673
< div className = "w-full" >
@@ -796,7 +805,13 @@ const App = () => {
796
805
</ div >
797
806
</ Tabs >
798
807
) : isAuthDebuggerVisible ? (
799
- < AuthDebuggerWrapper />
808
+ < Tabs
809
+ defaultValue = { "auth" }
810
+ className = "w-full p-4"
811
+ onValueChange = { ( value ) => ( window . location . hash = value ) }
812
+ >
813
+ < AuthDebuggerWrapper />
814
+ </ Tabs >
800
815
) : (
801
816
< div className = "flex flex-col items-center justify-center h-full gap-4" >
802
817
< p className = "text-lg text-gray-500" >
0 commit comments