Major UI refresh: sidebar redesign, theme expansion, and chat performance optimizations (#706)

## Summary
Complete sidebar redesign and comprehensive UI polish pass with performance optimizations, theme system refinements, and desktop integration improvements.

## Key Changes

**Sidebar & Navigation Redesign**
- Redesigned sessions sidebar layout with unified button primitives
- Added activity sections with project grouping and improved session organization
- Refined sidebar corners, spacing, and visual hierarchy
- Removed NavRail component in favor of streamlined sidebar
- Stabilized sessions bar toggle position in fullscreen mode

**Performance Optimizations**
- Reduced chat streaming CPU usage and storage churn
- Optimized task tool polling and live timers with debouncing
- Prevented chat state races and reduced background request load
- Debounced draft writes and coalesced session reloads
- Optimized message store updates and turn tracking

**Theme & Visual System**
- Added theme-aware window corners (desktop) and border radius tokens
- Introduced glassmorphism effects on desktop sidebar
- Added backdrop blur to UI elements

**Chat Experience**
- Added session-based permission auto-accept toggle in chat input
- Polished permission shield UX with improved icon sizing and spacing
- Fixed chat scroll-to-bottom behavior and timeline tracking
- Enhanced tool output display with better path label detection
- Removed duplicate draft context details in chat header
- Added text selection menu to chat messages

**Git Improvements**
- Refreshed git history visual design with cleaner dividers
- Added remote removal action in sync selector
- Stabilized git polling to prevent excessive requests
- Improved tool output rendering for git operations

**Settings & Panels**
- Fixed mobile scrolling on settings pages
- Made outside-click settings close instantly
- Reduced settings load churn and CPU spikes
- Improved services dropdown layout and spacing
- Softened panel resize handles

**Desktop Integration**
- Synced macOS window theme with app theme
- Restored window dragging in sidebar header zones
- Fixed system window corners on macOS
- Improved header session metadata and action controls

**Button & Component Standardization**
- Unified button primitives across all components
- Standardized destructive action patterns
- Removed unused button variants (button-large, button-small)
- Aligned context tab close hit areas

---------

Co-authored-by: Iuliia Ivashko <yulia.ivashko@gmail.com>
This commit is contained in:
Bohdan Triapitsyn
2026-03-20 01:01:03 +02:00
committed by GitHub
co-authored by Iuliia Ivashko
parent 359879153a
commit 321cc7252a
222 changed files with 8575 additions and 5456 deletions
@@ -1,5 +1,5 @@
import React from 'react';
import { ButtonSmall } from '@/components/ui/button-small';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { NumberInput } from '@/components/ui/number-input';
import { Textarea } from '@/components/ui/textarea';
@@ -685,7 +685,7 @@ export const AgentsPage: React.FC = () => {
</Tooltip>
</div>
<div className="flex flex-wrap items-center gap-1">
<ButtonSmall
<Button
variant="outline"
size="xs"
onClick={() => setMode('primary')}
@@ -697,8 +697,8 @@ export const AgentsPage: React.FC = () => {
)}
>
Primary
</ButtonSmall>
<ButtonSmall
</Button>
<Button
variant="outline"
size="xs"
onClick={() => setMode('subagent')}
@@ -710,8 +710,8 @@ export const AgentsPage: React.FC = () => {
)}
>
Subagent
</ButtonSmall>
<ButtonSmall
</Button>
<Button
variant="outline"
size="xs"
onClick={() => setMode('all')}
@@ -723,7 +723,7 @@ export const AgentsPage: React.FC = () => {
)}
>
All
</ButtonSmall>
</Button>
</div>
</div>
</div>
@@ -790,7 +790,7 @@ export const AgentsPage: React.FC = () => {
className="w-16"
/>
{temperature !== undefined && (
<ButtonSmall
<Button size="sm"
type="button"
variant="ghost"
onClick={() => setTemperature(undefined)}
@@ -799,7 +799,7 @@ export const AgentsPage: React.FC = () => {
title="Clear"
>
<RiCloseLine className="h-3.5 w-3.5" />
</ButtonSmall>
</Button>
)}
</div>
</div>
@@ -834,7 +834,7 @@ export const AgentsPage: React.FC = () => {
className="w-16"
/>
{topP !== undefined && (
<ButtonSmall
<Button size="sm"
type="button"
variant="ghost"
onClick={() => setTopP(undefined)}
@@ -843,7 +843,7 @@ export const AgentsPage: React.FC = () => {
title="Clear"
>
<RiCloseLine className="h-3.5 w-3.5" />
</ButtonSmall>
</Button>
)}
</div>
</div>
@@ -876,14 +876,14 @@ export const AgentsPage: React.FC = () => {
<h3 className="typography-ui-header font-medium text-foreground">
Tool Permissions
</h3>
<ButtonSmall
<Button
variant="outline"
size="xs"
className="!font-normal"
onClick={() => setShowPermissionEditor((prev) => !prev)}
>
{showPermissionEditor ? 'Hide Editor' : 'Advanced Editor'}
</ButtonSmall>
</Button>
</div>
{!showPermissionEditor ? (
@@ -961,13 +961,13 @@ export const AgentsPage: React.FC = () => {
<span className="typography-micro text-muted-foreground">Pattern</span>
<span className="typography-micro font-mono text-foreground bg-[var(--surface-muted)] px-1 rounded">*</span>
{wildcardOverride && (
<ButtonSmall
<Button size="sm"
variant="ghost"
onClick={() => revertRule(permissionName, '*')}
className="px-1.5 py-0 h-5"
>
<RiSubtractLine className="h-3.5 w-3.5 text-muted-foreground hover:text-foreground" />
</ButtonSmall>
</Button>
)}
</div>
<Select
@@ -1008,13 +1008,13 @@ export const AgentsPage: React.FC = () => {
{isAdded && <span className="typography-micro text-[var(--status-success)]">New</span>}
{isModified && <span className="typography-micro text-[var(--status-warning)]">Modified</span>}
{(isAdded || isModified) && (
<ButtonSmall
<Button size="sm"
variant="ghost"
onClick={() => isAdded ? removeRule(rule.permission, rule.pattern) : revertRule(rule.permission, rule.pattern)}
className="px-1.5 py-0 h-5"
>
<RiSubtractLine className="h-3.5 w-3.5 text-muted-foreground hover:text-foreground" />
</ButtonSmall>
</Button>
)}
</div>
<Select
@@ -1069,9 +1069,9 @@ export const AgentsPage: React.FC = () => {
/>
<div className="flex gap-1">
<ButtonSmall variant="outline" size="xs" className="!font-normal" onClick={() => applyPendingRule('allow')}>Allow</ButtonSmall>
<ButtonSmall variant="outline" size="xs" className="!font-normal" onClick={() => applyPendingRule('ask')}>Ask</ButtonSmall>
<ButtonSmall variant="outline" size="xs" className="!font-normal" onClick={() => applyPendingRule('deny')}>Deny</ButtonSmall>
<Button variant="outline" size="xs" className="!font-normal" onClick={() => applyPendingRule('allow')}>Allow</Button>
<Button variant="outline" size="xs" className="!font-normal" onClick={() => applyPendingRule('ask')}>Ask</Button>
<Button variant="outline" size="xs" className="!font-normal" onClick={() => applyPendingRule('deny')}>Deny</Button>
</div>
</div>
</div>
@@ -1081,14 +1081,14 @@ export const AgentsPage: React.FC = () => {
{/* Save action */}
<div className="px-2 py-1">
<ButtonSmall
<Button
onClick={handleSave}
disabled={isSaving || !isDirty}
size="xs"
className="!font-normal"
>
{isSaving ? 'Saving...' : 'Save Changes'}
</ButtonSmall>
</Button>
</div>
</div>