Commit Graph

2620 Commits

Author SHA1 Message Date
spencrmartin 044f5fd030 Fix holographic text effect by using WebkitTextFillColor
- Changed from rgba(0,0,0,0) back to transparent for cleaner text hiding
- Added WebkitTextFillColor: transparent to eliminate text visibility artifacts
- Should maintain blue selection highlighting while removing ghost text effect
2025-10-23 09:51:48 -04:00
spencrmartin e2323c3f0a Fix text selection visibility by making textarea fully visible
- Changed opacity from 0.01 to 1 to allow selection highlighting
- Used rgba(0,0,0,0) for transparent text while keeping element visible
- Added explicit user-select CSS properties
- Made selection text fully opaque white for better visibility
2025-10-23 09:51:48 -04:00
spencrmartin f77e93e97b Fix text selection visibility with blue highlight
- Increased textarea opacity to 0.01 to allow selection highlighting
- Added CSS rules for blue selection background with white text
- Removed conflicting Tailwind selection classes
- Used !important to ensure selection styles override defaults
2025-10-23 09:51:48 -04:00
spencrmartin 8e70175353 Improve height reset logic for proper shrinking after text deletion
- Reset height constraints on both textarea and display layers
- Force reflow on both elements to ensure accurate measurement
- Reset display content constraints to prevent stale minHeight values
- Enhanced logging to track height synchronization behavior
2025-10-23 09:51:48 -04:00
spencrmartin d5cf8ad314 Fix chat input height not shrinking after text deletion
- Reset all height constraints before measuring content height
- Force browser reflow to ensure accurate scrollHeight measurement
- Input now properly shrinks back to base size when text is deleted
2025-10-23 09:51:47 -04:00
spencrmartin f3d71b2e3b Fix spell check hover interference with typing
- Remove onMouseMove handler from textarea to prevent cursor jumping
- Add activity tracking to prevent hover tooltips while actively typing
- Only show hover tooltips after 500ms of inactivity
- Maintain click functionality for spell check suggestions
- Prevent tooltip interference with normal text input flow
2025-10-23 09:51:47 -04:00
spencrmartin 177586c985 Fix spell check focus issues and prevent input clearing
- Added focus preservation after clicking misspelled words to maintain typing ability
- Improved stale result detection by checking current textarea value instead of closure value
- Removed problematic value dependency from performSpellCheck to prevent callback recreation
- Ensures textarea stays focused and responsive during spell check interactions
2025-10-23 09:51:47 -04:00
spencrmartin 23f285239e Fix spell check callback causing input clearing issues
- Remove value dependency from performSpellCheck useCallback to prevent recreation
- Use direct DOM access via hiddenTextareaRef for current value comparison
- Prevent stale spell check results from interfering with active typing
- Fixes issue where input would clear or stop recording when spell check highlights mid-word
2025-10-23 09:51:47 -04:00
spencrmartin 5509daa0ff Implement smart spell check timing to prevent layout shifts
- Added context-aware spell check delays: 150ms after word completion, 300ms while typing
- Implemented stale result detection to prevent late spell check updates from shifting text
- Added duplicate check prevention to avoid unnecessary re-processing of same text
- Detects word boundaries (space, punctuation, newlines) for immediate spell checking
- Prevents visual disruption during active typing while maintaining responsiveness
2025-10-23 09:51:47 -04:00
spencrmartin 5903a035a5 Improve height synchronization responsiveness in RichChatInput
- Remove requestAnimationFrame wrapper from syncDisplayHeight for immediate execution
- Add dual sync approach: immediate sync + deferred sync for reliability
- Ensures newline height changes are captured instantly without visual lag
- Fixes UI cutoff issues when typing new lines quickly
2025-10-23 09:51:47 -04:00
spencrmartin 6dfbe01dfd Fix empty state placeholder alignment in RichChatInput
- Changed placeholder container from flex items-center to match content structure
- Applied same whitespace-pre-wrap, min-h-[1.5em], and leading-relaxed classes
- Standardized cursor styling with align-baseline and consistent margins
- Ensures empty state and content state have identical vertical positioning
- Eliminates awkward upward shift when transitioning from empty to content state
2025-10-23 09:51:47 -04:00
spencrmartin 7f3ac6776c Improve RichChatInput spell checking and layout synchronization
- Enhanced multi-line text positioning for spell check hover detection
- Improved line-by-line character positioning calculation using computed styles
- Fixed textarea and display layer height synchronization by removing fixed height
- Added proper scrollbar hiding for rich-text-display while maintaining scroll functionality
- Standardized padding between textarea and display layers (12px top/bottom)
- Better handling of newlines and multi-line content in spell check positioning
2025-10-23 09:51:47 -04:00
spencrmartin ce40701911 Enhance cursor visibility with improved auto-scroll system
- Use getComputedStyle for accurate font and dimension measurements
- Increase padding to Math.max(40, lineHeight * 2) for better visibility
- Add auto-scroll on cursor movement and selection changes
- Add detailed logging for scroll debugging
- Force display layer sync after scrolling
- Ensure cursor is always visible with generous padding buffer
2025-10-23 09:51:47 -04:00
spencrmartin 492bd63a71 Fix scrolling issues and prevent message section interference
- Add scroll loop prevention in handleTextareaScroll with 1px threshold
- Change visual display from overflow-y-auto to overflow-hidden
- Ensure only textarea controls scrolling behavior
- Prevent visual layer from interfering with parent scroll events
- Maintain auto-scroll functionality while fixing sync issues
2025-10-23 09:51:47 -04:00
spencrmartin bc72744de9 Add auto-scroll to cursor functionality for large paragraphs
- Implement scrollToCursor function to calculate cursor position
- Auto-scroll when typing to keep cursor visible
- Add 20px padding for comfortable viewing
- Trigger scroll on text changes with setTimeout for DOM updates
- Maintain smooth scrolling behavior
- Ensure cursor is always visible when typing at bottom of content
2025-10-23 09:51:47 -04:00
spencrmartin f476c28859 Fix holographic text effect by making textarea completely invisible
- Change textarea opacity from 0.15 to 0 (completely invisible)
- Change text color from faint blue to transparent
- Eliminate ghosting/holographic text overlay effect
- Maintain all functionality while providing clean visual appearance
2025-10-23 09:51:46 -04:00
spencrmartin 9ddaf699d0 Add scroll functionality for large paragraphs
- Add overflow-y-auto to both textarea and visual display layers
- Implement scroll synchronization between layers
- Maintain spell checking functionality during scrolling
- Enable writing and editing of long text content
- Preserve all interactive features (selection, spell check, tooltips)
2025-10-23 09:51:46 -04:00
spencrmartin a4458fbf42 Fix hover interaction for misspelled words in larger paragraphs
- Increase visual display layer z-index from 1 to 3 (above textarea)
- Increase misspelled word z-index from z-10 to z-50 for proper layering
- Ensure misspelled words receive mouse events even in multi-line content
- Maintain proper event handling hierarchy for text selection and spell checking
2025-10-23 09:51:46 -04:00
spencrmartin 68bf9d96f7 Remove wavy underline from misspelled words, keep clean highlight
- Remove underline decoration-wavy decoration-red-500 classes
- Maintain clean highlighted appearance with background and border only
- Preserve all interactive functionality (hover, click, tooltip)
- Cleaner visual design focused on background highlighting
2025-10-23 09:51:46 -04:00
spencrmartin 96c208e585 Add smart positioning to prevent spell check tooltip cutoff
- Implement intelligent tooltip positioning to avoid window edges
- Automatically adjust horizontal alignment (left, center, right) based on available space
- Switch to below-word positioning when insufficient vertical space above
- Add 10px margin from window edges for better visibility
- Use timeout to ensure tooltip renders before calculating position
- Maintain proper transform origins for different alignment modes
2025-10-23 09:51:46 -04:00
spencrmartin f960bfeb97 Update spell check styling to use Tailwind CSS with dark/light mode support
- Replace hardcoded colors with Tailwind CSS semantic color classes
- Add proper dark mode support with dark: variants
- Maintain text selection capability (userSelect: 'text')
- Use consistent design system colors for borders, backgrounds, and text
- Ensure accessibility across light and dark themes
2025-10-23 09:51:46 -04:00
spencrmartin 4ff6cad1fa Enhance spell check tooltip with click interaction and keyboard navigation
- Add click support for misspelled words to show tooltip
- Implement keyboard navigation (arrow keys, numbers 1-5, Enter, Escape)
- Improve visual styling with hover effects and transitions
- Add proper click detection to prevent tooltip from closing when interacting
- Enhanced tooltip positioning and visual feedback
- Add keyboard shortcuts hints at bottom of tooltip
2025-10-23 09:51:46 -04:00
spencrmartin a9a26391ff Clean up spell checking implementation
- Remove unused dictionaries folder and files
- Remove old realSpellCheck.ts utility
- Fix TypeScript types in RichChatInput
- Remove unused import references
2025-10-23 09:51:46 -04:00
spencrmartin 9b42dc819d Implement system-level spell checking
- Replace hardcoded dictionary with native OS spell checkers
- Use aspell on macOS/Linux and hunspell on Windows
- Add IPC handlers for spell-check and spell-suggestions
- Integrate spell checking into RichChatInput component
- Add proper error handling and fallbacks for missing utilities
2025-10-23 09:51:46 -04:00
spencrmartin 31ab35d7f9 Clean up: remove backup files, temp scripts, and debug files
- Remove *.backup files (ChatInput.tsx.backup, RichChatInput.tsx.backup, Cargo.toml.backup)
- Remove temp_* files (temp_smart_spellcheck.js, temp_batch_issues.md, temp_test_typo.js)
- Remove fix_*.py scripts (fix_action_button.py, fix_action_insertion.py)
- Remove modify_*.js scripts (modify_rich_chat_input_tooltip_hover.js)
- Clean repository for production readiness
2025-10-23 09:51:46 -04:00
spencrmartin 353d3d2484 Add spell checking with hover tooltips to RichChatInput
- Implement inline spell checking with pattern-based detection for keyboard mashing, excessive consonants, and very long words
- Add hover tooltips positioned 1px above misspelled words with suggestions
- Include tooltip hover persistence to allow user interaction
- Add visual highlighting with bright red background for clear visibility
- Use textarea-based hover detection for cross-platform compatibility
- Integrate spell checking into dual-layer rich text input architecture
2025-10-23 09:51:46 -04:00
spencrmartin 4f7e476ebf fix: improve tooltip positioning to be static above misspelled words
- Calculate static X position based on word start character position
- Position tooltip just 2px above the input component (y: rect.top - 2)
- Use character width estimation to align tooltip with word start
- Remove floating behavior - tooltip now stays in fixed position
- Account for textarea padding in position calculations
2025-10-23 09:51:45 -04:00
spencrmartin 5e780e388a feat: implement textarea-based hover detection for spell check tooltips
- Replace visual layer hover with textarea onMouseMove detection
- Map mouse coordinates to character positions in text
- Check if mouse position overlaps with misspelled word boundaries
- Show tooltip when hovering over misspelled words via textarea
- Bypasses CSS pointer-events issues with dual-layer architecture
- Uses caretRangeFromPoint API for precise character position detection
2025-10-23 09:51:45 -04:00
spencrmartin b6cd41d94a feat: replace right-click context menu with hover tooltip for spell check
- Create SpellCheckTooltip component with hover-based interaction
- Replace right-click context menu with more intuitive hover tooltip
- Position tooltip above misspelled words for better UX
- Add smooth hover enter/leave interactions with delay
- More uniform across platforms (no right-click issues on Mac)
- Compact design showing up to 5 suggestions with numbers
- Maintains all functionality: suggestion selection, add to dictionary, ignore
2025-10-23 09:51:45 -04:00
spencrmartin 921e2303b5 fix: enhance spell checker to detect gibberish and obvious misspellings
- Replace hardcoded word list with intelligent pattern detection
- Detect keyboard mashing patterns (qwerty, asdf, zxcv)
- Catch very long words (>15 chars) as likely gibberish
- Identify words with excessive consonant clusters
- Skip common correct words to reduce false positives
- Should now catch words like 'dasfasg' and 'saddsdafhaoihsodiahsdoahd'
- Maintains specific suggestions for known misspellings
2025-10-23 09:51:45 -04:00
spencrmartin 26ae0b8d9d feat: add right-click context menu for spell check suggestions
- Create SpellCheckContextMenu component with professional styling
- Add right-click handler to misspelled words
- Implement suggestion selection with automatic word replacement
- Add 'Add to dictionary' and 'Ignore' functionality (ready for implementation)
- Include smart suggestions for common misspellings (hellwo->hello, recieve->receive, etc.)
- Support keyboard navigation (Escape to close)
- Proper click-outside-to-close behavior
- Prevent default browser context menu on misspelled words
2025-10-23 09:51:45 -04:00
spencrmartin 7eae354585 fix: improve simple spell checker with hellwo and better debugging
- Add 'hellwo' to test misspellings list
- Use proper regex for word boundary detection
- Add detailed logging for each word checked
- Show whether each word is marked as correct or misspelling
- This should definitely catch 'hellwo' and show detailed debug info
2025-10-23 09:51:45 -04:00
spencrmartin ccf7de4549 debug: replace complex spell checker with simple test version
- Replace Typo.js integration with simple hardcoded spell checker
- Should catch 'gasdd2', 'recieve', 'seperate', 'definately', etc.
- Add detailed logging to debug spell check process
- This will help identify if issue is with Typo.js or the highlighting system
- If this works, we know the highlighting is fine and can fix Typo.js separately
2025-10-23 09:51:45 -04:00
spencrmartin 10fd72e0b5 debug: fix TypeScript conflicts and add extensive spell check debugging
- Fix import conflicts between local and imported checkSpelling functions
- Add @ts-ignore for typo-js import compatibility
- Add extensive console logging throughout spell check process
- Add fallback spell checker for testing if Typo.js fails
- Install @types/typo-js for better TypeScript support
- This should help identify why spell check highlighting isn't working
2025-10-23 09:51:45 -04:00
spencrmartin 8bb64415dd feat: implement professional spell checker with Typo.js
- Install typo-js library for real dictionary-based spell checking
- Download US English dictionaries (50,000+ words) from Hunspell/LibreOffice
- Create realSpellCheck.ts with professional spell checking capabilities
- Add spell suggestions functionality for future use
- Replace heuristic spell checker with real dictionary-based checking
- Maintain technical term filtering for developer context
- Singleton pattern for performance optimization
- Graceful fallback handling for dictionary loading
2025-10-23 09:51:45 -04:00
spencrmartin 1bb9ea62d4 feat: implement smart heuristic-based spell checker
- Create smartSpellCheck.ts utility with pattern-based spell checking
- Replace hardcoded word list with intelligent heuristics
- Skip technical terms (API, JSON, React, etc.) and short words
- Detect common misspelling patterns (reciev*, seperat*, definat*)
- Check for unusual letter combinations and invalid patterns
- Much more accurate and context-aware for developer environment
- Extensible pattern system instead of static word lists
2025-10-23 09:51:45 -04:00
spencrmartin a326505e89 fix: add test words to spell check and detailed debugging
- Add 'sdd', 'asdf', 'qwerty', 'test', 'xyz' to misspellings list for testing
- Add many more common misspellings for better coverage
- Add detailed console logging to debug spell check word processing
- This should now detect 'sdd' as a misspelling and show bright red styling
2025-10-23 09:51:45 -04:00
spencrmartin 5756145baf debug: add console logging and ultra-bright spell check styling
- Add console.log statements to debug spell check functionality
- Make spell check styling ultra-visible with bright red background
- Use #fecaca background color that should be impossible to miss
- Add thick border, bold text, padding, and shadow
- This will help identify if it's a logic or styling issue
2025-10-23 09:51:45 -04:00
spencrmartin 2e13f35cde fix: disable browser spell check and make custom spell check ultra-visible
- Disable browser spellCheck={false} to prevent interference with custom styling
- Make custom spell check much more visible with:
  - Thick red border (3px solid)
  - Strong red background (20% opacity)
  - Bold dark red text
  - Red shadow for emphasis
  - More padding for better appearance
