Warm pinned card variants or stop advertising them
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- nextjs, react, typescript
Línea de trabajo
Start by reading the cache key builder in app/api/card-image/[username]/route.tsx (lines 28-33) and the write path in app/api/cache-image/route.ts (lines 18-19); the mismatch between them is the bug. Then follow components/WarmOnView.tsx (lines 47-55) and app/[username]/page.tsx (line 316) to see where country and team are dropped before the warm request. Factor the key into one helper both routes call, thread the query values through, and add route tests asserting default and pinned variants each return 200 with bytes and that the plain key survives.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Current behavior
The README advertises pinned card variants with ?country= and ?team=, but those variants are never warmed. The plain card is served from R2; a pinned variant returns 404 from the empty cache path.
Live probes:
torvalds.png 200 x-og-cache: r2-hit
torvalds.png?country=nl 404 x-og-cache: miss-empty
torvalds.png?team=ferrari 404 x-og-cache: miss-empty
Cause
app/api/card-image/[username]/route.tsx:28-33 builds the cache key from the lowercased login plus the country and team query values. app/api/cache-image/route.ts:18-19 accepts only a login and writes cardpng:v10:${login}::, with empty variant fields. components/WarmOnView.tsx:47-55 sends only kind=card&login=...; app/[username]/page.tsx:316 does not pass the current country or team.
The browser does render the correct variant on the page. The bytes simply never reach the key the image route reads.
Expected behavior
Warm the exact variant currently displayed, or stop advertising variants that cannot be cached. If the variant is supported, pass country and team through WarmOnView and cache-image, build the same key in both places, and keep the plain key for the default view.
Scope
components/WarmOnView.tsxapp/api/cache-image/route.tsapp/[username]/page.tsxapp/api/card-image/[username]/route.tsxkey helper- a route test for default and pinned variants
Acceptance
- A page opened with
?country=nlor?team=ferrariwarms the matching variant. - The variant URL returns
200with real bytes after the warm write. - The plain URL keeps its own object and is not evicted by a variant.
- Tests cover both keys and the default fallback.
- Lenguaje dominante
- TypeScript
- Estrellas
- 7
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de LangerSword/gitone
-
bug help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
LangerSword/gitone#7 ·
-
accessibility bug help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
LangerSword/gitone#6 ·
-
bug help wanted
Dificultad 3/5 Medio día Aptitud para principiantes 72/100
LangerSword/gitone#4 ·
-
bug help wanted security
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
LangerSword/gitone#3 ·
-
Add a /health endpointPosiblemente ocupada @LangerSword la tomó hoy. Abiertogood first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 45/100
LangerSword/gitone#2 · 1 comentario ·
Todos los issues de LangerSword/gitone
Issues similares
-
MCP tool results drop structuredContent when text is only a summaryPosiblemente ocupada @Pankaj-bit361 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
n8n-io/nod#1474 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Clean-up indicator: two polish points from the dev look (kit clock spacing, row description)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
inblockio/siwx-oidc-matrix-server#101 ·
Los mantenedores suelen responder en 1 día
-
status:needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pingdotgg/t3code#42253 · 1 comentario ·
Los mantenedores suelen responder en 1 día