Skip to content

Implement Balmain snap-trigger flow and production pilot action pipeline (UI + API)#362

Merged
LVT-ENG merged 2 commits into
mainfrom
copilot/implement-auto-transition-function
Jun 4, 2026
Merged

Implement Balmain snap-trigger flow and production pilot action pipeline (UI + API)#362
LVT-ENG merged 2 commits into
mainfrom
copilot/implement-auto-transition-function

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 4, 2026

This PR aligns the try-on pilot behavior with the requested architecture: Balmain brand interaction now triggers automatic snap/look transition, and the 5 native pilot actions are wired to real, stateful API flows. It also hardens interaction/state handling so UI transitions and backend side effects stay consistent under async activity.

  • Balmain-triggered snap transition (UI state machine)

    • Added explicit Balmain brand triggers (button/link/logo) in TryOn projection panel.
    • Brand trigger now performs immediate garment transition and invokes the snap action path without user confirmation hops.
    • Consolidated snap/action pending states to prevent overlapping transitions and broken render phases.
  • Pilot action integration in TryOn UI

    • Wired the 5 required actions to backend endpoints from client/src/pages/TryOn.tsx:
      • Mi Selección Perfecta → add selected look to cart with computed fit profile.
      • Reservar en Probador → create synchronous reservation and render returned QR.
      • Ver Combinaciones → fetch 5 suggestions and present 4 alternatives.
      • Guardar mi Silueta → persist structured biometric snapshot to profile.
      • Compartir Look → export clean composed image and register share event.
    • Added local action/result state (reservation id/QR, stored silhouette ref, alternative combinations) for deterministic UX feedback.
  • API refactor for real pilot workflows

    • Extended SQLite-backed persistence in api/index.py with pilot tables for:
      • cart items,
      • stock locks/reservations,
      • silhouette profiles,
      • look share events.
    • Refactored pilot endpoints to enforce required inputs and return structured, actionable payloads.
    • Reservation flow now enforces stock locking semantics and conflict handling.
    • Combination endpoint returns normalized look_principal + alternativas shape.
  • Privacy guardrails for shared look output

    • Added dedicated /api/lafayette/look/compartir endpoint.
    • Enforced metadata privacy policy: reject payloads containing weight/height/dimension/size fields.
    • UI share flow exports only composed visual output and sends privacy-safe metadata.
  • Pilot API coverage

    • Added tests/test_lafayette_pilot.py for cart persistence, reservation lock/conflict behavior, combinations cardinality (5/4), silhouette storage, and share-metadata privacy blocking.
// Balmain brand trigger => immediate look transition + snap
const handleBalmainSnapTrigger = () => {
  onBalmainTrigger();
  void handleSnap("balmain");
};

Copy link
Copy Markdown
Member

@LVT-ENG LVT-ENG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@LVT-ENG LVT-ENG marked this pull request as ready for review June 4, 2026 10:12
@LVT-ENG LVT-ENG merged commit 52e4f71 into main Jun 4, 2026
3 of 8 checks passed
Copy link
Copy Markdown
Member

@LVT-ENG LVT-ENG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

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