Unify Template type definitions across frontend and backend
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python, typescript
- Área
- full-stack
Línea de trabajo
Compare the type definitions in apps/agent/src/templates.py, apps/app/src/components/template-library/index.tsx, and apps/app/src/components/template-library/seed-templates.ts, starting with the backend UITemplate schema and the missing seed-template fields. Unify the frontend definitions and align them with the backend fields, then verify that chart seed templates no longer need casts and the three definitions cannot drift independently.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
There are three separate Template type definitions that can drift out of sync:
UITemplateinapps/agent/src/templates.py(backend)Templateinterface inapps/app/src/components/template-library/index.tsx(frontend)SeedTemplateinapps/app/src/components/template-library/seed-templates.ts(frontend)
SeedTemplate is missing component_type and component_data fields, so seed templates for charts would need to be cast. Any field added to one type but not the others causes silent mismatches.
Suggested fix
- Unify
TemplateandSeedTemplateinto a single shared frontend type - Ensure the frontend type matches the backend
UITemplateschema (all optional fields present) - Consider a shared schema definition (e.g. Zod on frontend, matching TypedDict on backend)
Files
apps/agent/src/templates.pyapps/app/src/components/template-library/index.tsxapps/app/src/components/template-library/seed-templates.ts
From PR #20 review
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.6k
- Forks
- 202
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
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 CopilotKit/OpenGenerativeUI
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
CopilotKit/OpenGenerativeUI#87 · 2 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Todos los issues de CopilotKit/OpenGenerativeUI
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
modelcontextprotocol/inspector#2458 · 1 comentario ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
carbon-design-system/ibm-products#9907 ·