- Fixes issue where browser's faint dotted line was overriding custom styling
2025-10-23 09:51:45 -04:00
spencrmartin 3f11957e5f fix: use solid border approach for spell check visibility
- Replace faint text-decoration with solid red border
- Add subtle red background tint for extra emphasis
- Use borderBottom: '2px solid #ef4444' for reliable visibility
- Add rounded corners and proper padding
- Fixes issue where text-decoration was barely visible (same issue we had with highlight component)
2025-10-23 09:51:44 -04:00
spencrmartin c6fa5cbdcf fix: make spell check underlines much more visible
- Change from dotted to wavy underline (like Microsoft Word)
- Add fallback border for browser compatibility
- Increase underline offset and add padding
- Use brighter red color for better visibility
- Addresses issue where spell check lines were barely visible
2025-10-23 09:51:44 -04:00
spencrmartin 7338bded68 feat: add spell checking to RichChatInput
- Enable browser spell check on hidden textarea with spellCheck={true}
- Implement custom spell checking system with red dotted underlines
- Add checkSpelling function with common misspellings detection
- Integrate spell check with existing pill rendering system
- Handle overlapping matches (pills take priority over spell check)
- Add debounced spell checking (500ms delay) for performance
- Style misspelled words with red dotted underline and tooltips
- Maintain accessibility with proper title attributes
2025-10-23 09:51:44 -04:00
spencrmartin a0f22993c0 fix: resolve cc crate dependency conflict
- Add cc = "1.0.106" to workspace dependencies to resolve transitive dependency conflicts
- Update Cargo.lock to ensure consistent cc version across all crates
- Fixes CI build failure caused by conflicting cc version requirements from cmake and blake3
2025-10-23 09:51:44 -04:00
spencrmartin 5490929937 Remove ChatInput_original.tsx backup file 2025-10-23 09:51:44 -04:00
spencrmartin 203ddaa922 Clean up: Remove PR description and backup files
- Removed pr_description.md
- Removed all component backup files (.backup, .backup2, etc.)
- Branch now contains only clean production code
2025-10-23 09:51:44 -04:00
spencrmartin 3674e2bd0c Clean up: Remove debug Python scripts and console.log statements
- Removed all temporary Python debugging scripts from root directory
- Cleaned up debug console.log statements from ChatInput.tsx and RichChatInput.tsx
- Kept only the core implementation files for the rich text input feature
2025-10-23 09:51:44 -04:00
spencrmartin f9cbf70f70 feat: Rich text input with action and mention pills
- Implement RichChatInput component with visual pill rendering
- Add ActionPill component with blue circle icons for actions
- Add MentionPill component with blue diamond icons for files
- Support for /action and @filename pill creation
- Inline pill display in both input and message history
- Proper text selection, highlighting, and cursor positioning
- Backspace removal of entire pills
- Theme-aware styling for light/dark modes
- Consistent white pill backgrounds with blue accent icons
- Fixed line-breaking issues for natural text flow

Components added:
- RichChatInput.tsx: Main rich text input with pill rendering
- ActionPill.tsx: Blue circle pills for actions
- MentionPill.tsx: Blue diamond pills for file mentions
- MessageContent.tsx: Enhanced message display with pills

Features:
- Visual pills replace [Action] and @filename text
- Click and drag text selection works normally
- Double/triple click for word/all selection
- Pills flow inline with text content
- Proper cursor positioning and blinking
- Backspace removes entire pills as units
2025-10-23 09:51:44 -04:00
spencrmartin 1d85350826 refine: Clean up action button design and fix padding issues
- Remove small circle indicator from Action icon for cleaner plus symbol
- Fix button padding conflicts by using !px-0 to override default padding:
  - Action button: Remove left/right padding for tighter spacing
  - Attach button: Remove left/right padding for tighter spacing
- Ensure buttons render without horizontal padding as intended

UI improvements:
- Cleaner, more minimal plus icon design
- Consistent compact button spacing
- Better visual alignment in bottom bar
2025-10-23 09:51:42 -04:00
spencrmartin b51db01083 feat: Standardize bottom bar component styling and add responsive design
- Add consistent text labels to all bottom bar components:
  - Action button: now shows 'Actions' text
  - Attach button: now shows 'Attach' text
  - Goosehints button: now shows 'Hints' text
  - All components now follow icon + text pattern

