Files
archy/aiui/.cursor/rules/24-content-websites.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

33 lines
1006 B
Plaintext

---
description: Expert rules for Websites content extraction and surfacing
globs: "**/useContentPanel.ts,**/NewsGrid.vue,**/articleOverlay*"
alwaysApply: false
---
# Websites Content Surface
## Extraction
1. **Markdown links**: `[Title](https://...)` — extract all with `extractMarkdownLinks`
2. **Bold domains**: `**Name** (domain.tld)` — extract with `extractBoldDomainLinks`
3. Merge with `mergeNewsResults` (dedupe by URL)
## URLs Validation
- Scheme: `https?://` only
- `new URL(raw)` must not throw
- Min length: title 2, url 10 chars
- Normalize for dedupe: lowercase, no trailing slash
## Display
- NewsGrid (variant=websites): card with favicon/globe icon
- Click → **overlay iframe** (not ArticleDetail)
- Use `articleOverlayStore.open(url, title, undefined, imgSrc)`
## Distinction from News
- News = articles (web search + RSS) → ArticleDetail in panel
- Websites = plain links from response → overlay iframe
- Same NewsGrid component, different `variant` and click handler