Skip to content

templateManager.ts: Add template versioning support #696

Description

@Kingsman-99

Description

src/templateManager.ts manages notification and document templates but stores only the latest version of each template. When a template is updated, the previous version is overwritten, making it impossible to roll back or audit changes.

Acceptance Criteria

  • Each template is stored with a version number (integer, starting at 1)
  • updateTemplate(id, content) increments the version and retains the previous version in history
  • getTemplate(id, version?) retrieves a specific version or the latest when version is omitted
  • Unit tests pass

Context

  • Target file: src/templateManager.ts
  • Keep version history in memory; no persistence layer changes are needed

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions