- 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>
* 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>
* Add component to show invite link (WIP)
* Show invite link with copy functionality and QR-Code, add tests
* Query secrets
* Update directus collections
* Add config and invite api
* Let vite resolve paths using tsconfig
* Redeem invite link when logged in or after logging in
* Redirect to inviting profile when redeeming
* Fix some logic with login and redeeming
* Use correct redeem flow
* Hide missing form error
* Add basic relations view
* Pass profile to redeem Api and adapt to changed redeem flow
* Remove unnecessary aliases in vite config
* Remove dead import
* gitignore mac specific file
* Remove lazy loading
* Fix linting
* add InviteApi import
* Change case of file name (tbd)
* Don't toast error if user profile was not loaded yet
* Fix casing
* avoid app crash when profile of a new item is opened
---------
Co-authored-by: Anton Tranelis <mail@antontranelis.de>
* add close button to custom info modal
* auto close update position toat
* Revert "add close button to custom info modal"
This reverts commit cf5b9a407effe0772ed622ce2369cf16e0b82175.
* fix: reset position for new items without text