From cd1ffaec3e7e6de6449b0e9d1ba344ffdb503b91 Mon Sep 17 00:00:00 2001 From: Shaun Andrews Date: Mon, 23 Feb 2026 16:48:19 -0500 Subject: [PATCH 01/10] Rename Assistant tab to Chat and move it to first position Remove the sparkle icon CSS and ml-auto positioning that pushed the tab to the far right. Place it at order 0 so it appears as the first tab, inline with the rest. Co-Authored-By: Claude Opus 4.6 --- apps/studio/src/hooks/use-content-tabs.tsx | 12 +++++------- apps/studio/src/index.css | 12 ------------ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/apps/studio/src/hooks/use-content-tabs.tsx b/apps/studio/src/hooks/use-content-tabs.tsx index f197c04812..2d6e3a6e9d 100644 --- a/apps/studio/src/hooks/use-content-tabs.tsx +++ b/apps/studio/src/hooks/use-content-tabs.tsx @@ -12,6 +12,11 @@ function useTabs() { return useMemo( () => { const tabs: Tab[] = [ + { + order: 0, + name: 'assistant', + title: __( 'Chat' ), + }, { order: 1, name: 'overview', @@ -42,13 +47,6 @@ function useTabs() { } ); - tabs.push( { - order: 6, - name: 'assistant', - title: __( 'Assistant' ), - className: 'components-tab-panel__tabs--assistant ltr:pl-8 rtl:pr-8 ltr:ml-auto rtl:mr-auto', - } ); - return tabs.sort( ( a, b ) => a.order - b.order ); }, [ __ ] ); } diff --git a/apps/studio/src/index.css b/apps/studio/src/index.css index b4d5e8ca62..6e715c9e13 100644 --- a/apps/studio/src/index.css +++ b/apps/studio/src/index.css @@ -65,18 +65,6 @@ blockquote { margin-bottom: -1px; } -.components-tab-panel__tabs--assistant::before { - content: url( 'data:image/svg+xml;utf8,' ); - display: inline-block; - width: 14px; - height: 14px; - top: 16px; -} - -.components-tab-panel__tabs--assistant:hover:not( :active )::before { - content: url( 'data:image/svg+xml;utf8,' ); -} - .components-tab-panel__tabs-item.is-active::after { background: theme( 'colors.black' ); } From d2a716591cbbb84cd0ace2957ff9b5bf27f624bd Mon Sep 17 00:00:00 2001 From: Shaun Andrews Date: Mon, 23 Feb 2026 16:48:25 -0500 Subject: [PATCH 02/10] Remove animated Rive icon from chat input and fix padding Strip the useAiIcon hook, its typing/keyUp state machinery, and the Rive component from the input. Bump horizontal padding from px-1 to px-4 to fill the space left by the removed icon. Co-Authored-By: Claude Opus 4.6 --- apps/studio/src/components/ai-input.tsx | 35 +------------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/apps/studio/src/components/ai-input.tsx b/apps/studio/src/components/ai-input.tsx index f9ccd05a00..3bdd9d4edf 100644 --- a/apps/studio/src/components/ai-input.tsx +++ b/apps/studio/src/components/ai-input.tsx @@ -4,7 +4,6 @@ import { Icon, moreVertical, keyboardReturn, reset } from '@wordpress/icons'; import React, { forwardRef, useRef, useEffect, useState } from 'react'; import { ArrowIcon } from 'src/components/arrow-icon'; import { TELEX_HOSTNAME, TELEX_UTM_PARAMS } from 'src/constants'; -import useAiIcon from 'src/hooks/use-ai-icon'; import { cx } from 'src/lib/cx'; import { getIpcApi } from 'src/lib/get-ipc-api'; import { addUrlParams } from 'src/lib/url-utils'; @@ -57,34 +56,17 @@ const UnforwardedAIInput = ( }: AIInputProps, inputRef: React.RefObject< HTMLTextAreaElement > | React.RefCallback< HTMLTextAreaElement > | null ) => { - const [ isTyping, setIsTyping ] = useState( false ); const [ thinkingDuration, setThinkingDuration ] = useState< 'short' | 'medium' | 'long' | 'veryLong' >( 'short' ); - const typingTimeout = useRef< NodeJS.Timeout >(); const thinkingTimeout = useRef< NodeJS.Timeout[] >( [] ); - const { RiveComponent } = useAiIcon( { - inactive: disabled, - thinking: isAssistantThinking, - typing: isTyping, - } ); - useEffect( () => { if ( ! disabled && inputRef && 'current' in inputRef && inputRef.current ) { inputRef.current?.focus(); } }, [ disabled, inputRef ] ); - useEffect( - () => () => { - if ( typingTimeout.current ) { - clearTimeout( typingTimeout.current ); - } - }, - [] - ); - const handleInput = ( e: React.ChangeEvent< HTMLTextAreaElement > ) => { setInput( e.target.value ); @@ -126,21 +108,10 @@ const UnforwardedAIInput = ( // Allow Shift + Enter to create a new line return; } else { - setIsTyping( true ); handleKeyDown( e ); } }; - const handleKeyUpWrapper = () => { - if ( typingTimeout.current ) { - clearTimeout( typingTimeout.current ); - } - - typingTimeout.current = setTimeout( () => { - setIsTyping( false ); - }, 400 ); - }; - useEffect( () => { function clearThinkingTimeouts() { thinkingTimeout.current.forEach( clearTimeout ); @@ -223,22 +194,18 @@ const UnforwardedAIInput = ( }` ) } > -
-