- Standardize spacing across all bottom bar components:
  - Display components (Directory, Cost, Model, Mode): px-1 padding
  - Action buttons (Actions, Attach, Hints): px-0 padding
  - Consistent visual hierarchy based on component behavior

- Add responsive design at 1050px breakpoint:
  - Under 1050px: Show icons only for compact mobile/tablet view
  - 1050px and above: Show icons + text for desktop view
  - Smooth transitions with proper icon spacing adjustments

- Improve visual consistency:
  - Uniform hover states and transitions
  - Consistent icon sizing (w-4 h-4) and spacing (mr-1)
  - Professional appearance across all screen sizes

Components updated:
- ChatInput.tsx - Action, Attach, and Hints buttons
- DirSwitcher.tsx - Directory display
- CostTracker.tsx - Cost display
- ModelsBottomBar.tsx - Model selector
- BottomMenuModeSelection.tsx - Mode selector
2025-10-23 09:49:05 -04:00
spencrmartin ad894851c6 feat: Add action button with / trigger functionality
- Add Action icon component with plus symbol and action indicator
- Create ActionPopover component with 6 quick actions:
  - Quick Task, Generate Code, Create Document
  - Search Files, Run Command, Settings
- Integrate action button in ChatInput after DirSwitcher with separator
- Add dual trigger system:
  - @ symbol: opens file mention popover (existing)
  - / symbol: opens action popover (new)
- Action selection replaces / with [Action: actionId] text
- Proper TypeScript types and error handling
- Maintains existing @ mention functionality

Components added:
- ActionPopover.tsx - Main popover component
- Action.tsx - Custom action icon
- Updated ChatInput.tsx with action functionality
- Updated icons/index.tsx exports
2025-10-23 09:48:37 -04:00