Developement#21
Merged
Merged
Conversation
Move MVP docs to docs/mvp/, add docs/features/tags-rework/ with spec and roadmap for Phase 10. Update CLAUDE.md, PROGRESS.md and README accordingly.
Add 3-level tag scope system (Global/Community/Pending) with new enums (TagScope, TagStatus, TagSuggestionStatus), enriched Tag model, and 3 new models (TagSuggestion, UserCommunityTagPreference, ModeratorNotificationPreference). Existing tags migrated to scope=GLOBAL, status=APPROVED. Adapt tag upsert/lookup to findFirst pattern for nullable compound unique compatibility.
Add tagService with resolveTagsForRecipe, getAutocompleteTags, and resolveTagsForFork. Unknown tags in community context become PENDING, global tags are reused directly, and forks resolve tags per target community. Autocomplete filters by scope and user preferences. 12 new integration tests (402 total).
Add community tag endpoints (GET/POST/PATCH/DELETE + approve/reject) for moderators. Pending tags are hard-deleted on reject with cascade to RecipeTag. Admin tags listing now supports scope filter (GLOBAL/ COMMUNITY) and returns scope/status/community info. Migration adds TAG_CREATED/UPDATED/DELETED/APPROVED/REJECTED to ActivityType enum. 29 new tests (431 total).
Add TagSuggestion endpoints: members can suggest tags on community recipes they don't own. Owner accepts/rejects; unknown tags go through moderator validation (PENDING_MODERATOR). Includes cascade from moderator approve/reject to related suggestions, orphan recipe auto-reject, and 29 integration tests.
Add 5 preference endpoints (tag visibility, notification settings), WebSocket events for tag lifecycle (pending/approved/rejected), and moderator notification filtering by preferences. 25 new tests, 485 total.
…e 10.6) Add TagBadge component for visual distinction between approved and pending tags, wire scope-aware autocomplete through communityId prop, and show pending hints when creating unknown tags in community context.
…0.7) Add CommunityTagsList panel for moderators (CRUD, approve/reject pending tags), scope filter on AdminTagsPage, tag notification toasts, and 15 new tests.
…e 10.8) Connect frontend to tag suggestion backend endpoints: suggest tag button for non-owners, owner accept/reject list, and 4 new WebSocket notification types. Includes 15 new tests (316 total frontend).
…10.9) Add TagPreferencesSection and NotificationPreferencesSection components to the profile page, with optimistic toggle updates, moderator-only visibility for notifications, and 10 new tests.
Tags rework
Spec complete covering unit system, hybrid ingredient governance (PENDING/APPROVED), proposal ingredients, admin moderation workflows, and smart unit pre-selection. Roadmap split into 9 phases (11.1-11.9).
…1.2) Phase 11.1 - Schema & Migration: - Add Unit model, UnitCategory/IngredientStatus enums, ProposalIngredient model - Enrich Ingredient (status, defaultUnitId, createdById, timestamps) - Change RecipeIngredient.quantity from String to Float, add unitId FK - Add AdminActionType values for ingredients/units moderation - Seed 17 standard units (5 categories) - Update all backend/frontend code for quantity type change (string -> number) Phase 11.2 - Backend Units: - Admin CRUD: GET/POST/PATCH/DELETE /api/admin/units with audit logging - User endpoint: GET /api/units (grouped by category) - Delete protection: blocked if unit is used in recipes/proposals/defaults - 25 new integration tests (510 backend total, 326 frontend)
…gested-unit (Phase 11.3) Refactor upsertIngredients for PENDING creation with createdById and unitId support. Add admin approve/reject endpoints, enrich admin getAll with status filter and createdBy/defaultUnit fields, handle ProposalIngredient in merge. Add user suggested-unit endpoint with smart fallback (defaultUnit -> popular -> null).
…cations (Phase 11.4-11.5) Phase 11.4 - Backend Proposals + Ingredients: - upsertProposalIngredients: stores proposed ingredients (creates PENDING if new) - createProposal: accepts proposedIngredients, stores in ProposalIngredient table - acceptProposal: replaces RecipeIngredients from ProposalIngredients on all linked recipes - rejectProposal: copies ProposalIngredients to variant RecipeIngredients - PROPOSAL_INGREDIENTS_SELECT + PROPOSAL_RESPONSE_SELECT constants Phase 11.5 - Backend Notifications: - INGREDIENT_APPROVED/INGREDIENT_MODIFIED/INGREDIENT_REJECTED/INGREDIENT_MERGED WebSocket events - Emitted only when ingredient has a createdById (created by a user) - Fix: disable adminRateLimiter in test mode (was causing 429 after 30 req/min in tests) Tests: 524 -> 544 (+20)
…ications (Phase 11.6) - New UnitSelector component: dropdown grouped by category (Weight/Volume/Spoon/Count/Qualitative) - Refactored IngredientList: numeric quantity, UnitSelector per row, PENDING badge in autocomplete - Intelligent unit pre-selection via getSuggestedUnit API call on ingredient selection - New TypeScript types: Unit, UnitCategory, IngredientStatus, UnitsByCategory, ProposalIngredient - New API functions: getUnits(), getSuggestedUnit(), updated RecipeInput with unitId - Updated RecipeFormPage: simplified ingredient mapping with numeric quantity + unitId - Ingredient notification toasts: APPROVED, MODIFIED, MERGED, REJECTED with dynamic metadata - MSW handlers for GET /api/units and GET /api/ingredients/:id/suggested-unit - Tests: 326 -> 337 frontend (+11 new: 7 UnitSelector + 4 IngredientList)
…reject (Phase 11.7) Add AdminUnitsPage with full CRUD, category filters and sorting. Enrich AdminIngredientsPage with status filter, approve/rename/reject modals, default unit display and createdBy info. Update MSW handlers and tests.
…hase 11.8) Add IngredientList to ProposeModificationModal pre-filled with current recipe ingredients. Show ingredients diff (added/removed/modified) in ProposalsList expanded view. Display unit abbreviations on recipe detail. Add proposal MSW handlers and 14 new tests.
…ase 11.9) Update FILE_MAP, TESTS, PROGRESS with all Phase 11 changes. Add manual test scenarios in MANUAL_TESTS.md. Mark ingredients rework as done in brainstorming doc. Phase 11 Ingredients Rework fully complete (914 tests).
Ingredients rework
…ratorNotificationPreference (Phase 12.1) Add Notification model with persistence support (userId, type, category, title, message, actionUrl, groupKey, readAt) and NotificationPreference model (per-category, global + per-community). Migrate existing ModeratorNotificationPreference data to new model (category=TAG). Fix seed to use Float quantities with unitIds.
…hase 12.2) Complete notificationService with type->category mapping (24 types), message templates with variable resolution, preference checking (hierarchy: community > global > default), createNotification/createBroadcastNotifications with batch insert, non-disableable types (USER_KICKED, INVITE_SENT). Fix test cleanup in globalSetup. 30 new tests.
… (Phase 12.3) Add GET /api/notifications (paginated, category filter, unread filter, 60min grouping), GET /api/notifications/unread-count (total + by category), PATCH mark-as-read (single, batch, all). Error codes NOTIF_001-005. Update context docs and roadmap. 27 integration tests.
…tion:count events (Phase 12.5)
NavBar hidden on mobile when logged in, BottomTabBar shown instead. Toasts positioned bottom-center on mobile (above tab bar).
Main content gets padding-bottom on mobile for BottomTabBar clearance. Remove redundant hamburger menu bar (navigation via BottomTabBar now). Drawer mechanism preserved for programmatic opening from pages.
Add min-h-[44px] to nav items and community links for touch targets. Add theme toggle (sun/moon) in sidebar footer for both compact and expanded modes. Accessible from mobile drawer and desktop sidebar.
On mobile, clicking the bell icon navigates directly to the notifications page instead of opening the dropdown panel.
Add mobile-only section (md:hidden) with links to invitations, theme toggle, and logout button. These actions are normally in the NavBar which is hidden on mobile.
Test mobile-only Invitations link, theme toggle, and Logout button.
All Phase 2 tasks checked: App.tsx conditional nav, MainLayout padding, Sidebar touch targets + theme toggle, NotificationDropdown mobile redirect, ProfilePage mobile hub. 505 tests total.
Replace 6 action buttons with a single "..." button opening an ActionSheet on mobile. Hero image h-48 on mobile (was h-64). Desktop layout unchanged.
On mobile: SidePanel replaced by BottomSheet, tooltip-only icon buttons replaced with labeled buttons (Members, Activity, etc.) with 44px touch targets. Desktop layout unchanged.
On mobile: search always visible, tag/ingredient filters behind a collapsible "Filtres" button with badge showing active filter count. Remove min-w-[200px] on mobile. Desktop layout unchanged.
MembersList: render members as cards instead of table on mobile. RecipesPageLoggedInView & CommunityRecipesList: hide card/list toggle on mobile and force card view.
RecipeFormPage: stack title + import button vertically on small screens. NotificationsPage: vertical filter layout with toggle below on mobile.
Empty states now use min-h-[40vh] on mobile to center CTAs in the thumb zone. Action buttons use btn-lg (48px) on mobile, btn-md on desktop. Affects DataContainer, DashboardPage, RecipesPageLoggedInView, and CommunityRecipesList.
- RecipeDetailPage: ActionSheet vs inline buttons, ellipsis trigger - MembersList: cards vs table based on viewport - RecipeFilters: collapsible filters, expand/collapse, badge counter
On mobile: ingredient name on its own line, quantity + unit + delete button on the line below. Remove/add buttons have min-h 44px for touch accessibility. Desktop layout unchanged.
On mobile: move/delete buttons below textarea instead of side column. All buttons have 44px min touch targets. Added TouchSensor from @dnd-kit with 200ms delay for touch drag-and-drop support.
Dropdown suggestion items have min-h 44px for touch accessibility. Chips have increased padding (px-3 py-2) with padded remove button for easier tap-to-remove interaction.
Action buttons (edit, delete, share) have min-h/min-w 44px and gap-3 spacing for comfortable touch interaction.
Modal takes full screen on mobile devices instead of centered dialog. Back button closes the modal via history.pushState/popstate handler.
ImageUpload and ImagePicker show "Appuyez pour ajouter une image" on mobile instead of "Cliquez ou glissez une image ici".
- IngredientList: stacked layout, 44px touch targets on mobile - StepEditor: buttons below textarea, 44px targets, btn-xs on desktop - ProposeModificationModal: fullscreen on mobile, history.pushState
Systematic audit of interactive elements across user-facing components. Fixed: MembersList mobile buttons (36px->44px), InviteCard accept/reject, SentInvitesList cancel, CommunityTagsList filter/action buttons, NotificationsPage mark-as-read, circular close buttons on BottomSheet, LoginModal, ShareModal, ImageUpload, ImagePicker, and NotificationPreferencesSection toggle. Desktop sizes preserved via md:min-h-0 responsive overrides.
- FILE_MAP: add all new mobile test files (Phase 2-4) - PROGRESS: mark mobile rework as complete (Phases 1-5) - Brainstorming: mark "Version mobile" as DONE
Mobile front update
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.