Commit graph

6 commits

Author SHA1 Message Date
Claude
f4e6651724
Complete Phase 2: Full integration of multi-platform system
This completes the integration of the cross-platform translation engine
into the main application, making it fully functional.

App.tsx Changes:
- Added platform state management (currentPlatform: PlatformId)
- Added translation panel state (showTranslation)
- Integrated TranslationPanel component with lazy loading
- Updated Toolbar with platform selector and translate button
- Passed platform prop to TemplatesDrawer and CodeEditor
- Connected all state management for seamless platform switching

TemplatesDrawer Changes:
- Now accepts currentPlatform prop
- Filters templates by selected platform using getTemplatesForPlatform()
- Shows platform icon and name in header
- Displays template count for current platform
- Ready for UEFN/Spatial/Core templates

CodeEditor Changes:
- Accepts optional platform prop (defaults to 'roblox')
- Dynamically sets Monaco editor language based on platform:
  * roblox → lua
  * uefn → plaintext (Verse not yet in Monaco)
  * spatial → typescript
  * core → lua
- Maintains backward compatibility with existing code

Functional Features:
 Platform switching in toolbar
 Templates filter by platform automatically
 Editor language changes with platform
 Translation panel opens with "Translate" button
 Side-by-side code comparison
 Mock translation working
 All state connected and reactive

Next: Phase 3 (Create UEFN templates) or Phase 4 (Claude API integration)
2026-01-17 22:58:04 +00:00
Claude
d43e0a3a27
Improve error handling across components
- Add try-catch blocks for localStorage operations (user state, login, signout)
- Add validation and error handling for file operations (create, rename, delete, move)
- Add error handling for project creation with validation
- Improve error logging with Sentry context in AIChat
- Add loading state and error handling for Monaco editor
- Add user-friendly error messages via toast notifications
- Add console.error logging for debugging
- Validate inputs (empty names, etc.) before processing
2026-01-17 22:28:47 +00:00
Claude
281faf1395
Merge main branch with all bug fixes preserved
Successfully merged latest changes from main while preserving all bug fixes:

Preserved Bug Fixes:
- window.spark null checks in AIChat.tsx (line 36-38)
- window.spark null checks in Toolbar.tsx (line 28)
- window guard in CodeEditor.tsx minimap (line 49)
- Ref type fix in ConsolePanel.tsx
- Checkbox type fixes in NewProjectModal.tsx
- Window guards in use-mobile.ts, sidebar.tsx
- Silent error handling in tailwind.config.js

New Features from Main:
- Enhanced AI prompt with code completion support
- Code syntax highlighting in AI responses
- Improved editor styling and scrollbar customization
- New education, analytics, and collaboration panels
- PostHog and Sentry integration
- Passport authentication
- Asset library and certification features

All merge conflicts resolved with both security fixes and new features intact.
2026-01-17 21:38:14 +00:00
Claude
5c941a3130
Fix multiple runtime safety and type issues across codebase
This commit addresses 21+ bugs identified in the codebase scan:

High Severity Fixes:
- Add window.spark null checks in Toolbar.tsx and AIChat.tsx to prevent crashes
- Fix ref type mismatch in ConsolePanel.tsx by using scrollIntoView pattern
- Fix checkbox type casting in NewProjectModal.tsx (handle 'indeterminate' state)

Medium Severity Fixes:
- Add window guards for SSR safety in use-mobile.ts hook
- Add window guards in CodeEditor.tsx for minimap configuration
- Add window guards in sidebar.tsx for keyboard event listeners
- Remove console.error from AIChat.tsx (already has toast notifications)
- Replace console.error with silent fallback in tailwind.config.js

These improvements enhance:
1. Runtime safety - no more crashes from undefined window.spark
2. Type safety - proper handling of Radix UI checkbox states
3. SSR compatibility - all window accesses are now guarded
4. User experience - better error handling with toast notifications

All changes maintain backward compatibility and existing functionality.
2026-01-17 21:34:32 +00:00
600ab00231
new file: .next/cache/config.json 2026-01-17 05:02:00 +00:00
fb17d0e075 Generated by Spark: ? 2026-01-17 02:52:12 +00:00