Open
Conversation
- Add centralized type definitions re-exporting from models - Add utility functions: generateId, date formatting, ensureSetCount - Add Zod validation schemas for plans, logs, exercises - Add openExerciseSearch helper for Google search
- authStore: Firebase auth state with session tracking - plansStore: Plans CRUD with draft management and dirty tracking - sessionStore: Session logging with exercise manipulation - logsStore: Logs feed with date/plan filtering - uiStore: View tabs and drag-drop state
- fetchPlans, createPlan, updatePlan, deletePlan - fetchLogs with date/plan filtering - fetchRunningSession for session recovery - createLogEntry, updateLogEntry, deleteLogEntry - sanitizeLogForWrite for data consistency
- useGymAuth: Firebase auth with login/logout - useGymPlans: Plans CRUD with save/delete operations - useGymSession: Session logging with running session recovery - useGymLogs: Logs fetching with filter management
- icons: SearchIcon, TrashIcon, DragIcon, PlusIcon, MinusIcon, EditIcon - AuthForm: Email/password login form - TabNavigation: Tab switching between views
- PlansView: Read-only plan display with day/exercise details - PlanEditor: Full plan editing with drag-drop exercise reordering - LogsFeed: Logs list with date range and plan filters
- Single responsive layout for mobile and desktop - Exercise list with muscle group color indicators - Completion fraction display (e.g., 2/3) - SetEditor with +/- buttons and unit selection - Add/Edit/Remove exercise during session - Color-coded exercise status (green/orange/blue)
- Replace 30+ useState hooks with Zustand stores - Use custom hooks for auth, plans, session, logs - Fix running session loading race condition - Add isLoadingRunning guards to prevent session overwrite
- zod: Form validation schemas - zustand: State management replacing useState hooks
- Support NEXT_PUBLIC_FIREBASE_* env variables - Fallback to hardcoded values for backwards compatibility
- Migrate Firestore structure to user-scoped subcollections:
- gymPlans/{userId}/plans/{planId}
- gymLogs/{userId}/logs/{logId}
- Add export buttons to PlansView and LogsFeed for data backup
- Add DownloadIcon component and exportToJsonFile utility
- Update gymService.ts with subcollection helper functions
- Update hooks to pass userId to service functions
- Remove unused code:
- planToFirestore import from useGymPlans
- Icon exports from components barrel (kept internal)
- Entire schemas/gymSchemas.ts (never used)
- Make ExerciseStatusLabel/Color types internal
- Replace plan dropdown with compact clickable list showing name, days count, created/updated dates - Replace day dropdown with compact clickable list showing day name and exercise count - Add 'Create new plan' button that auto-generates default title (New Plan X) - Add 'Add Day' button that auto-generates default title (Day X) - Selected plan/day highlighted with blue styling - No plan/day selected by default in edit view - Clear day selection when switching plans - Remove unused newPlanTitle input for plan creation - Remove unused newDayTitle input for day creation
- Replace plan dropdown with compact clickable list - Add day selection with compact clickable list - Show exercises only when a day is selected - Split into three cards: Plans, Days, Exercises - Add bordered list containers for visual clarity - No plan/day auto-selected by default - Clear day selection when switching plans - Move Export Plans button to card header
…and CloseIcon, disable start button when running
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.