Skip to content

Releases: semanticdata/obsidian-pomodoro

1.6.1 - Fix timer bugs and Refactor tests into smaller files

29 Dec 18:34
7f71af3

Choose a tag to compare

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 App export 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.ts with shared mock setup utilities
      • Added plugin-test-helpers.ts for plugin-specific test patterns
      • Enhanced settings-test-helpers.ts with validation testing utilities
    • Broke down large test files into focused, maintainable modules:
      • Split settings-tab.test.ts into 3 specialized files (display, interactions, validation)
      • Split plugin.test.ts into 4 specialized files (commands, compatibility, lifecycle, settings-management)
    • 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

What's Changed

Full Changelog: 1.6.0...1.6.1

1.6.0 - Persistent Notifications

28 Dec 05:10

Choose a tag to compare

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 toggleTimer method.
  • 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.

What's Changed

New Contributors

Full Changelog: 1.5.0...1.6.0

1.5.0 - Auto-progression

09 Sep 02:55
cede363

Choose a tag to compare

What's Changed

  • Feature: add optional auto progression by @semanticdata in #8 to automatically start the next timer in your cycle.

Full Changelog: 1.4.0...1.5.0

1.4.0 - Sound Notifications

26 Aug 19:16
b4d24f5

Choose a tag to compare

Key Changes

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.

Contributions

  • @Sanctom originally started this feature addition in Issue #5 and graciously offered their time to test the build before release. Thank you!

Full Changelog: 1.3.0...1.4.0

1.3.0 - Obsidian Commands

17 Aug 20:12
b67e70c

Choose a tag to compare

What's 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 afterEach hooks to prevent timer leaks.
  • Fixed mock interval implementation to avoid creating real timers during testing.

Screenshots

Command Palette
image

Hotkeys
image

Settings
image

Full Changelog: 1.2.0...1.3.0

PomoBar 1.2.0

09 Aug 00:44
e16d85f

Choose a tag to compare

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 Notice API.
  • Improved DOM event listener management to prevent memory leaks on plugin reload.
  • Replaced magic numbers with named constants for MouseEvent.button values.
  • Renamed resetTimerState to resetPomodoroSession for better clarity.
  • Minor bugs related to type errors, event handling, and input validation.

PomoBar 1.1.0

11 Jun 21:37

Choose a tag to compare

PomoBar v1.1.0

Now includes settings to customize the duration of your pomodoros, and your breaks.

Full Changelog: 1.0.0...1.1.0

PomoBar v1.0.0 is released!

30 Jan 17:51

Choose a tag to compare

A minimalist Pomodoro timer that lives in your Obsidian status bar. Focus on your work while keeping track of time with this unobtrusive timer.