Skip to content

Conversation

@gamidirohan
Copy link

Updated Solution.tsx to accept Explanation in string format instead of an array.
Code and Complexities are parsed through perfectly with a custom backend.

@gamidirohan
Copy link
Author

gamidirohan commented Mar 14, 2025

It seems like this doesn't create any input for the API key

In this, all the API keys were given from the ".env" files itself, in the backend.

@gamidirohan
Copy link
Author

Thanks I realised that soon after I made that comment haha. I tried running the application again but this time with the API key in a .env file(verified the API key works prior to this) - but I've encountering the following error:

API Error Details: {
status: undefined,
data: undefined,
message: '',
code: 'ECONNREFUSED'
}
Processing error details: {
message: 'Server error. Please try again.',
code: undefined,
response: undefined,
retryCount: 0
}
Processing failed: Server error. Please try again.

Seems like it can't establish a connection with the API endpoint, any ideas what might be causing this issue?

Hey, I've actually made a seperate backend for this fronend app. I'm so sorry u haven't informed it clearly. Run those on the same device simultaneously and it should work. Took a few days but I was able to complete it somehow. Works with basic functionalities but it doesn't seem to get the right answer everytime, works perfectly with the test image in my repo tho. Maybe look into the prompts given, I'll try working on it too when free.
The backend repo is in my github account.
Please do star and fork it, maybe improve it if possible. Thanks

This commit adds:
1. A new CopyButton component that allows users to easily copy code with proper indentation
2. Integration of the copy button in all code sections in both Solutions and Debug pages
3. Styling that matches the dark theme with translucent background

Known issues that still need to be addressed:
- Window resizing not working correctly - the application window doesn't properly resize to match content
- Need to investigate how content dimensions are communicated to the main process
BREAKING CHANGES:
- Completely refactored from interview-coder app to conversational co-pilot
- Removed all legacy screenshot/interview-coder functionality
- Transformed UI into horizontal floating window with glass-morphism design

Core Features:
- Floating window: 1920x500 default, centered, rounded corners, taskbar invisible
- Responsive design: Desktop (16:9) and mobile (9:16) aspect ratios
- Window scaling: Ctrl +/- to resize entire window (not content zoom)
- Window movement: Ctrl + Arrow keys for keyboard navigation
- Glass-morphism dark theme with modern UI components

Files Modified:
- electron/main.ts: Complete window management rewrite with scaling/movement logic
- electron/preload.ts: Updated IPC API for new co-pilot functionality
- electron/ipcHandlers.ts: Added window scaling and movement IPC handlers
- electron/shortcuts.ts: Added keyboard shortcuts for window control
- src/App.tsx: Complete UI rewrite with responsive floating dock navigation
- src/types/electron.d.ts: Updated type definitions for new IPC events
- package.json: Updated app metadata and dependencies

New Components:
- src/components/ui/floating-dock.tsx: Floating navigation dock component
- src/components/main-layout.tsx: Main layout wrapper with responsive design

Documentation:
- TASKS.md: Detailed task breakdown and progress tracking
- FLOATING_WINDOW_README.md: Technical documentation for window features

Legacy Code Removal:
- All screenshot/interview-coder UI components and logic removed
- Replaced with modern chat interface and speech visualization
- Removed Queue/Solutions/Debug pages, replaced with conversational UI
FIXES:
- Window scaling now respects 1382x777 as true 1.0x maximum
- Prevent scaling beyond 1.0x (show 'Already at maximum' message)
- Fix window movement with proper keyboard shortcuts (Ctrl + Arrow keys)
- Add scaling debounce to prevent choppy resize behavior
- Improve scale-to-actual-size correlation

CHANGES:
- electron/main.ts:
  * Update originalWidth/Height to 1382x777 (actual displayable maximum)
  * Add scaleWindow function with proper bounds checking
  * Implement window movement functions with screen constraints
  * Add isTogglingVisibility flag to prevent resize loops during show/hide
  * Improve setWindowDimensions with better debouncing and thresholds
- electron/shortcuts.ts:
  * Add missing keyboard shortcuts for window movement (Ctrl + Arrow keys)
  * Fix scale shortcuts to use window scaling instead of content zoom
  * Add scale debouncing to prevent rapid-fire scaling issues

TECHNICAL DETAILS:
- Scale factor now directly correlates with visual window size
- Eliminated 'phantom scaling' where scale changed but window didn't
- Window movement uses proper boundary checking
- Added comprehensive logging for debugging scaling issues
PROBLEM SOLVED:
- Eliminated endless 'Window dimensions updated' spam when window loses focus
- Fixed architectural issue where ResizeObserver fired continuously regardless of focus state

SOLUTION APPROACH:
- Move from 'filter-at-destination' to 'control-at-source' architecture
- Enable/disable ResizeObserver based on window focus state instead of checking focus on every resize

CHANGES:
- src/App.tsx:
  * Replace always-active ResizeObserver with focus-aware ResizeObserver
  * Add window focus/blur event listeners
  * Enable ResizeObserver only when window is focused
  * Disable ResizeObserver completely when window loses focus
  * Add proper cleanup for event listeners and observer

TECHNICAL BENEFITS:
- No IPC calls when window is out of focus
- Better performance (less processing when inactive)
- Cleaner logs (no spam when unfocused)
- Architectural improvement: event source control vs event filtering

BEFORE: ResizeObserver fires  IPC calls  Electron rejects  Waste processing
AFTER: Window unfocused  ResizeObserver disabled  No IPC calls  Clean architecture
gamidirohan and others added 6 commits June 18, 2025 21:54
…sation history

- Merged code mode UI back into App.tsx from separate CodePage
- Implemented conversational AI chat interface for solutions
- Fixed window opacity handling (Ctrl+] now works properly)
- Added invisible scrollbars for clean UI
- Created conversation history state for user/AI messages
- Removed duplicate imports and old components

Known issues:
- Layout stretching: right side speech widgets stretched, input area pushed out of view
- Duplicate rendering: 'Code Analysis' text appears twice
- Scroll container height needs adjustment to fit within window bounds
…on of UI and a few shortcuts, modularised components and nav bar. Not Completed: Backend; Window movement with shortcuts; Actual Brain Page implementation
- Fix window movement controls (add isMoving flag)
- Prevent accidental transparency (increase min opacity 0.10.3)
- Auto-restore opacity after solution generation
- Enhance CodePage with explanation and complexity details
- Add opacity shortcut hints and debug info
… STT is working for user end mic, other side to be fixed/ implemented. Also, End point port numbers fixed to accomodate webhooks and rest of the server to work toegther.
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