Skip to content

fix(engine/v2): unique outfit titles and diverse explanations per set#59

Open
lucavandee wants to merge 1 commit into
mainfrom
claude/intelligent-euler-d3675f
Open

fix(engine/v2): unique outfit titles and diverse explanations per set#59
lucavandee wants to merge 1 commit into
mainfrom
claude/intelligent-euler-d3675f

Conversation

@lucavandee

Copy link
Copy Markdown
Owner

Summary

  • buildOutfitTitle now tracks titles used earlier in the same set and picks the first variant (archetype · name / rond hero-item / · color / · material) whose word overlap with any prior title stays below 0.6 — eliminating back-to-back "Werk-ready · classic" style duplicates.
  • buildExplanation caps "Afgestemd op je X stijl" to at most one outfit per set; subsequent outfits lead with occasion framing plus a hero-piece callout and, where available, a brand mention (preferred brand highlighted or mono-/dual-brand note).
  • Introduces a wordOverlapSimilarity helper (threshold 0.6) so title diversity is driven by tokenised Jaccard-style overlap rather than exact-string equality.

Test plan

  • npx vitest run — 55 pass, 1 pre-existing failure in productClassifier.test.ts (unrelated to this change; exists on the branch base)
  • Spot-check a 6-outfit run in the UI for a user with multiple occasions: titles should no longer repeat, and only one explanation should use "Afgestemd op je … stijl"

🤖 Generated with Claude Code

Titles now vary per set by cycling through archetype/hero-item/color/material
variants and rejecting options that exceed 0.6 word overlap with prior titles.
Explanations no longer repeat "Afgestemd op je X stijl" — that line appears at
most once per set, with later outfits using occasion framing, hero-piece
callouts, and brand mentions instead.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@netlify

netlify Bot commented Apr 18, 2026

Copy link
Copy Markdown

Deploy Preview for fitfiai ready!

Name Link
🔨 Latest commit 8830f13
🔍 Latest deploy log https://app.netlify.com/projects/fitfiai/deploys/69e39645e443ec000808598d
😎 Deploy Preview https://deploy-preview-59--fitfiai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@supabase

supabase Bot commented Apr 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project wojexzgjyhijuxzperhq because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

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.

1 participant