From bf40ecb7085e1302686313f892413c5113798f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20Falco=CC=81n?= Date: Fri, 17 Jul 2026 15:44:35 +0200 Subject: [PATCH] fix(mcp): prettier formatting and numeric token id type on the settings page --- resources/js/pages/settings/mcp.tsx | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/resources/js/pages/settings/mcp.tsx b/resources/js/pages/settings/mcp.tsx index 5413fa63..cd70f49a 100644 --- a/resources/js/pages/settings/mcp.tsx +++ b/resources/js/pages/settings/mcp.tsx @@ -38,7 +38,7 @@ import { Copy, KeyRound, RefreshCw, Trash2 } from 'lucide-react'; import { toast } from 'sonner'; interface TokenRow { - id: number | string; + id: number; name: string; scope: 'read' | 'read_write'; created_at: string | null; @@ -61,8 +61,9 @@ function formatDate(value: string | null): string { } export default function Mcp() { - const { tokens, serverUrl, subscribeUrl, newToken, auth } = - usePage().props; + const { tokens, serverUrl, subscribeUrl, newToken, auth } = usePage< + SharedData & McpPageProps + >().props; const [, copy] = useClipboard(); const form = useForm({ name: '' }); @@ -103,7 +104,9 @@ export default function Mcp() { {!auth.hasProPlan && ( - {__('This is a Pro feature')} + + {__('This is a Pro feature')} + {__( 'You can create a token now, but MCP requests only work on a paid plan.', @@ -119,7 +122,9 @@ export default function Mcp() { )} - {__('Your data leaves Whisper Money')} + + {__('Your data leaves Whisper Money')} + {__( 'The data you query is sent to whichever AI client you connect. Whisper Money cannot control what that client does with it. By connecting, you accept this. Revoke a token at any time to cut off access.', @@ -130,7 +135,9 @@ export default function Mcp() { {newToken && ( - {__('Copy your new token now')} + + {__('Copy your new token now')} +

{__( @@ -280,8 +287,7 @@ export default function Mcp() { ).url, {}, { - preserveScroll: - true, + preserveScroll: true, }, ) } @@ -326,8 +332,7 @@ export default function Mcp() { token.id, ).url, { - preserveScroll: - true, + preserveScroll: true, }, ) }