Skip to content

fix: resolve critical config errors, type mismatches, and memory leaks#17

Open
nikomatt69 wants to merge 1 commit intomainfrom
fix/codebase-errors-and-optimizations
Open

fix: resolve critical config errors, type mismatches, and memory leaks#17
nikomatt69 wants to merge 1 commit intomainfrom
fix/codebase-errors-and-optimizations

Conversation

@nikomatt69
Copy link
Copy Markdown
Owner

Summary

Fixed 85+ issues across the codebase identified through comprehensive code analysis.

Critical Config Fixes

File Issue Fix
Cargo.toml Duplicate tauri-plugin-keyring, invalid tauri-plugin-biometric: 2.0.0 Removed duplicates, changed to valid versions
tsconfig.json Missing baseUrl, ES5 target incompatible with ES modules Added baseUrl: ".", changed target to ES2020
next.config.js output: 'export' breaks Tauri Removed static export
tauri.conf.json Identifier, CSP policy, invalid resources Fixed identifier, CSP, removed invalid resources
build.yml Incomplete ternary syntax Fixed conditional syntax
security.yml Audits set to continue-on-error Removed to fail on vulnerabilities
release.yml Outdated Ubuntu 20.04, Node 18 Updated to Ubuntu 22.04, Node 20
VSCode package.json Publisher mismatch, missing vsce Fixed publisher to cadcamfun, added vsce
package.json Invalid framer-motion: ^12.23.6, beta plugins Changed to ^11.0.0, aligned plugin versions

Type/Logic Fixes

  • Unified duplicate ApiKey, UserPreferences, MLEngineStatus interfaces
  • Fixed dependencies[0] bug creating Set of characters → [...new Set(dependencies)]
  • Fixed environment values mismatch ("dev""development")
  • Fixed race conditions in MLService initialization

Memory Leaks & Performance

  • Fixed setInterval cleanup in integrationService - intervals now cleared in reset()
  • Added cache size limits and cleanup in llmProxyService with maxCacheSize
  • Fixed race conditions in singleton patterns across services

Component Fixes

  • Added null safety with optional chaining in Sidebar.tsx
  • Removed unused imports across 5 components
  • Added accessibility attributes (role, tabIndex, aria-label) to BottomSheet.tsx
  • Fixed type assertions in environment selects

Files Changed

  • 21 files changed
  • 149 insertions(+), 142 deletions(-)

## Summary
- Fix Cargo.toml: removed duplicate plugins, invalid biometric version
- Fix tsconfig.json: added missing baseUrl, updated ES target to ES2020
- Fix next.config.js: removed static export incompatible with Tauri
- Fix tauri.conf.json: fixed identifier, CSP policy, removed invalid resources
- Fix GitHub workflows: corrected syntax errors, updated Ubuntu/Node versions
- Fix VSCode package.json: aligned publisher, added missing vsce dependency
- Fix package.json: corrected framer-motion version, aligned Tauri plugins

## Type Fixes
- Unified duplicate ApiKey, UserPreferences, MLEngineStatus interfaces
- Fixed environment values mismatch (dev → development)
- Fixed dependencies deduplication bug in apiProviderService

## Memory Leaks & Performance
- Fixed setInterval cleanup in integrationService
- Added cache size limits and cleanup in llmProxyService
- Fixed race conditions in MLService initialization

## Component Fixes
- Added null safety checks in Sidebar
- Removed unused imports across components
- Added accessibility attributes to BottomSheet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant