- Fix import order issues
- Fix TypeScript type annotations
- Use .at() for array access to satisfy lint rules
- Cast props to correct types in command handlers
- Fix template literal type issues
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add suggestion system for #hashtags and @item-mentions in RichTextEditor
- New files:
- HashtagSuggestion.tsx: autocomplete for existing tags, create new tags
- ItemMentionSuggestion.tsx: autocomplete for items with @syntax
- ItemMention.tsx: TipTap node for item links with markdown serialization
- SuggestionList.tsx: shared popup UI component
- useItemColor.tsx: hook for consistent item color calculation
- Features:
- Type # to see tag suggestions, space key confirms selection
- Type @ to see item suggestions with correct colors
- New tags can be created inline
- Clickable mentions in view mode (hashtags filter map, @mentions navigate)
- Bold styling for all mentions and suggestions
- Disabled clicks in edit mode
- Refactored components to use useItemColor hook for consistent colors
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ReactNodeViewRenderer for video preview in RichTextEditor
- Add ProseMirror plugin for paste detection of video URLs
- Add markdown serialization to output autolink format <url>
- Integrate VideoEmbed extension in RichTextEditor
- Preprocess video links when loading content
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Support markdown autolinks <https://youtube.com/...> in addition to
standard markdown links [text](url) for YouTube and Rumble videos.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Export TextViewStatic from ItemPopupComponents and Item modules
- Update MapContainer to use TextViewStatic instead of TextView for popups
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add TextViewStatic component for Leaflet popups and card previews:
- Uses simple HTML rendering instead of TipTap EditorContent
- No contenteditable attribute = no Leaflet click blocking issues
- Better performance for rendering many items
Changes:
- Add TextViewStatic.tsx for popups/cards
- Add simpleMarkdownToHtml.tsx utility for lightweight markdown conversion
- Update ItemViewPopup to use TextViewStatic
- Update ItemCard to use TextViewStatic
TextView (full TipTap) remains for profile pages with all features.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace react-markdown with TipTap read-only editor for TextView component.
Changes:
- Create TipTap extensions folder with custom Hashtag and VideoEmbed nodes
- Hashtag extension: clickable hashtags with tag colors and filter integration
- VideoEmbed extension: YouTube and Rumble iframe embeds
- Add preprocessMarkdown utility for URL, email, video link, and hashtag conversion
- Migrate TextView to use TipTap with StarterKit, Markdown, Link extensions
- Remove unused itemId prop from TextView and all callers
Known issue: Popup buttons may not work correctly when TextView has content
due to Leaflet's handling of contenteditable elements. To be fixed in follow-up.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add user_created field to all item update operations to maintain proper user association
- Update useMyProfile hook to use direct computation instead of useMemo to avoid React hook queue issues
- Refactor UserControl to use useMyProfile hook for consistency
- Fix user_created handling in LocateControl, ItemFormPopup, useSelectPosition, and itemFunctions
- Add user parameter to linkItem, unlinkItem, and related functions with proper TypeScript signatures
- Update all function calls and tests to include user parameter
- Ensure proper null safety with user ?? undefined pattern
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* improved locate control
* fix(lib): clean up setTimeout and fix Chrome modal layout issue
- Add proper cleanup for setTimeout in LocateControl to prevent memory leaks
- Replace modal-open class with direct overflow style to fix Chrome scrollbar issue
- Add timeout reference tracking for better component unmount handling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix linting
* set distance rule
* optimized locatecontrol
* working for new users without profile now
* test(lib): add comprehensive tests for LocateControl component
- Add 9 comprehensive unit tests covering all LocateControl functionality
- Test modal display logic for new and existing users
- Test profile creation and position updates
- Test navigation after successful operations
- Test error handling with proper toast notifications
- Mock all external dependencies (React Router, Leaflet, APIs)
- Verify dialog behavior prevents re-appearance after decline
- Include snapshot tests for UI consistency
- All tests pass with proper TypeScript typing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* removed unused code, add 1s delay
* updated tests
* fixed tests
* fix test for LocateControl
* fix linting
---------
Co-authored-by: Claude <noreply@anthropic.com>
* improved locate control
* fix(lib): clean up setTimeout and fix Chrome modal layout issue
- Add proper cleanup for setTimeout in LocateControl to prevent memory leaks
- Replace modal-open class with direct overflow style to fix Chrome scrollbar issue
- Add timeout reference tracking for better component unmount handling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix linting
* set distance rule
* optimized locatecontrol
* working for new users without profile now
* test(lib): add comprehensive tests for LocateControl component
- Add 9 comprehensive unit tests covering all LocateControl functionality
- Test modal display logic for new and existing users
- Test profile creation and position updates
- Test navigation after successful operations
- Test error handling with proper toast notifications
- Mock all external dependencies (React Router, Leaflet, APIs)
- Verify dialog behavior prevents re-appearance after decline
- Include snapshot tests for UI consistency
- All tests pass with proper TypeScript typing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* removed unused code, add 1s delay
* updated tests
* fixed tests
---------
Co-authored-by: Claude <noreply@anthropic.com>
* use server response for local state updates
* fix formatting
* refactor: comprehensive server-response-first pattern implementation
## Major Changes
### LayerProps ID Required
- Made `LayerProps.id` required (was optional)
- All layers now guaranteed to have server-provided UUID
- Enables reliable layer ID mapping from server responses
### useSelectPosition Hook Refactored
- Added reusable `handleApiOperation` helper function
- Refactored `itemUpdatePosition`, `itemUpdateParent`, `linkItem`
- All functions now use server response + layer ID mapping
- Consistent error handling and toast management
### itemFunctions.ts Complete Refactor
- **submitNewItem**: Server response with layer mapping
- **linkItem**: Server response preserves layer object
- **unlinkItem**: Same pattern as linkItem
- **handleDelete**: Simplified error handling
- **onUpdateItem**: Complex function refactored for both update/create branches
### Benefits
- ✅ Eliminates race conditions from manual state construction
- ✅ Server response as single source of truth for all updates
- ✅ Consistent error handling across all API operations
- ✅ Items no longer disappear from map after updates
- ✅ Type-safe layer ID mapping
### Testing
- Updated ItemFunctions.spec.tsx with new toast patterns
- Added required layer IDs to test objects
- All 19 tests passing (3 skipped)
- ESLint clean
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix linting
* fix: resolve TypeScript undefined data errors
- Add non-null assertions for result.data in conditional blocks
- TypeScript now properly recognizes data is defined after success check
- All linting and TypeScript errors resolved
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fixed examples
* remove unneccessary uuid generation
---------
Co-authored-by: Claude <noreply@anthropic.com>