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>
This commit is contained in:
50
docs/6-5-pptx-export-watermark.md
Normal file
50
docs/6-5-pptx-export-watermark.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# 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
|
||||
@@ -66,8 +66,8 @@ development_status:
|
||||
6-1-onboarding-activation: done # story-onboarding-activation.md
|
||||
6-2-markdown-roundtrip: review # brief-markdown-roundtrip.md
|
||||
6-3-brainstorm-canvas-finalize: review # story: 6-3-brainstorm-canvas-finalize.md
|
||||
6-4-chat-with-pdf: backlog
|
||||
6-5-pptx-export-watermark: backlog
|
||||
6-4-chat-with-pdf: done # already implemented: document-qa-overlay.tsx + document-ingestion + document-search tool
|
||||
6-5-pptx-export-watermark: done # story: 6-5-pptx-export-watermark.md
|
||||
epic-6-retrospective: optional
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user