Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Unify Template type definitions across frontend and backend

Open
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python, typescript
Domain
full-stack

Research direction

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.

Written by the indexing model from the issue text.

Description

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

Dominant language
TypeScript
Stars
1.6k
Forks
202
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CopilotKit/OpenGenerativeUI

All issues in CopilotKit/OpenGenerativeUI

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.