-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add draft climb persistence with IndexedDB #484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
marcodejongh
commented
Dec 30, 2025
- Create draft-climbs-db.ts for IndexedDB persistence
- Add DraftsProvider context for managing draft state
- Modify create-climb-form to auto-save drafts with UUID
- Add DraftsDrawer component for viewing/managing drafts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Claude ReviewIssues Found
|
Claude ReviewIssues Found:
|
Claude Reviewpackages/web/app/components/create-climb/create-climb-form.tsx
packages/web/app/lib/draft-climbs-db.ts
packages/web/app/components/drafts/drafts-context.tsx
packages/web/app/components/board-page/header.tsx
|
- Create draft-climbs-db.ts for IndexedDB persistence - Add DraftsProvider context for managing draft state - Modify create-climb-form to auto-save drafts with UUID - Add DraftsDrawer component for viewing/managing drafts
- Add Drafts button with badge count in header - Create DraftsDrawer component for viewing/managing drafts - Store board configuration names for proper URL generation - Fix navigation to draft climbs with slug-based URLs
- Add BoardRenderer thumbnail to each draft item - Filter drafts by current board configuration - Update badge count to show only relevant drafts - Pass boardDetails to DraftsDrawer for rendering
- Create generic ClimbsList and ClimbsListItem components - Support drag-and-drop reordering - Support swipe actions (left/right) - Support customizable menu items - Update DraftsDrawer to use new ClimbsList component - Add reorderDrafts function to drafts context The new ClimbsList component can be reused for queue list in the future.
- Fix race condition in create-climb-form.tsx by tracking mounted state - Fix memory leak by checking isMountedRef before async callbacks - Fix cancel not deleting draft by adding delete call to handleCancel - Fix stale DB promise by clearing it on error in draft-climbs-db.ts - Fix negative count issue by using Math.max(0, prev - 1) in context
dc15b95 to
f8d3547
Compare
Claude Reviewpackages/web/app/components/create-climb/create-climb-form.tsx
packages/web/app/components/climbs-list/climbs-list-item.tsx
packages/web/app/components/drafts/drafts-context.tsx
packages/web/app/lib/draft-climbs-db.ts
|
- Fix missing setIsLoadingDraft(false) on new draft creation - Fix auto-save loops by using ref for draft UUID instead of callback - Remove unused DeleteOutlined import from climbs-list-item.tsx - Add SSR guard for IndexedDB module-level variable - Add reorderDraftClimbs function and persist draft order to IndexedDB
Claude Reviewpackages/web/app/components/create-climb/create-climb-form.tsx
packages/web/app/components/drafts/drafts-context.tsx
packages/web/app/lib/draft-climbs-db.ts
packages/web/app/components/climbs-list/climbs-list-item.tsx
packages/web/app/components/climbs-list/climbs-list.tsx
|
- Fix draftId URL change handling by tracking lastInitializedDraftId - Replace window.history.replaceState with Next.js router.replace - Add same-item drop check in climbs-list to prevent unnecessary reorders - Optimize swipe gestures with DOM refs instead of state for smoother UX - Memoize inline styles in climbs-list-item - Remove unused swipeOffset state variable - Prefix unused boardDetails param with underscore
Claude ReviewIssues Found
|