Changelog
All notable changes to this project will be documented in this file.
1.6.1 - 2025-12-29
Fixed
- Fixed test accessor bug in timer state management where wrong variable was checked in type validation.
- Added null check for vault adapter to prevent runtime errors when loading custom audio files.
- Removed debug console.log statement from timer interval cleanup.
- Added error handling for audio playback failures to gracefully handle autoplay policy and format issues.
- Fixed audio overlap issue by stopping currently playing audio before starting new sound.
- Corrected volume slider description to match actual value range (0-1 instead of 0-100%).
- Removed dead/commented CSS style.
- Simplified volume preview sound logic for better readability.
- Fixed TypeScript build errors in test helpers:
- Added missing
Appexport to test setup file - Resolved Jest mock type issues by switching from type casting to
jest.spyOn()approach - Fixed "Generic type 'Mock' requires between 0 and 1 type arguments" errors
- Eliminated "Argument of type '{}' is not assignable to parameter of type 'never'" errors
Refactored
- Extracted duplicate sound selection logic into
getSelectedSound()helper method in SoundManager. - Simplified timer duration calculation using array indexing instead of if/else chain.
- Flattened icon selection conditions to reduce nesting in timer state management.
- Added TODO comment to revisit CDN URL duplication in sound management.
- Comprehensive test suite refactoring and optimization:
- Enhanced test suite with comprehensive helper functions to reduce code duplication:
- Added
common-test-helpers.tswith shared mock setup utilities - Added
plugin-test-helpers.tsfor plugin-specific test patterns - Enhanced
settings-test-helpers.tswith validation testing utilities
- Added
- Broke down large test files into focused, maintainable modules:
- Split
settings-tab.test.tsinto 3 specialized files (display, interactions, validation) - Split
plugin.test.tsinto 4 specialized files (commands, compatibility, lifecycle, settings-management)
- Split
- Improved test code quality by extracting common patterns and reducing duplication across test suites
- Fixed lint errors in test suite by adding proper ESLint disable comments for helper functions with internal assertions
- Optimized test suite by removing redundant tests:
- Eliminated 17 unnecessary tests (21.5% reduction) while maintaining coverage
- Removed 2 fully redundant test files (
settings/interactions.test.ts,plugin/settings-management.test.ts) - Consolidated overlapping timer state transition tests
- Merged duplicate lifecycle and cleanup tests
- Reduced test count from 79 to 62 tests across 10 files
- Maintained >70% code coverage with significantly reduced maintenance burden
1.6.0 - 2025-12-27
Added
- New persistent notification feature that maintains timer state across plugin reloads.
- Settings migration logic to handle future feature updates seamlessly.
Changed
- Major timer refactoring for more reliable state management:
- Moved from manual timing to epoch-based timing for improved accuracy.
- Pause state now managed by storing remaining duration.
- Running state inferred from timer interval being set.
- Start/Pause consolidated into single
toggleTimermethod. - Improved variable naming throughout the codebase for better readability.
- Enhanced audio notification persistence to work reliably with the new timer system.
Fixed
- Fixed negative time formatting display issues.
- Resolved timer consistency issues during state transitions.
- Fixed test suite after major refactoring:
- Replaced manual time calculations with moment.js integration.
- Fixed circular reference errors in test mocks.
- Centralized mock definitions for better maintainability.
- Improved fake timer integration with moment.js.
- Corrected TypeScript errors and assertion failures in tests.
- Fixed overflow display of negative numbers in timer countdown.
Developer Experience
- Comprehensive test refactoring and improvements.
- Added proper test cleanup and mock management.
- Updated documentation to reflect new timer architecture.
- Code formatting with Prettier across the entire codebase.
- Resolved lint issues and improved code quality.
1.5.0 - 2025-09-08
Added
- New optional auto progression feature to automatically start the next timer in your cycle.
1.4.0 - 2025-08-26
Changed
- Simplified audio loading logic by removing complex local file path resolution.
- Updated all dependencies to latest versions.
- Replaced Settings Headings with proper
setHeading()method for Obsidian plugin guidelines compliance.
Fixed
- Updated test mocks to support new
setHeading()method. - Corrected test expectations and setting indices after settings UI restructure.
- Fixed lint errors in sound manager.
Added
- New optional notification sound at the end of the timer.
- Audio notifications load from CDN for improved reliability and cross-platform compatibility.
- Option to use Custom URL or File instead of the default options.
- New Obsidian command to toggle Sound Notifications on and off.
1.3.0 - 2025-08-17
Changed
- Adjusted colors to more closely match other status bar elements.
- Moved from inline SVG icons to separate files.
Added
- New Obsidian commands:
- Toggle status bar visibility.
- Toggle icon visibility.
- Toggle the timer (play/pause).
- Reset timer.
- Cycle timer to next phase.
- New dependency to handle SVG icons
esbuild-plugin-svg. - New icon logic:
- New Paused icon used when the timer is paused.
- New Play icon used when the timer is running.
- Timer icon used when inactive.
- Comprehensive test coverage improvements:
- Added command integration tests for all new keyboard shortcuts.
- Added icon state transition tests for new icon switching logic.
- Added timer completion flow tests for work/break transitions.
Fixed
- Resolved test hanging issues caused by mock timer implementation using real
setTimeout. - Added proper test cleanup in
afterEachhooks to prevent timer leaks. - Fixed mock interval implementation to avoid creating real timers during testing.
1.2.0 - 2025-08-08
Changed
- Briefly tried switching from using esbuild to Vite, then reverted the build system from Vite back to esbuild. While Vite was explored for its development features, esbuild proved to be a more stable and performant choice for an Obsidian plugin.
- Refactored the codebase for better organization and maintainability.
- Improved timer state management for more reliable operation.
- Standardized CSS class names for consistency.
- Extracted repetitive input validation logic into reusable helper functions.
- Refactored timer methods to eliminate code duplication in interval management.
Added
- New opt-in status bar icon for the plugin.
- Documentation site built with MkDocs.
- CHANGELOG with all plugin release notes.
- Increased test coverage for the plugin lifecycle, timer logic, and settings.
- Robust input validation tests for the settings tab.
- Edge case testing for the timer and other components.
Fixed
- Timer inconsistencies when cycling through durations.
- A memory leak that occurred when the plugin was unloaded.
- A bug that allowed settings to be changed in an unsafe way.
- Replaced browser alerts with Obsidian's native
NoticeAPI. - Improved DOM event listener management to prevent memory leaks on plugin reload.
- Replaced magic numbers with named constants for MouseEvent.button values.
- Renamed
resetTimerStatetoresetPomodoroSessionfor better clarity. - Minor bugs related to type errors, event handling, and input validation.
1.1.0 - 2025-06-11
Added
- Settings panel to configure:
- Work, short break, and long break durations.
- Number of work sessions before a long break.
- Status bar icon visibility.
- Initial test suite using Jest.
pnpmandESLintto the development workflow.- README and CHANGELOG files.
1.0.0 - 2025-01-30
Added
- Initial release.
- Core Pomodoro timer with work, short break, and long break states.
- Visual countdown (MM:SS) in the status bar.
- Audio alerts on timer completion.
- Mouse controls for the timer:
- Left-click: Start/pause timer.
- Middle-click: Cycle modes.
- Right-click: Reset timer.
- Color changes in UI to indicate timer state.