Commit Graph

100 Commits

Author SHA1 Message Date
021bbf1335 Fix toast auto-dismiss issue by using ref for onClose callback
- Toast component now uses useRef to store onClose callback
- Prevents timer from resetting on parent re-renders
- Fixes issue where toasts wouldn't dismiss after adding items
2025-12-07 01:06:03 +00:00
737049dc69 Bump service worker to v4 - force PWA update for zoom fix 2025-12-03 21:01:49 +00:00
2f2cc309a3 Fix iOS Safari auto-zoom on input fields
- Changed all input/textarea/select font-size from text-sm to text-base (16px minimum)
- Added blur handler to reset viewport zoom on InlineItemCreate
- Prevents iOS Safari from auto-zooming when focusing on form fields
- Ensures zoom resets properly when closing forms
2025-12-03 21:01:17 +00:00
1e7aa6ae5d Bump service worker cache version to force update 2025-12-03 20:56:31 +00:00
509de75e1a Fix Safari/iPhone performance issues - remove 300ms click delay
- Added touch-action: manipulation CSS to eliminate 300ms tap delay
- Optimized service worker to skip cross-origin requests
- Updated viewport settings to prevent iOS delays
- Added format-detection meta tag
- Enabled Next.js performance optimizations
- Created comprehensive performance fix documentation
2025-12-03 20:54:55 +00:00
bfe49e7211 Mark checkpoint: IT'S WORKING HERE 2025-12-03 20:46:50 +00:00
2640559de8 Add logout button to home page header 2025-12-03 20:39:13 +00:00
4422498bc9 Move permission badge and share button above add task bar 2025-12-03 20:35:16 +00:00
376b8cead9 Clean up unused ItemWithList interface 2025-12-03 20:33:41 +00:00
66f8fcade7 Remove search and filter functionality from list detail view to fix hydration errors 2025-12-03 20:31:39 +00:00
540f5dfc89 Remove polling from home page to prevent interference with UI 2025-12-03 20:20:24 +00:00
eae3723e66 Increase polling interval to 5 seconds to prevent modal closing 2025-12-03 20:08:44 +00:00
5545caa1c3 Fix modal closing immediately by preventing event propagation 2025-12-03 20:00:13 +00:00
6c5f2fbc1e Redesign ItemCard with smaller height and right-aligned priority
- Reduced padding from p-4/p-5 to p-3/p-3.5 for more compact cards
- Moved priority badge to the right side next to title
- Changed items-start to items-center for better alignment
- Description now limited to 1 line instead of 2
- Metadata section only shows if there's a due date or tags
- Cleaner, more compact layout
2025-12-03 00:49:10 +00:00
bdff38c9a5 Remove SyncIndicator to fix hydration errors
- Removed SyncIndicator component causing hydration issues
- Background polling still works for real-time updates
- Updates appear within 1 second without visual indicator
2025-12-03 00:45:51 +00:00
79026733cb Add suppressHydrationWarning to SyncIndicator
- Suppress hydration warnings for timestamp display
- Prevents React hydration errors from time formatting differences
2025-12-03 00:43:04 +00:00
865c2a85de Fix SyncIndicator hydration error
- Add mounted state to prevent SSR/client mismatch
- Component only renders after client-side mount
- Fixes hydration error with timestamp display
2025-12-03 00:39:53 +00:00
72f98c783a Fix toast auto-dismiss and add debugging
- Added console logging to debug toast lifecycle
- Improved toast ID generation with timestamp
- Limited toasts to max 3 at a time
- Toasts should now auto-dismiss after 3 seconds
2025-12-03 00:37:43 +00:00
fc5ad9f7af Improve real-time sync with 1-second polling and visual indicator
- Reduced polling interval from 2s to 1s for near-instant updates
- Added SyncIndicator component to show sync status
- Added console logging to debug sync behavior
- Updates across devices now appear within 1 second
- Visual feedback shows when data is being refreshed
2025-12-03 00:29:24 +00:00
bd61aaa5b2 Use startTransition for delete refresh and fix filter updates
- DeleteItemButton now uses startTransition for router.refresh()
- ListDetailView re-applies filters when initialItems changes
- This ensures deleted items disappear after refresh completes
- Transition provides better React 18 concurrent rendering support
2025-12-02 14:47:43 +00:00
35e20fb16d Fix ListDetailView not updating when items change
- Add useEffect to sync filteredItems state with initialItems prop
- Now when router.refresh() updates initialItems, the UI updates
- Deleted items now disappear immediately after refresh
2025-12-02 14:44:03 +00:00
cbf6f3c6b6 Fix delete button not refreshing UI after deletion
- Remove router.push() logic that was preventing refresh
- Always call router.refresh() after successful deletion
- Reset state before refresh to clear 'Deleting...' text
- Item now disappears immediately after deletion
2025-12-02 14:41:42 +00:00
e6067e76cd Improve real-time sync speed and caching
- Reduced polling interval from 3s to 2s for faster updates
- Added revalidate = 0 to prevent Next.js caching
- Updates from other browsers now appear within 2 seconds
- Both home page and list detail pages sync faster
2025-12-02 14:38:01 +00:00
78bfcb7ac3 Add optimistic updates for immediate UI feedback
- ToggleItemButton now uses useOptimistic for instant toggle feedback
- InlineItemCreate clears form immediately before server action
- Both components call router.refresh() after mutations
- UI updates appear instantly, no waiting for server response
2025-12-02 14:33:43 +00:00
0fc8c719b9 Add real-time updates and fix delete button state
- Simplified useRealtimeSync to use router.refresh() polling
- Created RealtimeUpdater component for easy integration
- Added real-time updates to home page (3s polling)
- Fixed DeleteItemButton to properly reset state on error
- Updates now refresh every 3 seconds and on window focus
- Changes from other users/browsers will appear quickly
2025-12-02 14:29:28 +00:00
78901c8e2e Fix hydration error in OfflineIndicator component
- Add mounted state to prevent SSR/client mismatch
- Component now only renders after client-side mount
- Resolves React hydration error
2025-12-02 14:22:34 +00:00
ade7ad19d6 Fix getCurrentSession for NextAuth v4 compatibility 2025-12-02 14:12:22 +00:00
d92f13fdc4 Remove build step, use dev server 2025-12-02 14:06:04 +00:00
909f51ff6b Use dev server for NextAuth v4 compatibility 2025-12-02 14:05:46 +00:00
d7297248c1 Fix all NextAuth v4 imports across codebase 2025-12-02 14:03:13 +00:00
2f7bc4fe8e Fix NextAuth v4 imports and exports 2025-12-02 14:01:05 +00:00
40b168b6d8 Update package-lock.json for NextAuth v4 2025-12-02 13:58:40 +00:00
fe783301e7 Downgrade to NextAuth v4 to fix constructor error 2025-12-02 13:56:57 +00:00
60ebf13a9c Simplify Docker setup to fix constructor error
- Remove standalone output mode from Next.js config
- Use single-stage Docker build with npm start
- Eliminate complex multi-stage build that was causing issues
2025-12-02 13:54:26 +00:00
3a3db4195f Fix Docker Prisma constructor error
- Remove --ignore-scripts from npm ci in builder stage
- Simplify Prisma client initialization
- Ensure proper file copying order in Docker
- Remove async connection handling that may cause issues
2025-12-02 13:49:51 +00:00
c0358d79d7 Fix Docker build and Next.js metadata configuration
- Move themeColor and viewport to separate viewport export in layout.tsx
- Improve Docker build process with npm ci and proper dependency handling
- Add Docker-friendly Next.js configuration settings
- Resolve constructor error and metadata warnings
2025-12-02 13:47:40 +00:00
ff16860d8a Revert to production build with proper cookie settings
- Production build is more stable than dev mode
- Cookie settings already fixed for HTTP
- NextAuth v5 beta works better in production mode
2025-12-02 13:31:19 +00:00
855abb98b7 Re-add redirect for unauthenticated users on home page 2025-12-02 13:28:39 +00:00
b9b28ad92c Run as root in dev mode for file write permissions 2025-12-02 13:26:15 +00:00
9f25b30083 Switch to dev server in Docker 2025-12-02 13:22:38 +00:00
adb4f6b119 Set NODE_ENV to development for better NextAuth compatibility
- Avoids production build issues with NextAuth v5 beta
- Enables better error messages for debugging
- Session cookies work correctly in development mode
2025-12-02 13:21:07 +00:00
9bd4dfe0e1 Fix cookie settings for HTTP deployment
- Remove __Secure- prefix for non-HTTPS
- Set secure: false to allow cookies over HTTP
- Enables session persistence in Docker deployment
2025-12-02 13:19:30 +00:00
f3d9ccde56 Remove manual redirect from home page - let middleware handle auth
- Middleware already handles authentication redirects
- Prevents error boundary from catching redirect errors
- Cleaner separation of concerns
2025-12-02 13:17:12 +00:00
ce7021e3fa Use npm install instead of npm ci for deployment flexibility 2025-12-02 13:14:46 +00:00
d677fcb9b5 Fix Docker file copying for standalone build
- Add @prisma client to copied files
- Set proper ownership for nextjs user
- Ensures all required files are available at runtime
2025-12-02 13:11:27 +00:00
b1705fa6da Simplify port mapping: expose 3500 externally, use 3000 internally
- Map host port 3500 to container port 3000
- Keep Next.js on default port 3000 inside container
- Simplifies auth configuration
2025-12-02 13:06:24 +00:00
a084853b6c Add AUTH_URL for NextAuth v5 compatibility
- NextAuth v5 uses AUTH_URL instead of NEXTAUTH_URL
- Keep both for backward compatibility
- Fixes UntrustedHost error
2025-12-02 13:02:10 +00:00
39401a3fa2 Update package-lock.json 2025-12-02 13:00:06 +00:00
899ba97457 Explicitly set trustHost in NextAuth initialization 2025-12-02 12:56:24 +00:00
1c0e0a097e Add AUTH_TRUST_HOST to build environment 2025-12-02 12:52:53 +00:00