Skip to content

feat(suggest): add base item selection and 3-look comparison view - #194

Open
AmitayAbudy wants to merge 2 commits into
Anyesh:mainfrom
AmitayAbudy:feat/suggest-base-item-and-options
Open

feat(suggest): add base item selection and 3-look comparison view#194
AmitayAbudy wants to merge 2 commits into
Anyesh:mainfrom
AmitayAbudy:feat/suggest-base-item-and-options

Conversation

@AmitayAbudy

@AmitayAbudy AmitayAbudy commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Improves the outfit suggestion experience by adding:

  1. Base Item Selection: The option to generate complete outfits centered around a specific piece of clothing (e.g. a favorite shirt, pants, or shoes).
  2. 3-Look Comparison View: The option to switch between Look 1 / Look 2 / Look 3 tabs or view all 3 AI-generated outfit suggestions simultaneously in a side-by-side comparison grid, rather than needing to view and discard them sequentially.

Features & Changes

  • Backend API (POST /api/v1/outfits/suggest-options):
    • Adds endpoint to generate and materialize all 3 AI outfit recommendations in a single request.
    • Supports include_items: list[UUID] in suggestion requests, forcing the AI prompt and outfit assembler to include the selected item(s).
    • Enforces mandatory item retention during body-slot deduplication and canonical outfit sorting.
    • Updates suggestion cache key (suggest:{user_id}:{occasion}:{sorted_item_ids}) and FIFO pop to isolate suggestions with specific base items.
    • Adds recency combination filtering to avoid repeating recently suggested looks across alternatives.
  • Frontend Dashboard (/dashboard/suggest):
    • Adds a base item picker card and dialog with category filtering (shirts, pants, shoes, etc.) to choose a piece to build outfits around.
    • Adds a "Create outfit with this item" quick action in the wardrobe item details modal (item-detail-dialog.tsx) that routes directly to /dashboard/suggest?item=<id>.
    • Introduces Look 1 / Look 2 / Look 3 tabs for instant switching between alternatives.
    • Adds a "Compare All" toggle button that expands the view into a 3-column side-by-side comparison grid with individual "Choose This" actions.
  • Internationalization (i18n):
    • Added full translation coverage for all new UI strings across all 8 supported locales (en, de, fr, it, ja, ko, zh-CN, zh-TW). Verified with npm run i18n:check.
  • Testing:
    • Added unit and integration tests for include_items enforcement, suggest-options batch endpoint, body-slot overrides, and suggestion cache isolation.

Verification

  • npm run build in frontend/ succeeds cleanly.
  • npm run i18n:check passes with 0 missing keys / errors across all 8 locales.
  • All 71 backend tests pass in test_clothing_utils.py, test_suggestion_cache.py, and test_recommendation_service.py.

Summary by Sourcery

Improve outfit suggestions by supporting base-item-driven recommendations and comparison of three generated looks.

New Features:

  • Enable outfit suggestions to be generated around a selected wardrobe item.
  • Provide three generated outfit options with tabbed navigation and side-by-side comparison.

Bug Fixes:

  • Ensure selected base items are retained during outfit assembly and body-slot deduplication.
  • Prevent suggestion-cache variants from mixing across different base-item selections.
  • Avoid repeating recently suggested outfit combinations.

Enhancements:

  • Add a wardrobe-item quick action that opens outfit suggestions with that item preselected.
  • Preserve the existing single-outfit suggestion API while supporting batched recommendation generation.

Tests:

  • Add coverage for mandatory item enforcement, multi-option suggestions, cache isolation, and bulk deletion limits.

Chores:

  • Add translations for the new suggestion and wardrobe actions across all supported locales.

- Allow generating outfit recommendations centered around a base clothing item (include_items)
- Enforce mandatory base item retention in recommendation prompt and body slot deduplication
- Add POST /api/v1/outfits/suggest-options to materialize and return all 3 AI options concurrently
- Update suggestion cache key to incorporate include_items and support FIFO pop
- Add item picker dialog to suggest dashboard and 'Create outfit with this item' action in wardrobe view
- Add Look 1 / Look 2 / Look 3 tab navigation and side-by-side 'Compare All' grid view
- Add full i18n translation coverage for all new UI strings across all 8 supported locales
- Add unit and integration tests for include_items, suggest-options endpoint, and cache isolation
@github-actions github-actions Bot added javascript Pull requests that update javascript code python Pull requests that update python code labels Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants