Files
Momento/docs/6-5-pptx-export-watermark.md
Antigravity 8eb8f551fc
Some checks failed
CI / Lint, Unit Tests & Build (push) Successful in 11m47s
CI / Deploy production (on server) (push) Failing after 18s
Story 6-4/6-5: Chat with PDF (done) + PPTX watermark PLG
Story 6-4 — Chat with PDF:
- Feature déjà implémentée (document-qa-overlay.tsx, ingestion, search)
- Marquée done dans sprint-status

Story 6-5 — PPTX Export Watermark (PLG viral loop):
- lib/brainstorm/export-pptx.ts: addWatermark + withWatermark helpers
- lib/ai/tools/pptx.tool.ts: même pattern monkey-patch addSlide
- Watermark 'memento-note.com' 7pt gris bas-droite sur chaque slide
- Zéro modification des 14+ fonctions de slides existantes
- 174 tests passent, aucune erreur TS

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 11:30:56 +00:00

51 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Story 6-5 — PPTX Export Watermark (PLG Viral Loop)
**Epic:** 6 — Croissance & Activation (PLG)
**Status:** done
## User Story
**En tant qu'** utilisateur qui partage une présentation exportée depuis Memento,
**Je veux** que chaque slide porte discrètement la mention "memento-note.com",
**Afin que** les destinataires découvrent l'outil et s'inscrivent (boucle virale PLG).
## Acceptance Criteria
- [x] **AC-1** : Chaque slide du PPTX brainstorm contient "memento-note.com" en bas-droite
- [x] **AC-2** : Chaque slide du PPTX IA (generate_pptx) contient "memento-note.com" en bas-droite
- [x] **AC-3** : Le watermark est subtil (7pt, gris clair `#B8B0A8`, italique) — visible mais non intrusif
- [x] **AC-4** : Zéro régression sur la mise en page existante des slides
## Tasks
- [x] T1 — Ajouter helper `addWatermark(slide)` + `withWatermark(pres)` dans `lib/brainstorm/export-pptx.ts`
- [x] T2 — Appliquer `withWatermark` dans `generateBrainstormPptx` (monkey-patch `pres.addSlide`)
- [x] T3 — Ajouter helper `addWatermark(slide)` + `withWatermark(pres)` dans `lib/ai/tools/pptx.tool.ts`
- [x] T4 — Appliquer `withWatermark` dans `buildPresentation` (monkey-patch `pres.addSlide`)
- [x] T5 — Vérifier TypeScript + 174 tests unitaires passent
## Files Modified
- `memento-note/lib/brainstorm/export-pptx.ts` — helpers `addWatermark` + `withWatermark`, monkey-patch dans `generateBrainstormPptx`
- `memento-note/lib/ai/tools/pptx.tool.ts` — helpers `addWatermark` + `withWatermark`, monkey-patch dans `buildPresentation`
## Technical Notes
**Pattern monkey-patch :**
```ts
function withWatermark(pres: PptxGenJSModule): PptxGenJSModule {
const original = pres.addSlide.bind(pres)
;(pres as any).addSlide = (...args: any[]) => {
const slide = original(...args)
addWatermark(slide)
return slide
}
return pres
}
```
Ce pattern garantit que le watermark est ajouté sur **toutes** les slides sans modifier les 14+ fonctions de construction de slides.
**Design watermark :**
- Position : `x: 7.0, y: 5.35, w: 2.7, h: 0.2` (bas-droite, slide 10"×5.63")
- Style : 7pt Arial, couleur `B8B0A8`, italique, alignement droite