davidherran fece168486
Deploy to VPS / deploy (push) Has been cancelled
fix: FluxAI image paths now include the node slug
The two AI tool cards rendered inside the chat — CaseStudyViewer (the
"Show me proven installations" card) and EquipmentConfigurator (the
"Show equipment specs" card) — were composing image URLs without the
node-slug segment:

  /cases/<filename>            ← what the cards were emitting (404)
  /cases/<nodeSlug>/<filename> ← what the public site actually serves

Result: cover images and gallery thumbnails inside chat cards came back
as broken-image icons, while the same files rendered fine on
/en/applications/<slug> and inside the CaseStudyModal (those
already used the correct path).

Fix: both components now derive the slug from data.title with the same
nodeToSlug() the public pages use, and prefix it on every /cases/
URL — cover and gallery thumbnails alike.

CHANGES (2 files)
- src/components/ai/CaseStudyViewer.tsx
  - Added local nodeToSlug() helper (mirrors ApplicationClient + assetFolders)
  - coverSrc:        /cases/${nodeSlug}/${mediaFileName}
  - gallery image:   /cases/${nodeSlug}/${img}

- src/components/ai/EquipmentConfigurator.tsx
  - Added local nodeToSlug() helper
  - coverSrc:        /cases/${nodeSlug}/${mediaFileName}

No backend / API / DB changes. Pure client-side path correction.
2026-05-05 09:25:45 -05:00
2026-04-16 10:29:20 -05:00
S
Description
No description provided
499 MiB
Languages
TypeScript 98.1%
JavaScript 0.9%
Dockerfile 0.4%
Shell 0.4%
CSS 0.2%