Skip to content

Allow deleting individual entries from recent generations history #225

Description

@naheel0

Summary

The recent-generations history panel (added in #162 / PR #224) only supports clearing the entire history. Users cannot remove a single outdated or unwanted generation entry without deleting everything.

Background

A removeHistoryEntry helper already exists at src/lib/generationHistory.ts:109 but is dead code — it is only referenced in unit tests, never used by the UI.

Proposed scope

  • Add a per-entry delete control (e.g. an X / trash icon on hover) to each row in GenerationHistory.tsx.
  • When an entry is deleted:
    • Remove it from persisted local history (removeHistoryEntry).
    • Remove it from in-memory state in GeneratePageClient.tsx.
    • If the deleted entry was the active one, clear activeHistoryEntryId.
  • Keep the existing "Clear history" option as-is.

Acceptance criteria

  • Users can delete any single history entry without affecting the others.
  • Deleting the currently active entry unhighlights it and clears the active id.
  • Deleted entries are not restored after a page refresh (persisted removal).
  • Copy/download controls and sanitization are unaffected (no changes outside the history panel).

Metadata

Metadata

Assignees

Labels

area: frontendChanges specifically for the UI/Tailwind components.enhancementNew feature or requestquestionFurther information is requestedtypescriptType definition fixes, interfaces, or TS configuration.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions