* add marker icons, images & seeds
* added sample items to the development environment
Co-authored-by: Anton Tranelis
<31516529+antontranelis@users.noreply.github.com>
* added ocean nomads layers
* added and restructured files
* added menu texts and removed place layer from sample map
---------
Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
Co-authored-by: Anton Tranelis <mail@antontranelis.de>
* sync collections & other settings with production
missing changes
* deactivated specific flows
---------
Co-authored-by: Anton Tranelis <mail@antontranelis.de>
- 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>
* fix(lib): resolve TypeScript unsafe assignment errors in UserControl and HeaderView
- Add ESLint disable for @typescript-eslint/no-unsafe-assignment in UserControl to align with other components
- Refactor avatar logic in UserControl to use explicit typing and conditional assignment
- Add alt attribute to avatar image in UserControl for better accessibility
- Fix image priority order in HeaderView to prioritize internal images over external ones
- Support both internal and external images with proper fallback in both components
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: remove unused ESLint disable and fix CI lint check
The explicit typing approach resolved the TypeScript unsafe assignment
errors without needing the ESLint disable rule.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* removed unused linting exception
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
* feat: add development configuration files
Add .gitignore and CLAUDE.md to standardize development environment:
- .gitignore: Exclude IDE files, build artifacts, and temporary files
- CLAUDE.md: Project documentation and development commands for AI tools
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* moved scripts to ./claude
---------
Co-authored-by: Claude <noreply@anthropic.com>
* use api config everywhere, default to localhost, ignore .env file, provide .env.dist
* fix lint
* make mapUrl configurable
---------
Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
* feat: add support for external images in items
Add image_external field to Item type and update HeaderView to prefer external images over internal ones when available.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: prettier formatting for external image feature
---------
Co-authored-by: Claude <noreply@anthropic.com>