Skip to content

Commit 075cff6

Browse files
committed
ui: Update nav links, rearrange buttons
1 parent 88a8844 commit 075cff6

File tree

5 files changed

+48
-51
lines changed

5 files changed

+48
-51
lines changed

ui/src/components/navigation/LeftNavigation.tsx

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
FileSearch,
1010
LogOut,
1111
Wrench,
12-
Code,
1312
BookOpen,
1413
Github,
1514
MessageCircle,
@@ -212,20 +211,7 @@ export const LeftNavigation: React.FC<LeftNavigationProps> = ({
212211
'hover:bg-gray-50 hover:text-gray-900',
213212
'px-3'
214213
)}
215-
hidden={true}
216-
onClick={() => {}}
217-
>
218-
<Code className="h-5 w-5 shrink-0 mr-3" />
219-
<span className="truncate">Polos APIs</span>
220-
</Button>
221-
<Button
222-
variant="ghost"
223-
className={cn(
224-
'w-full justify-start h-10 font-medium transition-all duration-200 cursor-pointer text-sm text-gray-600',
225-
'hover:bg-gray-50 hover:text-gray-900',
226-
'px-3'
227-
)}
228-
onClick={() => {}}
214+
onClick={() => window.open('https://docs.polos.dev', '_blank')}
229215
>
230216
<BookOpen className="h-5 w-5 shrink-0 mr-3" />
231217
<span className="truncate">Documentation</span>
@@ -237,10 +223,12 @@ export const LeftNavigation: React.FC<LeftNavigationProps> = ({
237223
'hover:bg-gray-50 hover:text-gray-900',
238224
'px-3'
239225
)}
240-
onClick={() => {}}
226+
onClick={() =>
227+
window.open('https://github.com/polos-dev/polos', '_blank')
228+
}
241229
>
242230
<Github className="h-5 w-5 shrink-0 mr-3" />
243-
<span className="truncate">Github</span>
231+
<span className="truncate">GitHub</span>
244232
</Button>
245233
<Button
246234
variant="ghost"
@@ -249,7 +237,7 @@ export const LeftNavigation: React.FC<LeftNavigationProps> = ({
249237
'hover:bg-gray-50 hover:text-gray-900',
250238
'px-3'
251239
)}
252-
onClick={() => {}}
240+
onClick={() => window.open('https://discord.gg/ZAxHKMPwFG', '_blank')}
253241
>
254242
<MessageCircle className="h-5 w-5 shrink-0 mr-3" />
255243
<span className="truncate">Discord</span>

