Skip to content

feat: implement SmartWardrobe with BodyAnchors, PilotEngine, save_silhouette, and get_mix_and_match#117

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-save-silhouette-method
Draft

feat: implement SmartWardrobe with BodyAnchors, PilotEngine, save_silhouette, and get_mix_and_match#117
Copilot wants to merge 2 commits intomainfrom
copilot/add-save-silhouette-method

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

Introduces the SmartWardrobe class (Pilot points 3 & 4) along with supporting types BodyAnchors and PilotEngine, none of which existed in the codebase.

New: api/smart_wardrobe.py

  • BodyAnchors — dataclass capturing shoulder_w / torso_h from the digital mirror scan
  • PilotEngine — owns PILOT_COLLECTION (eg0eg4), each entry carrying recoveryPct and a garment_id mapped to existing inventory records
  • SmartWardrobe — core wardrobe class:
    • save_silhouette(anchors) stores shoulderW, torsoH, and a Unix timestamp into self.saved_silhouette
    • get_mix_and_match(engine, current_look_id) returns up to 4 alternative look IDs from engine.PILOT_COLLECTION, excluding the current selection
engine = PilotEngine()
wardrobe = SmartWardrobe("user_123")

anchors = BodyAnchors(shoulder_w=44.0, torso_h=60.0)
wardrobe.save_silhouette(anchors)
# → "Silueta protegida bajo cifrado local."
# wardrobe.saved_silhouette == {"shoulderW": 44.0, "torsoH": 60.0, "timestamp": ...}

wardrobe.get_mix_and_match(engine, "eg0")
# → ["eg1", "eg2", "eg3", "eg4"]

New: tests/test_smart_wardrobe.py

14 unit tests covering initialization state, silhouette persistence (including overwrite), timestamp bounds, suggestion exclusion, and PILOT_COLLECTION schema invariants.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tryonyou-pilot Error Error Apr 7, 2026 1:43pm

Request Review

…houette and get_mix_and_match

Agent-Logs-Url: https://github.com/Tryonme-com/tryonyou-app/sessions/38d9e385-1e72-4518-8fef-6b54994cc91d

Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com>
Copilot AI changed the title [WIP] Add save silhouette method to SmartWardrobe feat: implement SmartWardrobe with BodyAnchors, PilotEngine, save_silhouette, and get_mix_and_match Apr 7, 2026
Copilot AI requested a review from LVT-ENG April 7, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants