-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
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)
- Central Version File: Create
src/version.ts
or usepackage.json
version - Import in Components: Import version dynamically in React components
- Build-time Injection: Use Vite/build tools to inject version at build time
Option 2: GitHub Workflow Automation
- Release Workflow: GitHub Actions that automatically update version numbers
- Semantic Versioning: Auto-increment based on commit messages or PR labels
- Multi-file Updates: Automatically update package.json, README.md, and source files
Option 3: Runtime Version Detection
- Package.json Reading: Read version from package.json at runtime
- Environment Variables: Inject version via build environment
- 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
- Consistency: Single source of truth for version numbers
- Automation: Reduce manual errors during releases
- Maintainability: Easier to update versions across codebase
- 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