Merge pull request #115 from ipodishima/fix/build

Fix latest build issues from master
This commit is contained in:
Leon van Zyl
2026-01-29 09:22:19 +02:00
committed by GitHub
8 changed files with 29 additions and 13 deletions

View File

@@ -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"
package_json = UI_DIR / "package.json"
package_lock = UI_DIR / "package-lock.json"
if node_modules.exists():
# 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

6
ui/package-lock.json generated
View File

@@ -3024,7 +3024,7 @@
"version": "19.2.9",
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.9.tgz",
"integrity": "sha512-Lpo8kgb/igvMIPeNV2rsYKTgaORYdO1XGVZ4Qz3akwOj0ySGYMPlQWa8BaLn0G63D1aSaAQ5ldR06wCpChQCjA==",
"dev": true,
"devOptional": true,
"license": "MIT",
"dependencies": {
"csstype": "^3.2.2"
@@ -3034,7 +3034,7 @@
"version": "19.2.3",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz",
"integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",
"dev": true,
"devOptional": true,
"license": "MIT",
"peerDependencies": {
"@types/react": "^19.2.0"
@@ -3658,7 +3658,7 @@
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
"dev": true,
"devOptional": true,
"license": "MIT"
},
"node_modules/d3-color": {

View File

@@ -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'

View File

@@ -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')
}}
@@ -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')
}}
@@ -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')
}}
@@ -421,7 +421,7 @@ export function DebugLogViewer({
<Button
variant="ghost"
size="icon"
onClick={(e) => {
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
handleClear()
}}

View File

@@ -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} />

View File

@@ -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 }))
}
/>

View File

@@ -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(() => {

View File

@@ -4,6 +4,7 @@
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,
"types": ["node"],
/* Bundler mode */
"moduleResolution": "bundler",