Commit Graph

2334 Commits

Author SHA1 Message Date
spencrmartin e7ff2bcbb4 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-09-25 13:24:01 -04:00
spencrmartin 6f2d81397a 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-09-25 13:22:32 -04:00
spencrmartin d3fac5a072 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-09-25 13:19:44 -04:00
spencrmartin a0a90d6b31 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-09-25 13:16:53 -04:00
spencrmartin c2f7d7aab9 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-09-25 13:15:50 -04:00
spencrmartin 174ae08ee0 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-09-25 13:12:14 -04:00
spencrmartin d0d62f1dd3 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-09-25 13:09:59 -04:00
spencrmartin 5208d22fe7 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-09-25 13:07:42 -04:00
spencrmartin c0c45294f2 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-09-25 13:06:08 -04:00
spencrmartin 0b9e167e0d 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-09-25 11:58:31 -04:00
spencrmartin cd8b860a26 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-09-25 11:55:02 -04:00
spencrmartin d60fbdbb91 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-09-25 11:53:18 -04:00
spencrmartin 50e957486d 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-09-25 11:49:45 -04:00
spencrmartin dff3fbb0b5 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-09-25 11:47:59 -04:00
spencrmartin 54b329311e 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-09-25 11:46:34 -04:00
spencrmartin 666e58b0ff 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-09-25 11:44:44 -04:00
spencrmartin aec33e86da 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-09-25 11:43:51 -04:00
spencrmartin 5cb0a26609 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-09-25 11:42:29 -04:00
spencrmartin c988f615d8 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-09-25 11:38:24 -04:00
spencrmartin 06bc4a50ba 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-09-25 11:34:10 -04:00
spencrmartin 5d4d3a1607 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-09-25 11:32:37 -04:00
spencrmartin 30607faed6 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-09-25 10:45:04 -04:00
spencrmartin 80cf2f10ee 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-09-25 10:41:57 -04:00
spencrmartin 538881d6af 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-09-25 10:26:47 -04:00
spencrmartin c3f70602b2 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-09-25 09:58:06 -04:00
spencrmartin 0d8efaed67 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-09-25 09:49:29 -04:00
spencrmartin ee3c6ba955 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-09-25 09:47:02 -04:00
spencrmartin 98bad9b29c 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-09-25 09:45:35 -04:00
spencrmartin 92d7f7a525 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-09-25 09:40:29 -04:00
spencrmartin 5a2507d954 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-09-25 09:37:47 -04:00
spencrmartin 21d76fd18b 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-09-25 09:36:52 -04:00
spencrmartin 7b0e2dbc7a 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-09-25 09:33:47 -04:00
spencrmartin 6e5973c8ed 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-09-25 09:30:10 -04:00
spencrmartin 1f1680331f 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-09-25 09:27:50 -04:00
spencrmartin df578971a2 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-09-25 09:26:11 -04:00
spencrmartin ea78a4188f 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-09-25 09:25:12 -04:00
spencrmartin 1342e2d22e 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-09-25 09:23:57 -04:00
spencrmartin 5d9a4a663c 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-09-25 09:22:59 -04:00
spencrmartin 6a5f5fadaa 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-09-25 09:21:05 -04:00
spencrmartin a12d74ed3c 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-09-25 09:17:11 -04:00
spencrmartin 36e1cc71ed Remove ChatInput_original.tsx backup file 2025-09-24 21:19:08 -04:00
spencrmartin f0f907f378 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-09-24 21:17:44 -04:00
spencrmartin 3fd221f844 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-09-24 21:15:02 -04:00
spencrmartin 57c60be5a8 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-09-24 21:10:22 -04:00
spencrmartin 150bc6aa2c 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-09-24 16:24:00 -04:00
spencrmartin 8bae7fdbe4 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-09-24 16:17:48 -04:00
spencrmartin e28db8b139 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-09-24 16:01:57 -04:00
Jack Amadeo ad045bc94c shave and code split (#4630) 2025-09-24 13:42:19 -04:00
dianed-square 5acaca4301 docs: acp support (#4793) 2025-09-24 10:23:52 -07:00
Ebony Louis 035af16489 Add Take Action for Hacktoberfest (#4791) 2025-09-24 11:59:42 -04:00