Skip to content

Conversation

@dimakis
Copy link
Owner

@dimakis dimakis commented Feb 11, 2026

Summary

  • Fix 20+ TypeScript strict mode errors across the UI codebase that prevented npm run build (and thus make run-prod) from succeeding
  • Errors had accumulated because the Vite dev server doesn't enforce type checking, so they were invisible during development
  • Fixes include: typed vitest mocks, removed unused imports/variables, Framer Motion ease tuple assertions, missing Proposal type fields, Recharts label prop types, and vitest/config import for vite.config.ts

Motivation

Production containerized build (make run-prod) fails at the UI build step due to TypeScript errors that the dev server silently ignores.

Type of Change

  • fix — Bug fix

Changes

20 files changed (43 insertions, 56 deletions — net reduction):

Category Files Fix
Mock types trace-event-handler.test.ts Typed vi.fn<SetActivityFn>() for vitest 4.x
Duplicate types env.ts, vite-env.d.ts Removed duplicate Window.__ENV__ declaration
Unused code 8 files Removed unused imports and dead variables
Framer Motion EmptyState.tsx, MessageBubble.tsx Cast ease arrays as [number, number, number, number] tuples
Missing types types.ts Added ha_automation_id, ha_disabled, ha_error to Proposal
Recharts usage.tsx Fixed Pie label props and Tooltip formatter types
Vitest config vite.config.ts Switched to import { defineConfig } from "vitest/config"
React 19 useGlobalActivityStream.ts Added explicit initial value to useRef
Missing arg InlineAssistant.tsx Provided required 3rd argument to handleTraceEvent

Testing

  • npx tsc --noEmit — zero errors
  • npm run build (tsc -b && vite build) — completes successfully
  • make run-prod — builds and starts the containerized stack

Security Considerations

  • No security implications

Checklist

  • My code follows the project's style (ruff, mypy pass)
  • I've updated documentation if needed
  • I've added conventional commit messages
  • Branch commits squashed into a single conventional commit
  • Ready for rebase-merge

@dimakis dimakis changed the title Fix/UI typescript errors fix(ui): resolve TypeScript errors blocking production build Feb 11, 2026
Fix 20+ TypeScript strict mode errors across the UI codebase that
prevented `npm run build` (and thus `make run-prod`) from succeeding.
The Vite dev server doesn't enforce type checking, so these had
accumulated unnoticed.

Fixes include: typed vitest mocks, removed unused imports/variables,
Framer Motion ease tuple assertions, missing Proposal type fields,
Recharts label prop types, and vitest/config import for vite.config.ts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dimakis dimakis force-pushed the fix/ui-typescript-errors branch from 96350ab to d33606f Compare February 11, 2026 00:28
@github-actions github-actions bot added size/s and removed docs labels Feb 11, 2026
@dimakis dimakis merged commit 92486cd into main Feb 11, 2026
14 checks passed
@dimakis dimakis deleted the fix/ui-typescript-errors branch February 11, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant