Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions start_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,25 @@ def check_node() -> bool:


def install_npm_deps() -> bool:
"""Install npm dependencies if node_modules doesn't exist."""
"""Install npm dependencies if node_modules doesn't exist or is stale."""
node_modules = UI_DIR / "node_modules"

if node_modules.exists():
package_json = UI_DIR / "package.json"
package_lock = UI_DIR / "package-lock.json"

# Check if npm install is needed
needs_install = False

if not node_modules.exists():
needs_install = True
elif package_json.exists():
# If package.json or package-lock.json is newer than node_modules, reinstall
node_modules_mtime = node_modules.stat().st_mtime
if package_json.stat().st_mtime > node_modules_mtime:
needs_install = True
elif package_lock.exists() and package_lock.stat().st_mtime > node_modules_mtime:
needs_install = True

if not needs_install:
print(" npm dependencies already installed")
return True

Expand Down
6 changes: 3 additions & 3 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/src/components/ConversationHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function ConversationHistory({
<Button
variant="ghost"
size="icon"
onClick={(e) => handleDeleteClick(e, conversation)}
onClick={(e: React.MouseEvent) => handleDeleteClick(e, conversation)}
className={`h-8 w-8 mr-2 ${
isCurrent
? 'opacity-60 hover:opacity-100'
Expand Down
8 changes: 4 additions & 4 deletions ui/src/components/DebugLogViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export function DebugLogViewer({
<Button
variant={activeTab === 'agent' ? 'secondary' : 'ghost'}
size="sm"
onClick={(e) => {
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
setActiveTab('agent')
}}
Expand All @@ -366,7 +366,7 @@ export function DebugLogViewer({
<Button
variant={activeTab === 'devserver' ? 'secondary' : 'ghost'}
size="sm"
onClick={(e) => {
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
setActiveTab('devserver')
}}
Expand All @@ -383,7 +383,7 @@ export function DebugLogViewer({
<Button
variant={activeTab === 'terminal' ? 'secondary' : 'ghost'}
size="sm"
onClick={(e) => {
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
setActiveTab('terminal')
}}
Expand Down Expand Up @@ -421,7 +421,7 @@ export function DebugLogViewer({
<Button
variant="ghost"
size="icon"
onClick={(e) => {
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
handleClear()
}}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/ProjectSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function ProjectSelector({
<Button
variant="ghost"
size="icon-xs"
onClick={(e) => handleDeleteClick(e, project.name)}
onClick={(e: React.MouseEvent) => handleDeleteClick(e, project.name)}
className="text-muted-foreground hover:text-destructive"
>
<Trash2 size={14} />
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/ScheduleModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export function ScheduleModal({ projectName, isOpen, onClose }: ScheduleModalPro
<Checkbox
id="yolo-mode"
checked={newSchedule.yolo_mode}
onCheckedChange={(checked) =>
onCheckedChange={(checked: boolean | 'indeterminate') =>
setNewSchedule((prev) => ({ ...prev, yolo_mode: checked === true }))
}
/>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/ThemeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function ThemeSelector({ themes, currentTheme, onThemeChange }: ThemeSele
const [isOpen, setIsOpen] = useState(false)
const [previewTheme, setPreviewTheme] = useState<ThemeId | null>(null)
const containerRef = useRef<HTMLDivElement>(null)
const timeoutRef = useRef<NodeJS.Timeout | null>(null)
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)

// Close dropdown when clicking outside
useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions ui/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,
"types": ["node"],

/* Bundler mode */
"moduleResolution": "bundler",
Expand Down
Loading