Skip to content

Conversation

@TylerCode
Copy link
Owner

This pull request introduces a major overhaul to the Cycles project's development workflow, build system, and feature set. The most significant changes are the addition of a persistent settings system and UI, improved theme management, a new Makefile-based build system, and enhanced documentation for onboarding and sprint planning. These improvements streamline both user experience and developer productivity, making the project easier to configure, build, and extend.

Persistent Settings & UI Improvements

  • Added a persistent settings system (settings.go) that automatically saves and loads preferences using Fyne, including theme, grid columns, history size, update interval, and logical/physical cores selection. Settings are type-safe, validated, and platform-independent.
  • Introduced a comprehensive settings dialog (settingsui.go) with sliders, dropdowns, and controls for all preferences, including a reset-to-defaults feature.
  • Enhanced theme system (theme.go) for dynamic switching, custom themes, and immediate application of changes via ApplyTheme() and isDarkTheme() helpers.
  • Improved menu system in main.go: reorganized into File, View, and Help menus, added Preferences dialog and quick theme toggle action. Settings now persist across restarts and command-line flags override saved settings. [1] [2] [3]

Build System & Developer Experience

  • Added a robust Makefile with targets for building, running, testing, formatting, vetting, cleaning, installing dependencies, release builds, and displaying environment info. This enables quick onboarding and consistent development workflows.
  • Updated documentation in README.md and DEVELOPER_GUIDE.md to reflect the new Makefile-driven setup, automated environment detection, and expanded build/test commands. [1] [2]
  • Updated default version in config.go to 0.6.0.

Project Planning & Documentation

  • Added SPRINT_SUMMARY.md outlining the roadmap from v0.4.1 to v1.2.0, with sprint breakdowns, file creation plans, architecture evolution, dependencies, and testing requirements.

References:
[1] [2] [3] [4] [5] [6] [7] [8]

This commit adds detailed planning documentation for the next major
overhaul of the Cycles application, building on the successful v0.4.0
refactoring.

New documentation:
- OVERHAUL_PLAN_V2.md: Complete 10-sprint roadmap with detailed tasks,
  file structure, and success criteria for each sprint
- SPRINT_SUMMARY.md: Quick reference guide with sprint overview,
  timelines, and dependencies
- PACKAGING_PLAN.md: Dedicated plan for fixing AppImage and Flatpak
  packaging, plus creating .deb and .rpm packages

Key features planned:
- Sprint 1: Memory monitoring UI
- Sprint 2: Persistent settings & theme management
- Sprint 3: Disk & network monitoring
- Sprint 4: Performance optimizations (circular buffers, rendering)
- Sprint 5: Cross-platform support (Windows, macOS)
- Sprint 6: Process management view
- Sprint 7: Data export & logging
- Sprint 8: GPU monitoring (v1.0 milestone)
- Sprint 9: Advanced UI features (resizable tiles, layouts)
- Sprint 10: Polish, packaging fixes, and production release

Total estimated development time: 26-35 days
Target: Feature-complete system monitor comparable to Windows Task Manager

Addresses packaging issues:
- Fix broken AppImage builds
- Implement working Flatpak support (never successfully configured)
- Verify and maintain Snap functionality
- Add traditional package formats (.deb, .rpm)
Implements Sprint 1 from OVERHAUL_PLAN_V2.md - Memory Monitoring & UI Foundation

New Features:
- Memory monitoring tab with real-time statistics
- Tabbed interface (CPU | Memory) replacing single-view layout
- Memory usage graphs with historical data tracking
- Comprehensive memory information display

Files Added:
- memorytile.go: MemoryTile component for displaying memory stats
- memorytile_test.go: Unit tests for memory tile and formatting functions

Files Modified:
- main.go: Added tabbed interface with separate CPU and Memory views
- sysinfo.go: Added GetMemoryInfoDetailed() and UpdateMemoryInfo()
- config.go: Version bumped to 0.5.0
- CHANGELOG.md: Documented all v0.5.0 changes

Memory Monitoring Features:
- Total, Used, Free, and Cached memory display
- Memory usage percentage with color-coded graphs
- Historical tracking reusing existing graph infrastructure
- Human-readable formatting (GB/MB)
- Separate update goroutine for independent refresh

Technical Details:
- Reads from /proc/meminfo (MemTotal, MemAvailable, Cached, Buffers)
- Uses accurate "used" calculation (Total - Available)
- Modular design following existing CoreTile pattern
- Independent update loops for CPU and Memory
- Reuses DrawGraph() for consistent visualization

Tests:
- TestNewMemoryTile: Validates component creation
- TestFormatMemorySize: Validates GB/MB formatting
- TestFormatMemoryPercent: Validates percentage formatting
- TestMemoryTileGetContainer: Validates container access

Breaking Changes:
- Window layout changed from single grid to tabbed interface
- Variable `tiles` renamed to `cpuTiles` for clarity

Next Sprint: Settings System & Theme Management (v0.6.0)
Implements Sprint 2 from OVERHAUL_PLAN_V2.md - Settings System & Theme Management

New Features:
- Persistent settings that save/load automatically
- Comprehensive settings UI dialog
- Dynamic theme switching (Auto, Light, Dark)
- Enhanced menu system with File, View, and Help menus
- Command-line flags now override saved settings

Files Added:
- settings.go: Settings structure with Fyne preferences persistence
- settingsui.go: Settings dialog with sliders and controls
- settings_test.go: Unit tests for settings functionality

Files Modified:
- main.go: Added settings integration, File/View menus, theme application
- theme.go: Enhanced with isDarkTheme(), ApplyTheme(), CustomTheme
- config.go: Version bumped to 0.6.0
- CHANGELOG.md: Documented all v0.6.0 changes

Settings Features:
- Theme preference (Auto, Light, Dark)
- Grid columns slider (1-16)
- History size slider (10-100)
- Update interval configuration
- Logical/physical cores toggle
- Reset to defaults with confirmation

Technical Details:
- Uses Fyne preferences API for platform-independent storage
- CustomTheme implementation for dynamic theme switching
- Settings apply immediately where possible
- Command-line flags have priority over saved settings
- Type-safe settings with validation

UI Improvements:
- File menu: Preferences dialog
- View menu: Quick theme toggle
- Help menu: About dialog
- Settings accessible via File → Preferences...
- Some settings require restart (noted in dialog)

Tests:
- TestSettingsDefaults: Validates default values
- TestGetThemeVariant: Tests theme variant conversion
- TestApplyToConfig: Validates settings → config application
- TestLoadFromConfig: Validates config → settings loading

User Experience:
- Settings persist between application sessions
- Theme switches instantly without restart
- Intuitive UI with sliders and dropdowns
- Clear labeling and immediate feedback
- Reset button with safety confirmation

Next Sprint: Disk & Network Monitoring (v0.7.0)
Implements automated development setup and build automation to streamline
the development workflow and make it easier for contributors to get started.

New Files:
- Makefile: Comprehensive build automation with 20+ targets
- scripts/setup-dev.sh: Automated dependency installation script

Files Modified:
- .gitignore: Added build/ directory
- README.md: Updated with automated setup instructions
- DEVELOPER_GUIDE.md: Complete build system documentation

Makefile Features:
- make build: Build optimized binary (output: build/cycles)
- make run: Build and run the application
- make dev: Quick development build (no optimization)
- make release: Fully optimized release build
- make test: Run all tests with verbose output
- make test-short: Run tests without verbose output
- make bench: Run benchmarks
- make fmt: Format all Go source files
- make vet: Run go vet static analysis
- make check: Run fmt, vet, and test together
- make clean: Remove build artifacts
- make install-deps: Install/update Go dependencies
- make setup: Run automated development environment setup
- make install: Install binary to /usr/local/bin
- make uninstall: Remove installed binary
- make size: Show binary size information
- make info: Display build environment information
- make help: Show all available commands

Setup Script Features (scripts/setup-dev.sh):
- Automatic OS detection (Ubuntu/Debian, Fedora/RHEL, Arch)
- Platform-specific dependency installation
- Go version detection and validation
- Automatic Go dependency download
- Build verification
- Clear success/failure messaging

Benefits:
- Single command setup: make setup
- Consistent build output: build/cycles
- Easy testing: make test
- Quick development iteration: make dev && make run
- Automated formatting and linting: make check
- Cross-platform support (Ubuntu, Fedora, Arch)

Developer Experience:
- New contributors can get started with just: make setup && make run
- No need to manually install system dependencies
- Consistent build commands across all platforms
- Clear documentation in README and DEVELOPER_GUIDE
- Color-coded terminal output for better readability

Technical Details:
- Makefile uses proper PHONY targets
- Setup script uses 'set -e' for error handling
- Build flags include optimization and symbol stripping
- Version extracted from config.go automatically
- Build directory structure: build/cycles
- Executable permissions handled automatically
The setup script now properly handles Zorin OS and other Ubuntu-based
distributions that weren't explicitly listed.

Changes:
- Added explicit support for Zorin OS, Elementary OS, and KDE neon
- Added smart fallback detection based on package manager
- If OS isn't recognized, script checks for apt-get, dnf, or pacman
- This makes the script work on ANY Debian/Ubuntu/RHEL/Arch derivative

Files Modified:
- scripts/setup-dev.sh: Enhanced OS detection with fallback
- README.md: Updated supported distributions list
- DEVELOPER_GUIDE.md: Added detailed distribution support info

Supported Distributions (Explicit):
- Ubuntu-based: Ubuntu, Debian, Pop!_OS, Linux Mint, Zorin OS, Elementary, neon
- Red Hat-based: Fedora, RHEL, CentOS, Rocky, AlmaLinux
- Arch-based: Arch, Manjaro, EndeavourOS

Fallback Support:
- Any distribution with apt-get (Debian/Ubuntu derivatives)
- Any distribution with dnf (Red Hat derivatives)
- Any distribution with pacman (Arch derivatives)

This fix ensures the setup script works on Zorin OS and virtually any
Linux distribution that uses standard package managers.
@TylerCode TylerCode merged commit 919b2c9 into main Nov 17, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants