Preview checker: a long `og:title` or `og:description` gets no warning when the page also has a normal title and description
I maintainer di solito rispondono entro 2 giorni
@Imhamza86 ci sta già lavorando.
Dal 4/12/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 88/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Inizia da src/lib/meta-analyzer.ts e leggi i controlli esistenti sulla lunghezza del titolo e della descrizione, poi esamina i casi correlati in tests/lib/meta-analyzer.test.ts. Aggiungi test per valori Open Graph lunghi insieme a valori normali e per testi corrispondenti e diversi. Il lavoro è completato quando gli avvisi e le detrazioni di punteggio specificati sono coperti, il comportamento di fallback esistente è preservato e i controlli elencati passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
analyzeMeta only checks the length of one title and one description: tags.title || tags.ogTitle and tags.description || tags.ogDescription (src/lib/meta-analyzer.ts lines 21 and 35). So when a page has a <title> and a meta description, the og:title and og:description never get measured, and those are the ones the social previews show.
I ran parseMetaTags and analyzeMeta on the current dev with a page where everything else is set:
everything normal → score 100 (A), no issues
og:title is 116 chars → score 100 (A), no issues
og:description is 418 chars → score 100 (A), no issues
<title> is 116 chars → score 95 (A), "Title is 116 chars (recommended: under 70)"
#333 made the title check fall back to og:title when there's no <title>. This is the other half: a page that has both.
What to do
- After the current title check, also check
og:titlewhen it's set and isn't the same text as the title that was just checked. Over 70 characters gives a warning on theog:titletag, likeog:title is 116 chars (recommended: under 70), and takes 5 points like the title does. - Do the same for
og:descriptionover 160 characters, as a warning on theog:descriptiontag that takes 3 points like the description does. - When there's no
<title>or no meta description, keep what happens now: the Open Graph value is the one that gets checked, once. - The "too short" description warning stays as it is, this one is only about values that are too long.
- The test
prefers the HTML title when both title sources are presentintests/lib/meta-analyzer.test.tsexpects no warning for exactly this case, so it has to change.
Acceptance criteria
- A 116 character
og:titlenext to a normal<title>gets theog:titlewarning and scores 95 - A 418 character
og:descriptionnext to a normal description gets theog:descriptionwarning and scores 97 - A long
<title>and a longog:titlewith different text get one warning each - The same long text in
<title>andog:titlegets one warning, not two - Pages without a
<title>or meta description come out exactly as before - A test that fails on the current code
-
npm run check,npm run testandnpm run buildpass
How to test
Run the new tests, then npm run dev, open /preview and check a page with a short <title> and a long og:title. The report should list the og:title warning.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #458 in the description.
- Lingua principale
- TypeScript
- Stelle
- 8
- Fork
- 4
- Merge medio
- 1g 21h
- PR unite (30g)
- 34
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codercops/ogcops
-
Preview checker: a page that only has `og:image:url` is reported as having no imageForse già presa @MugdhoAI l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
codercops/ogcops#455 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URLForse di nuovo libera @CreatorguyS l’ha presa 34 giorni fa e non c’è nessuna pull request aperta. Apertabug enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
codercops/ogcops#378 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
good first issue templates
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
I maintainer di solito rispondono entro 2 giorni
-
good first issue templates
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
codercops/ogcops#341 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di codercops/ogcops
Issue simili
-
clawsweeper:intake:bug clawsweeper:intake:needs-environment
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
openclaw/openclaw#212827 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Use one constant for the 10,000-character input limitForse già presa @NginxL l’ha presa oggi. Apertagood first issue refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aniru-dh21/snap-validate#51 ·
I maintainer di solito rispondono entro 1 giorno
-
dependencies effort: small good first issue priority: low
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
TMHSDigital/screencast-mcp#509 ·
I maintainer di solito rispondono entro 1 giorno
-
from-review tech-debt testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
blamechris/chroxy#9520 ·
I maintainer di solito rispondono entro 1 giorno