ui/src/pages/agents/Agent.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const AgentsPage: React.FC = () => {
1818
const [searchQuery, setSearchQuery] = useState('');
1919
const [isLoading, setIsLoading] = useState(true);
2020
const [error, setError] = useState<string | null>(null);
21-
const [viewMode, setViewMode] = useState<ViewMode>('runs');
21+
const [viewMode, setViewMode] = useState<ViewMode>('list');
2222

2323
useEffect(() => {
2424
const fetchAgents = async () => {
@@ -97,22 +97,22 @@ export const AgentsPage: React.FC = () => {
9797
{/* View Toggle */}
9898
<div className="flex items-center gap-2 border border-gray-300 rounded-lg p-1 bg-white">
9999
<Button
100-
variant={viewMode === 'runs' ? 'default' : 'ghost'}
100+
variant={viewMode === 'list' ? 'default' : 'ghost'}
101101
size="sm"
102102
className="h-6 gap-2"
103-
onClick={() => setViewMode('runs')}
103+
onClick={() => setViewMode('list')}
104104
>
105-
<Play className="h-4 w-4" />
106-
Runs
105+
<List className="h-4 w-4" />
106+
List
107107
</Button>
108108
<Button
109-
variant={viewMode === 'list' ? 'default' : 'ghost'}
109+
variant={viewMode === 'runs' ? 'default' : 'ghost'}
110110
size="sm"
111111
className="h-6 gap-2"
112-
onClick={() => setViewMode('list')}
112+
onClick={() => setViewMode('runs')}
113113
>
114-
<List className="h-4 w-4" />
115-
List
114+
<Play className="h-4 w-4" />
115+
Runs
116116
</Button>
117117
</div>
118118
</div>

ui/src/pages/agents/AgentRun.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -700,13 +700,12 @@ export const AgentRunPage: React.FC = () => {
700700
</div>
701701
{conversationId && (
702702
<div className="border-t border-gray-200 p-4 bg-white">
703-
<div className="flex gap-2">
704-
<input
705-
type="text"
706-
placeholder="Type your message..."
703+
<div className="flex gap-2 items-end">
704+
<textarea
705+
placeholder="Type your message... (Shift+Enter for new line)"
707706
value={inputMessage}
708707
onChange={(e) => setInputMessage(e.target.value)}
709-
onKeyPress={(e) => {
708+
onKeyDown={(e) => {
710709
if (
711710
e.key === 'Enter' &&
712711
!e.shiftKey &&
@@ -717,8 +716,18 @@ export const AgentRunPage: React.FC = () => {
717716
handleSendMessage();
718717
}
719718
}}
720-
className="flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
719+
className="flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none min-h-[42px] max-h-[120px]"
721720
disabled={isSending || !conversationId}
721+
rows={1}
722+
style={{
723+
height: 'auto',
724+
minHeight: '42px',
725+
}}
726+
onInput={(e) => {
727+
const target = e.target as HTMLTextAreaElement;
728+
target.style.height = 'auto';
729+
target.style.height = `${Math.min(target.scrollHeight, 120)}px`;
730+
}}
722731
/>
723732
<Button
724733
variant="default"

ui/src/pages/tools/Tool.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const ToolsPage: React.FC = () => {
1717
const [searchQuery, setSearchQuery] = useState('');
1818
const [isLoading, setIsLoading] = useState(true);
1919
const [error, setError] = useState<string | null>(null);
20-
const [viewMode, setViewMode] = useState<ViewMode>('runs');
20+
const [viewMode, setViewMode] = useState<ViewMode>('list');
2121

2222
const handleToolClick = (toolId: string) => {
2323
navigate(`/tools/${toolId}/run`);
@@ -94,22 +94,22 @@ export const ToolsPage: React.FC = () => {
9494
{/* View Toggle */}
9595
<div className="flex items-center gap-2 border border-gray-300 rounded-lg p-1 bg-white">
9696
<Button
97-
variant={viewMode === 'runs' ? 'default' : 'ghost'}
97+
variant={viewMode === 'list' ? 'default' : 'ghost'}
9898
size="sm"
9999
className="h-6 gap-2"
100-
onClick={() => setViewMode('runs')}
100+
onClick={() => setViewMode('list')}
101101
>
102-
<Play className="h-4 w-4" />
103-
Runs
102+
<List className="h-4 w-4" />
103+
List
104104
</Button>
105105
<Button
106-
variant={viewMode === 'list' ? 'default' : 'ghost'}
106+
variant={viewMode === 'runs' ? 'default' : 'ghost'}
107107
size="sm"
108108
className="h-6 gap-2"
109-
onClick={() => setViewMode('list')}
109+
onClick={() => setViewMode('runs')}
110110
>
111-
<List className="h-4 w-4" />
112-
List
111+
<Play className="h-4 w-4" />
112+
Runs
113113
</Button>
114114
</div>
115115
</div>

ui/src/pages/workflows/Workflow.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const WorkflowsPage: React.FC = () => {
2424
const [searchQuery, setSearchQuery] = useState('');
2525
const [isLoading, setIsLoading] = useState(true);
2626
const [error, setError] = useState<string | null>(null);
27-
const [viewMode, setViewMode] = useState<ViewMode>('runs');
27+
const [viewMode, setViewMode] = useState<ViewMode>('list');
2828

2929
useEffect(() => {
3030
const fetchWorkflows = async () => {
@@ -102,22 +102,22 @@ export const WorkflowsPage: React.FC = () => {
102102
{/* View Toggle */}
103103
<div className="flex items-center gap-2 border border-gray-300 rounded-lg p-1 bg-white">
104104
<Button
105-
variant={viewMode === 'runs' ? 'default' : 'ghost'}
105+
variant={viewMode === 'list' ? 'default' : 'ghost'}
106106
size="sm"
107107
className="h-6 gap-2"
108-
onClick={() => setViewMode('runs')}
108+
onClick={() => setViewMode('list')}
109109
>
110-
<Play className="h-4 w-4" />
111-
Runs
110+
<List className="h-4 w-4" />
111+
List
112112
</Button>
113113
<Button
114-
variant={viewMode === 'list' ? 'default' : 'ghost'}
114+
variant={viewMode === 'runs' ? 'default' : 'ghost'}
115115
size="sm"
116116
className="h-6 gap-2"
117-
onClick={() => setViewMode('list')}
117+
onClick={() => setViewMode('runs')}
118118
>
119-
<List className="h-4 w-4" />
120-
List
119+
<Play className="h-4 w-4" />
120+
Runs
121121
</Button>
122122
</div>
123123
</div>

0 commit comments

Comments
 (0)