Add delete confirmation for user-saved templates

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

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
frontend

Research direction

Start in apps/app/src/components/template-library/index.tsx and template-card.tsx, tracing the Delete button flow and existing template-library UI patterns. Choose and implement one of the safety approaches described in the issue, then verify that an accidental click no longer causes irreversible deletion and that the chosen recovery or confirmation behavior works as intended.

Written by the indexing model from the issue text.

Description

enhancement

Problem

Clicking the Delete button on a user-saved template in the template library drawer permanently removes it with no confirmation. A single misclick causes irreversible data loss.

Suggested fix

Add one of:

  • An undo toast that appears for a few seconds after deletion, allowing the user to restore
  • A brief confirmation dialog before deleting
  • A soft-delete with a "Recently Deleted" section

An undo toast is probably the lightest-weight option that still provides a safety net.

Files

  • apps/app/src/components/template-library/index.tsx
  • apps/app/src/components/template-library/template-card.tsx

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.