refactor: Update ApiClient to support dynamic server URL and improve token handling
refactor: Modify TokenStorage to utilize Capacitor for native platforms
refactor: Adjust Fetcher to use updated ApiClient methods
refactor: Enhance SettingsOverview to include Developer Settings option
- Implemented unarchive button for archived chores in ChoreView.
- Updated chore status handling to disable actions for archived chores.
- Enhanced MyChores component to filter tasks based on project selection, including a default project.
- Improved ProjectModal to streamline project creation and editing with a new footer layout.
- Refactored ProjectView to accurately count tasks for default and user projects.
- Added project selection dropdown in AddTaskModal with default project handling.
- Updated NavBar to handle logout using apiClient.
- Enhanced ProjectSelector to manage projects with a new menu item for project management.
there was issue where userprofile was undefined cause the message being display for same user how make the action. The new useEffect hook updates the EventSource's handler whenever handleSSEMessage changes
Refactor authentication handling and API client integration
- Updated UserProfileAvatar to use 'access_token' instead of 'ca_token' for logout.
- Removed SSEProvider from Contexts and adjusted related imports.
- Introduced useAuth hook for centralized authentication logic, including login, logout, and token management.
- Refactored useSSE to utilize the new useAuth hook for token validation.
- Updated UserQueries to check for token validity using the new method.
- Deleted AuthenticationService as its functionality is now handled by useAuth.
- Created a new ApiClient utility for handling API requests and token management.
- Updated various components and views to use the new ApiClient for API interactions.
- Removed TokenManager and migrated its functionality to the new ApiClient.
- Adjusted LoginView and related components to utilize the new authentication flow.
- Cleaned up unused variables and improved code consistency across components.
Problem:
npm install was failing with the error:
Error: Expected "0.21.5" but got "0.18.20"
This occurred because esbuild's install.js validates that the installed
binary version matches the package.json version, but was finding an
older cached binary.
Root cause:
The .npmrc setting `optional=false` was preventing esbuild from
downloading its platform-specific binary package (@esbuild/darwin-arm64,
etc.). These platform binaries are marked as optionalDependencies in
esbuild's package.json.
Without the correct platform binary, esbuild's postinstall script would
find a stale/cached binary from a previous installation and fail the
version check.
Troubleshooting steps taken:
1. Attempted rm -rf node_modules && npm install - same error
2. Cleared npm cache with npm cache clean --force - same error
3. Checked for global esbuild installations - none found
4. Reviewed npm config and found optional=false in .npmrc
5. Ran npm install --include=optional - succeeded
6. Removed optional=false from .npmrc to permanently fix
The fund=false and audit=false settings are retained as they don't
affect dependency installation, only npm's output behavior.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>