diff --git a/apps/rowboat/app/projects/[projectId]/copilot/app.tsx b/apps/rowboat/app/projects/[projectId]/copilot/app.tsx index b3704a15..a2c160ba 100644 --- a/apps/rowboat/app/projects/[projectId]/copilot/app.tsx +++ b/apps/rowboat/app/projects/[projectId]/copilot/app.tsx @@ -269,7 +269,7 @@ const App = forwardRef<{ handleCopyChat: () => void; handleUserMessage: (message toolQuery={toolQuery} /> -
+
{responseError && (

{responseError}

@@ -322,6 +322,8 @@ export const Copilot = forwardRef<{ handleUserMessage: (message: string) => void dispatch: (action: WorkflowDispatch) => void; isInitialState?: boolean; dataSources?: z.infer[]; + activePanel: 'playground' | 'copilot'; + onTogglePanel: () => void; }>(({ projectId, workflow, @@ -329,6 +331,8 @@ export const Copilot = forwardRef<{ handleUserMessage: (message: string) => void dispatch, isInitialState = false, dataSources, + activePanel, + onTogglePanel, }, ref) => { const [copilotKey, setCopilotKey] = useState(0); const [showCopySuccess, setShowCopySuccess] = useState(false); @@ -365,8 +369,34 @@ export const Copilot = forwardRef<{ handleUserMessage: (message: string) => void } - title="Skipper" + title={ +
+
+ + +
+
+ } subtitle="Build your assistant" rightActions={
diff --git a/apps/rowboat/app/projects/[projectId]/playground/app.tsx b/apps/rowboat/app/projects/[projectId]/playground/app.tsx index 05c67dc7..4079f20b 100644 --- a/apps/rowboat/app/projects/[projectId]/playground/app.tsx +++ b/apps/rowboat/app/projects/[projectId]/playground/app.tsx @@ -17,6 +17,8 @@ export function App({ onPanelClick, triggerCopilotChat, isLiveWorkflow, + activePanel, + onTogglePanel, }: { hidden?: boolean; projectId: string; @@ -25,6 +27,8 @@ export function App({ onPanelClick?: () => void; triggerCopilotChat?: (message: string) => void; isLiveWorkflow: boolean; + activePanel: 'playground' | 'copilot'; + onTogglePanel: () => void; }) { const [counter, setCounter] = useState(0); const [showDebugMessages, setShowDebugMessages] = useState(true); @@ -56,8 +60,34 @@ export function App({ className={`${hidden ? 'hidden' : 'block'}`} variant="playground" tourTarget="playground" - icon={} - title="Chat" + title={ +
+
+ + +
+
+ } subtitle="Chat with your assistant" rightActions={
diff --git a/apps/rowboat/app/projects/[projectId]/playground/components/chat.tsx b/apps/rowboat/app/projects/[projectId]/playground/components/chat.tsx index 5f634bdc..c7edde70 100644 --- a/apps/rowboat/app/projects/[projectId]/playground/components/chat.tsx +++ b/apps/rowboat/app/projects/[projectId]/playground/components/chat.tsx @@ -425,7 +425,7 @@ export function Chat({ )} -
+
{showSuccessMessage && (
diff --git a/apps/rowboat/app/projects/[projectId]/workflow/components/TopBar.tsx b/apps/rowboat/app/projects/[projectId]/workflow/components/TopBar.tsx index 98707fd2..0261cd5d 100644 --- a/apps/rowboat/app/projects/[projectId]/workflow/components/TopBar.tsx +++ b/apps/rowboat/app/projects/[projectId]/workflow/components/TopBar.tsx @@ -14,14 +14,14 @@ interface TopBarProps { showCopySuccess: boolean; canUndo: boolean; canRedo: boolean; - showCopilot: boolean; + activePanel: 'playground' | 'copilot'; onUndo: () => void; onRedo: () => void; onDownloadJSON: () => void; onPublishWorkflow: () => void; onChangeMode: (mode: 'draft' | 'live') => void; onRevertToLive: () => void; - onToggleCopilot: () => void; + onTogglePanel: () => void; } export function TopBar({ @@ -34,14 +34,14 @@ export function TopBar({ showCopySuccess, canUndo, canRedo, - showCopilot, + activePanel, onUndo, onRedo, onDownloadJSON, onPublishWorkflow, onChangeMode, onRevertToLive, - onToggleCopilot, + onTogglePanel, }: TopBarProps) { const router = useRouter(); const params = useParams(); @@ -70,47 +70,29 @@ export function TopBar({ classNames={{ base: "max-w-xs", input: "text-base font-semibold px-2", - inputWrapper: "min-h-[28px] h-[28px] border-gray-200 dark:border-gray-700 px-0" + inputWrapper: "min-h-[36px] h-[36px] border-gray-200 dark:border-gray-700 px-0" }} />
- -
- -
- {publishing && } - {isLive &&
- - Live workflow -
} - {!isLive &&
- - Draft workflow -
} - {/* Download JSON icon button, with tooltip, to the left of the menu */} - - - -
+ {/* Show divider and CTA only in live view */} + {isLive &&
} + {isLive ? ( + + ) : null}
{showCopySuccess &&
Copied to clipboard
}
- {isLive &&
-
- - This version is locked. Changes applied will not be reflected. -
-
} {!isLive && <> - - - } - onPress={() => { if (projectId) { router.push(`/projects/${projectId}/config`); } }} - > - API & SDK Settings - - } - onPress={() => { if (projectId) { router.push(`/projects/${projectId}/manage-triggers`); } }} + <> + + + + + + } + onPress={() => { if (projectId) { router.push(`/projects/${projectId}/config`); } }} + > + API & SDK Settings + + } + onPress={() => { if (projectId) { router.push(`/projects/${projectId}/manage-triggers`); } }} + > + Manage Triggers + + + + + {/* Live workflow label moved here */} +
+ {publishing && } +
+ + Live workflow +
+ + + +
+ ) : ( <> +
@@ -203,31 +207,34 @@ export function TopBar({ +
+ + {/* Moved draft/live labels and download button here */} +
+ {publishing && } + {isLive &&
+ + Live workflow +
} + {!isLive &&
+ + Draft workflow +
} + + + +
)}
- - {isLive &&
- -
} - - {!isLive && } +
diff --git a/apps/rowboat/app/projects/[projectId]/workflow/entity_list.tsx b/apps/rowboat/app/projects/[projectId]/workflow/entity_list.tsx index 173bec94..9c7b8205 100644 --- a/apps/rowboat/app/projects/[projectId]/workflow/entity_list.tsx +++ b/apps/rowboat/app/projects/[projectId]/workflow/entity_list.tsx @@ -1175,7 +1175,7 @@ export const EntityList = forwardRef< tourTarget="entity-prompts" className={clsx( "h-full", - !expandedPanels.prompts && "h-[53px]!" + !expandedPanels.prompts && "h-[61px]!" )} title={
@@ -1208,7 +1208,7 @@ export const EntityList = forwardRef< } > {expandedPanels.prompts && ( -
+
{prompts.length > 0 ? (
@@ -2116,4 +2116,4 @@ function AddVariableModal({ isOpen, onClose, onConfirm, initialName, initialValu ); -} \ No newline at end of file +} \ No newline at end of file diff --git a/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx b/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx index a1ab84fd..4111238e 100644 --- a/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx +++ b/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx @@ -965,8 +965,7 @@ export function WorkflowEditor({ const saveQueue = useRef[]>([]); const saving = useRef(false); const [showCopySuccess, setShowCopySuccess] = useState(false); - const [showCopilot, setShowCopilot] = useState(true); - const [copilotWidth, setCopilotWidth] = useState(PANEL_RATIOS.copilot); + const [activePanel, setActivePanel] = useState<'playground' | 'copilot'>('copilot'); const [isInitialState, setIsInitialState] = useState(true); const [showTour, setShowTour] = useState(true); const copilotRef = useRef<{ handleUserMessage: (message: string) => void }>(null); @@ -1010,7 +1009,7 @@ export function WorkflowEditor({ // Function to trigger copilot chat const triggerCopilotChat = useCallback((message: string) => { - setShowCopilot(true); + setActivePanel('copilot'); // Small delay to ensure copilot is mounted setTimeout(() => { copilotRef.current?.handleUserMessage(message); @@ -1028,14 +1027,14 @@ export function WorkflowEditor({ const prompt = localStorage.getItem(`project_prompt_${projectId}`); console.log('init project prompt', prompt); if (prompt) { - setShowCopilot(true); + setActivePanel('copilot'); } }, [projectId]); - // Hide copilot when switching to live mode + // Switch to playground when switching to live mode useEffect(() => { if (isLive) { - setShowCopilot(false); + setActivePanel('playground'); } }, [isLive]); @@ -1397,14 +1396,14 @@ export function WorkflowEditor({ showCopySuccess={showCopySuccess} canUndo={state.currentIndex > 0} canRedo={state.currentIndex < state.patches.length} - showCopilot={showCopilot} + activePanel={activePanel} onUndo={() => dispatch({ type: "undo" })} onRedo={() => dispatch({ type: "redo" })} onDownloadJSON={handleDownloadJSON} onPublishWorkflow={handlePublishWorkflow} onChangeMode={onChangeMode} onRevertToLive={handleRevertToLive} - onToggleCopilot={() => setShowCopilot(!showCopilot)} + onTogglePanel={() => setActivePanel(activePanel === 'playground' ? 'copilot' : 'playground')} /> {/* Content Area */} @@ -1465,19 +1464,48 @@ export function WorkflowEditor({ - - {showCopilot && ( - <> - - setCopilotWidth(size)} - > - 0 - ? { type: 'chat', messages: chatMessages } - : undefined - } - isInitialState={isInitialState} - dataSources={dataSources} - /> - - - )} {USE_PRODUCT_TOUR && showTour && ( Press ⌘ + Enter to send
- {/* Outer container with padding */} -
{/* Textarea */} -
+