Skip to content

Feature Request: Automated Version Number Management #6

@doobidoo

Description

@doobidoo

Feature Request: Automated Version Number Management

Problem Description

Currently, the version number "v1.2.0" is hardcoded in the dashboard title and needs to be manually updated across multiple files when releasing new versions. This is error-prone and can lead to inconsistent version displays.

Current Implementation

  • Version number hardcoded in MemoryDashboard.tsx: "Memory Service Dashboard v1.2.0"
  • Version may appear in other files (package.json, README.md, etc.)
  • Manual updates required for each release

Proposed Solution

Implement an automated version management system with the following options:

Option 1: Single Source of Truth (Recommended)

  1. Central Version File: Create src/version.ts or use package.json version
  2. Import in Components: Import version dynamically in React components
  3. Build-time Injection: Use Vite/build tools to inject version at build time

Option 2: GitHub Workflow Automation

  1. Release Workflow: GitHub Actions that automatically update version numbers
  2. Semantic Versioning: Auto-increment based on commit messages or PR labels
  3. Multi-file Updates: Automatically update package.json, README.md, and source files

Option 3: Runtime Version Detection

  1. Package.json Reading: Read version from package.json at runtime
  2. Environment Variables: Inject version via build environment
  3. Git-based Versioning: Generate version from git tags/commits

Implementation Details

Immediate Solution (Option 1):

// src/version.ts
export const VERSION = "1.2.0";

// MemoryDashboard.tsx
import { VERSION } from './version';
// Use: `Memory Service Dashboard v${VERSION}`

Advanced Solution (Option 2):

# .github/workflows/release.yml
name: Release
on:
  push:
    tags: ['v*']
jobs:
  update-version:
    - name: Update version files
    - name: Create release
    - name: Deploy

Build Integration (Option 3):

// vite.config.ts
export default defineConfig({
  define: {
    __VERSION__: JSON.stringify(process.env.npm_package_version)
  }
})

Benefits

  1. Consistency: Single source of truth for version numbers
  2. Automation: Reduce manual errors during releases
  3. Maintainability: Easier to update versions across codebase
  4. Professional: Better release management and tracking

Additional Features

  • Version Display: Show version in about dialog or footer
  • Update Notifications: Notify users of new versions
  • Build Info: Include build date, commit hash with version
  • Semantic Versioning: Follow semver conventions automatically

Priority

  • High: Single source of truth implementation
  • Medium: GitHub workflow automation
  • Low: Advanced features like update notifications

Environment

  • Framework: React + TypeScript + Vite
  • Platform: Electron desktop application
  • Repository: GitHub with potential for Actions integration

Related Files

  • src/MemoryDashboard.tsx (current hardcoded location)
  • package.json (contains version field)
  • README.md (version references)
  • Potential: src/version.ts, .github/workflows/

Acceptance Criteria

  • Version number automatically sourced from single location
  • No hardcoded version strings in React components
  • Version updates propagate to all display locations
  • Optional: GitHub workflow for automated version management
  • Optional: Runtime version detection and display

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions