Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Unify Template type definitions across frontend and backend

Abierto
#35 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

enhancement

Problem

There are three separate Template type definitions that can drift out of sync:

  • UITemplate in apps/agent/src/templates.py (backend)
  • Template interface in apps/app/src/components/template-library/index.tsx (frontend)
  • SeedTemplate in apps/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 Template and SeedTemplate into a single shared frontend type
  • Ensure the frontend type matches the backend UITemplate schema (all optional fields present)
  • Consider a shared schema definition (e.g. Zod on frontend, matching TypedDict on backend)

Files

  • apps/agent/src/templates.py
  • apps/app/src/components/template-library/index.tsx
  • apps/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

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CopilotKit/OpenGenerativeUI

Todos los issues de CopilotKit/OpenGenerativeUI

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.