Files
archy/aiui/.cursor/rules/20-content-films.mdc
T
archipelago 7ba3109b6d Add 'aiui/' from commit 'e30ac1d1069532fb6d652d87e2d4a2fe9d1b4773'
git-subtree-dir: aiui
git-subtree-mainline: 0c4826f8cc
git-subtree-split: e30ac1d106
2026-08-03 15:07:11 -04:00

31 lines
1005 B
Plaintext

---
description: Expert rules for Film content extraction, display, and surfacing
globs: "**/useContentPanel.ts,**/FilmCard.vue,**/FilmGrid.vue,**/FilmDetail.vue,**/mocks/films*"
alwaysApply: false
---
# Films Content Surface
## Extraction Patterns
- **Tagged**: `[[film:f123]]` or `[[film:123]]` → resolved from mock library
- **External**: `[[film_ext:Title|YYYY|Director]]` → create external film with fallback poster
## Edge Cases
- `normalizeFilmId`: `f123` and `123` both become `f123`
- Duplicate prevention: key by `title|year` for externals
- Empty/malformed: skip if title < 2 chars, year invalid
- Poster: use `generatePosterFallback(title, year)` for externals
## Strip Rules
- `stripFilmTags` removes `[[film:...]]` and `[[film_ext:...]]` before displaying text
- Preserve `\n{3,}` → `\n\n` to avoid excessive whitespace
## Display
- FilmCard: poster, title, year, director
- FilmDetail: full metadata, sources, cast
- Panel: grid of FilmCards, click opens FilmDetail in panel