Commit graph

38 commits

Author SHA1 Message Date
callumalpass
e085c8c9a1 chore: Update FullCalendar to v6.1.20
Update from v6.1.17 to v6.1.20 for latest bug fixes and improvements.
Includes Angular 21 support, nowIndicatorSnap setting, and various fixes.

Related to #1409
2026-01-01 16:51:58 +11:00
callumalpass
0b104f0cb1 chore: add E2E testing infrastructure with Playwright
- Add Playwright and @electron/asar dev dependencies
- Add e2e, e2e:setup, and e2e:launch npm scripts
- Update copy-files.mjs to default to tasknotes-e2e-vault in repo
- Add .gitignore entries for test artifacts and unpacked Obsidian
2025-12-31 09:34:09 +11:00
Lars Marowsky-Bree
cf09eaaaa5 fix: add mobile touch drag-and-drop for Kanban view
Fixes #1399
2025-12-24 01:07:32 +01:00
Renato Mendonca
fb6cc271bd fix: sync package-lock.json with package.json version 4.0.3 2025-11-23 17:43:49 +11:00
callumalpass
9ee0757c68 Implement CodeMirror autocomplete for NLP triggers (@, #, +, status)
Phase 2 Complete - Full NLP Markdown Editor Refactor

- Create NLPCodeMirrorAutocomplete.ts with CodeMirror-based autocomplete
- Support @ context, # tag, + project, and custom status triggers
- Use FileSuggestHelper for advanced project matching
- Integrate autocomplete extension into EmbeddableMarkdownEditor
- Add extensions parameter to MarkdownEditorProps
- Wire up autocomplete in TaskCreationModal

Features:
- Context autocomplete (@) - queries from cache manager
- Tag autocomplete (#) - queries from cache manager
- Project autocomplete (+) - uses FileSuggestHelper with exclusions
- Status autocomplete (custom trigger) - uses StatusSuggestionService
- All triggers respect word boundaries
- Supports multi-word queries for projects
- Shows up to 10 suggestions per trigger
- Auto-activates on typing after trigger character

The NLP field now has full rich markdown editing with working autocomplete!
2025-11-09 19:41:57 +11:00
callumalpass
7f26799b93 Update release notes and add monkey-around dependency 2025-11-09 19:41:57 +11:00
callumalpass
49849b960d chore: switch from npm link to published i18n-state-manager package 2025-11-04 13:55:34 +11:00
callumalpass
73fcaf30ea feat(i18n): complete missing translations and internationalize hardcoded strings
Complete missing translations for all languages:
- de, es, fr: All missing keys translated (100% coverage for existing keys)
- ja, ru, zh: Missing keys translated and stale keys updated

Add 159 new translation keys for previously hardcoded strings:
- modals.deviceCode (12 keys)
- modals.icsEventInfo (18 keys)
- modals.timeblockInfo (23 keys)
- modals.timeblockCreation (20 keys)
- modals.icsNoteCreation (16 keys)
- views.stats (25 keys)
- views.agenda, views.notes, views.kanban (additional keys)
- components.dateContextMenu (10 keys)
- components.subgroupMenuBuilder (10 keys)
- notices (23 keys)

Update source files to use i18n:
- 5 modal files
- 5 view files
- 3 component files
- OAuthService, FilterBar

Translation status:
- de, es: 100% (1704/1704)
- fr, ja, ru, zh: ~90% of new keys translated
2025-11-02 20:30:20 +11:00
callumalpass
9d2e3111d3 3.25.4 2025-10-26 16:39:12 +11:00
callumalpass
9ec2497418 release 3.25.2 2025-10-08 23:37:23 +11:00
callumalpass
86a1588650 update package.json versions 2025-10-05 14:32:05 +11:00
callumalpass
632c5486ff feat: configure Prettier formatter and improve linting setup
- Add Prettier with tab-based configuration matching existing EditorConfig
- Install eslint-config-prettier and eslint-plugin-prettier for integration
- Add format and format:check scripts for code formatting
- Update ESLint configuration to integrate with Prettier

This reapplies the Prettier configuration from PR #747 which was previously
reverted, now rebased onto the current main branch with dependency features.
2025-09-28 12:28:12 +10:00
callumalpass
cbfdebfb92 Revert "Merge pull request #747 from callumalpass/issue717"
This reverts commit dc7cfb5b0d, reversing
changes made to e6cc6a2338.
2025-09-28 11:55:01 +10:00
callumalpass
20dd383bd4 feat: configure Prettier formatter and improve linting setup
- Add Prettier with tabs/4-space configuration matching EditorConfig
- Install eslint-config-prettier and eslint-plugin-prettier for integration
- Add format scripts: format, format:check, lint:fix
- Update CI to fail on linting errors but allow warnings (--max-warnings -1)
- Add format check step to CI pipeline before linting
- Fix all 54 ESLint errors (unused imports/variables, case declarations, escape chars)
- Add .prettierignore for build artifacts and dependencies

Addresses issue #717 - improves code formatting and makes it easier for
third parties to contribute with consistent formatting standards.
2025-09-28 11:34:47 +10:00
Sergen Aras
0bc0c36517 time statistics 2025-09-23 08:58:43 +03:00
callumalpass
7ed1d897b1 feat: add FullCalendar agenda/list view to Advanced Calendar
- Add @fullcalendar/list dependency to package.json
- Import listPlugin in AdvancedCalendarView.ts
- Add listPlugin to FullCalendar plugins array
- Add listWeek view to header toolbar configuration

The list view provides a chronological agenda format showing:
- Events organized by date
- Time-based events with start/end times
- All-day events
- Seamless integration with existing TaskNotes features
2025-09-13 21:56:16 +10:00
callumalpass
d357c2393f feat: implement direct formula computation for Bases integration
BREAKTHROUGH: Successfully bypassed Bases formula computation system by
directly calling formula.getValue() and injecting results into cache.

Key achievements:
-  Found formula engines at ctx.formulas and query.formulas
-  Discovered formula objects have getValue() method that computes results
-  Implemented per-item formula computation for all data items
-  Direct cache injection: formulaResults.cachedFormulaOutputs[name] = result
-  Fixed double-wrapping issue in cache storage format
-  Added comprehensive debugging for formula computation lifecycle

Technical details:
- Formula objects structure: {text, formula, getValue(), test()}
- getValue() returns: {icon: "lucide-binary", data: computed_value}
- Computes formulas for all items: TESTST=11, TEST=47, etc.
- Added obsidian-typings dev dependency for better type support
- Enhanced TaskCard formula property handling

This enables Bases formulas to display computed values in TaskCards
instead of "[Formula]" placeholders.
2025-09-06 09:28:25 +10:00
callumalpass
410ff77f16 feat: update npm dependencies and fix test compatibility issues
- Update ical.js from 1.5.0 to 2.2.1 with proper ES6 import syntax
- Update Jest from 29.7.0 to 30.1.1 and fix test compatibility
- Update multiple minor/patch dependencies for security and features
- Fix extractNoteInfo to handle dateCreated field extraction without field mapper
- Add appendText method to DOM element mocks for Modal tests
- Fix CSS color format expectations in tests (hex to rgb)
- Fix plugin settings mock initialization
- Resolve all npm security vulnerabilities (2 → 0)

All core functionality maintained with improved dependency versions.
2025-08-31 16:16:43 +10:00
Renato Mendonca
76ad45d1a0
Feat/Implement status auto-suggestion with NLP integration (#512)
* feat: implement status auto-suggestion with NLP integration

What:

Added status auto-suggestion triggered by configurable character (statusSuggestionTrigger setting)

Enhanced NaturalLanguageParser to handle custom status extraction before date parsing

Fixed suggestion dropdown text truncation with CSS improvements

Why:

Often users need to add tasks with a status that differ from the default status. E.g when adding a task that's already in progres.

This featue allows quick status selection during task creation via natural language input

Prevents conflict when parsing status names containing keywords like 'Now' by parsing status before chrono-node date parser

How:

User defined trigger defined in Settings -> Misc. Defaults to "*".

Status parsing disabled if the trigger setting is empty.

Implemented NLPSuggest class extending AbstractInputSuggest for status suggestions

String-based matching;

Uses case-insensitive indexOf() to handle any characters Obsidian properties accept

Processes status configs by length (longest first) to prevent partial matches

Manual boundary checking instead of unreliable regex word boundaries

* docs: add status auto-suggestion documentation

Added documentation for status auto-suggestion feature in task management:
- Updated auto-suggestions list to include status trigger
- Added Status Suggestions section with usage example
- Included visual reference to auto-suggest-status.gif

* test: add status auto-suggestion tests

Added test coverage for status auto-suggestion feature:

TaskCreationModal.status-suggestions.test.ts: Tests for modal integration, trigger configuration, and UI behavior

NaturalLanguageParser.status-extraction.test.ts: Tests for string-based status extraction

## Status Trigger Configuration
• Uses configured status trigger character from settings
• Disables status suggestions when trigger setting is empty
• Supports custom trigger characters beyond default "*"

## Status Suggestion Detection
• Detects status trigger in natural language input field
• Shows status suggestions for partial text matches
• Matches partial input like "*in" to "In Progress" status

## Status Suggestion Behavior
• Inserts status text into textarea when suggestion selected
• Works consistently with other NLP elements (@contexts, #tags, +projects)

## Natural Language Parser Integration
• Extracts status before date parsing to prevent keyword conflicts
• Handles complex status names with special characters and spaces

## String-based Status Matching
• Extracts simple status labels from text input
• Extracts complex status labels containing special characters like "Active = Now"
• Handles status names with parentheses and colons

## Boundary Checking
• Matches status at beginning, middle, and end of text
• Prevents partial word matches within larger words
• Uses proper word boundary detection

## Case Insensitive Matching
• Matches status regardless of text case (UPPER, lower, Mixed)
• Handles mixed case status names consistently

## Error Handling
• Handles missing status configurations gracefully
• Works with empty status configuration arrays

* fix: resolve status suggestion test failures

- Add proper DOM initialization helper for TaskCreationModal tests
- Fix NLP parser test expectations to align with correct date parsing behavior
- Status extraction correctly happens before date parsing to prevent conflicts
- Date expressions like 'tomorrow at 3pm' are properly parsed and removed from title
- All status suggestion tests now pass except for 2 edge cases requiring investigation

* fix: enhance chrono-node mock to properly handle time expressions

Following TDD and testing standards:
- Apply single responsibility principle to mock external dependencies properly
- Mock chrono-node to handle 'tomorrow at 3pm' as complete date expressions
- Add time parsing support for am/pm patterns in test environment
- Ensure mock returns full matched text like real chrono-node
- Fix date text removal to handle complete time expressions correctly

All 20 status extraction tests now pass, confirming:
- Status extraction happens before date parsing (prevents 'Now' conflicts)
- Complete date+time expressions are properly parsed and removed
- Time components are correctly extracted and assigned

* fix: align overlay tests with simplified implementation

Following testing standards to ensure tests expect what's implemented:
- Remove references to removed overlayHideDelay setting and dual-mode behavior
- Remove calls to non-existent clearCursorHideState function
- Update test expectations to match simplified cursor detection logic
- Align tests with actual implementation: cursor within link boundaries hides overlay
- Remove legacy vs immediate mode tests (feature was simplified)

All 21 overlay tests now pass:
- 6/6 debounce tests passing
- 6/6 context menu tests passing
- 9/9 integration tests passing

Tests now accurately reflect the simplified, working implementation.

* refactor: extract status suggestion business logic following code quality standards

Apply Single Responsibility Principle and Dependency Injection:

NEW: StatusSuggestionService
- Extract all status suggestion business logic from TaskCreationModal
- Pure business logic with no UI dependencies - easily testable
- Handles status extraction, suggestions, trigger detection, and text manipulation
- Follows single responsibility: only manages status suggestion logic

REFACTOR: TaskCreationModal
- Add dependency injection for StatusSuggestionService (optional for backward compatibility)
- Use injected service for all status-related operations
- Maintain existing public API while improving internal architecture

TESTS: Comprehensive test coverage
- 23 unit tests for StatusSuggestionService (100% business logic coverage)
- 9 integration tests verifying service integration
- All 32 tests passing - validates functionality separation
- Tests focus on business logic, not complex DOM manipulation

Benefits:
- Business logic separated from UI concerns (Single Responsibility)
- Easy to mock and test (Dependency Injection)
- Fast, reliable tests (no DOM complexity)
- Maintains backward compatibility
- Follows TDD principles with meaningful test coverage

* fix: resolve TypeScript compilation errors

- Fix StatusConfiguration -> StatusConfig type imports across all files
- Add explicit 'as const' assertions for literal union types in TaskCreationModal
- Fix DateContextMenu type guard for showPicker method
- Ensure proper type safety while maintaining functionality

All TypeScript errors resolved, build now succeeds cleanly.

* feat: complete status auto-suggestion feature implementation

FEATURE COMPLETE: Status auto-suggestion on task creation

 Core Implementation:
- StatusSuggestionService with comprehensive business logic
- Natural language parsing with status extraction before date parsing
- Status trigger suggestions (*status) with real-time filtering
- Proper handling of complex status names like 'Active = Now'

 Architecture Improvements:
- Applied Single Responsibility Principle (business logic separated from UI)
- Dependency injection for better testability
- Clean separation of concerns following code quality standards

 Test Coverage:
- 32 comprehensive tests (23 unit + 9 integration)
- 100% business logic test coverage
- All overlay and NLP parser tests passing (62 total tests)
- Enhanced chrono-node mock for realistic date/time parsing

 Technical Fixes:
- TypeScript compilation errors resolved
- Updated to TypeScript 5.9.2 for better type safety
- Fixed type imports and literal union types
- Added backward compatibility stub functions

 Manual Testing Confirmed:
- Status extraction from natural language input working
- Status suggestions with trigger (*) working
- Complex scenarios with dates, contexts, projects working
- Edge cases handled gracefully

The feature is production-ready with clean, maintainable architecture.
2025-08-31 10:35:02 +10:00
fastrick
67fa201949 Double click open note feature 2025-08-20 15:46:44 +00:00
Callum Alpass
ac57dd738a feat: add OpenAPI specification and Pomodoro API endpoints
## OpenAPI Specification
- Add decorator-based OpenAPI system with @OpenAPIController and @OpenAPI decorators
- Generate machine-readable OpenAPI 3.0 spec at /api/docs
- Serve interactive Swagger UI documentation at /api/docs/ui
- Complete schema definitions for all API types and responses
- Enable TypeScript experimental decorators support

## Pomodoro API Endpoints
- POST /api/pomodoro/start - Start new pomodoro session with optional task
- POST /api/pomodoro/stop - Stop current session
- POST /api/pomodoro/pause - Pause running session
- POST /api/pomodoro/resume - Resume paused session
- GET /api/pomodoro/status - Get current session status and statistics
- GET /api/pomodoro/sessions - Get session history with filtering
- GET /api/pomodoro/stats - Get daily/date-specific statistics

## Documentation Updates
- Add comprehensive HTTP API documentation with pomodoro examples
- Include JavaScript PomodoroController integration example
- Update feature documentation with view types and settings
- Improve navigation structure across documentation files

## Dependencies
- Add reflect-metadata for decorator metadata support
- Remove unused express dependency
- Update TypeScript configuration for decorator support

All endpoints include proper error handling, OpenAPI documentation, and support for recurring task integration.
2025-08-13 22:12:14 +10:00
Callum Alpass
a177beb842 chore: update dependencies for webhook functionality
- Update version to 3.19.1
- Add Express.js 5.1.0 for HTTP API server functionality
- Add FullCalendar RRule support for enhanced calendar features
- Update existing dependencies to latest compatible versions
- Ensure security and compatibility for webhook implementation
2025-08-13 10:43:06 +10:00
Callum Alpass
a52aeb862b feat(agenda/ics): implement ICS cards in Agenda with toggle and refresh; safe scheduled handling; copy script fix
- Add ICS card component (icon-only indicator) and integrate into Agenda grouped/flat views
- Add 'Calendar subscriptions' toggle in FilterBar View Options with saved view persistence
- Always show 'Refresh calendars' button in Agenda and handle service readiness
- Wire ICS subscription data-changed events to refresh Agenda
- Fix copy-files default path and ensure destination exists; improve ENOENT handling
- Normalize scheduled when creating a task from an ICS event per guidelines (all-day: YYYY-MM-DD, timed: YYYY-MM-DDTHH:mm)
- TypeScript fix for icon color application using wrapper class
2025-08-12 08:49:14 +10:00
renatomen
9e3fedbc75 feat: boolean-aware property identification and frontmatter write; tie-in tests and docs in this PR; lockfile sync 2025-08-09 13:17:17 +12:00
Callum Alpass
30f609bb50 chore: Add test file and update package-lock.json
- Add unit test for ICSSubscriptionService to test recurring event exceptions
- Update package-lock.json with version 3.17.1
2025-08-07 11:21:33 +10:00
Callum Alpass
edb01c335e fix: Comprehensive timezone handling fixes (Issues #327, #322, #314)
BREAKING CHANGE: Date handling now consistently uses local timezone for all user-facing operations

## Major Changes

### Core Timezone Fix
- Fixed critical RRule/local date boundary bug in helpers.ts that caused recurring tasks to show on wrong days
- Standardized all date formatting to use formatDateForStorage() which returns local dates
- Eliminated inconsistent use of format() vs formatUTCDateForCalendar()

### Files Updated
- **dateUtils.ts**: Added getTodayLocal(), parseDateAsLocal(), hasTimeComponent() utilities
- **helpers.ts**: Fixed isDueByRRule to use formatDateAsUTCString for RRule compatibility
- **TaskService.ts**: Updated all format() calls to use formatDateForStorage()
- **AdvancedCalendarView.ts**: Consistent use of formatDateForStorage() throughout
- **TaskEditModal.ts**: Fixed calendar navigation to use local dates
- **PomodoroService.ts**: Updated all date formatting
- **FilterService.ts**: Fixed getDatePart to use formatDateForStorage
- **AgendaView.ts**: Updated date formatting
- **main.ts**: Updated initialization
- **TaskCard.ts**: Minor formatting updates

### Test Updates
- Updated 700+ tests to match new timezone behavior
- Fixed test expectations to use local dates instead of UTC
- Removed outdated timezone simulation tests
- All tests now pass (765 total, 717 passing, 48 skipped)

### Documentation
- Added comprehensive TIMEZONE_HANDLING_GUIDE.md for developers
- Added TIMEZONE_QUICK_REFERENCE.md cheat sheet
- Created TIMEZONE_FIXES_WORKING_MEMORY.md tracking all changes

## Technical Details

The system now follows a "UTC Midnight Convention":
1. User-facing operations use local dates (what users see and input)
2. RRule operations internally use UTC but convert at boundaries
3. Storage format "YYYY-MM-DD" represents local date consistently

This fixes:
- Issue #327: Recurring tasks marking wrong day complete
- Issue #322: Timezone bugs in calendar display
- Issue #314: Complete instances timezone inconsistencies
- Off-by-one errors for users in different timezones

## Migration Notes

Developers should:
- Use formatDateForStorage() instead of format(date, 'yyyy-MM-dd')
- Use getTodayLocal() instead of new Date() for today's date
- Use parseDateAsLocal() for date-only strings
- Refer to TIMEZONE_HANDLING_GUIDE.md for best practices
2025-08-02 08:53:01 +10:00
Callum Alpass
c7ca1c353c feat: implement comprehensive projects system with note-based linking
- Add dedicated projects field supporting [[Note Name]] links to any vault notes
- Create ProjectSelectModal for intuitive project note selection with fuzzy search
- Implement multi-project support with proper filtering and grouping functionality
- Add clickable project links in task cards that navigate to project notes
- Update FilterBar with working project filters using proper link resolution
- Support project grouping in all views (TaskList, Kanban) with multi-group display
- Add robust project caching system that extracts projects from linked notes
- Include comprehensive validation to filter empty/invalid project values
- Remove NLP +project syntax to simplify natural language processing
- Fix T00:00 date parsing errors in recurring task complete_instances
- Add full template variable support with {{parentNote}} YAML list formatting
- Maintain backward compatibility with existing plain text projects
- Add comprehensive test coverage and accessibility features

Resolves: GitHub issue #118 discussion requirements
Fixes: FilterBar loading issues and date parsing console errors
2025-07-05 18:54:39 +10:00
Callum Alpass
dcc07f9395 Remove @types/date-fns dependency and Update TS Config Paths
• Removed the @types/date-fns dependency from package.json and package-lock.json as it was not used.
• Updated tsconfig.json to narrow the compilation scope by changing the include pattern to "src/**/*.ts".
• Added an exclude section in tsconfig.json to omit tests and node_modules directories from TypeScript compilation.

These changes help streamline dependency management and ensure that only the necessary TypeScript files are compiled, improving project organization and build performance.
2025-06-25 21:07:31 +10:00
Callum Alpass
d667e66472 Fix critical linting issues: reduce from 340 to 295 errors
- Add missing @codemirror/view dependency
- Replace deprecated substr() with substring() across multiple files
- Remove unused imports and variables
- Fix navigator API usage (replace window.setTimeout with setTimeout)
- Fix await non-thenable issues in BaseTaskModal
- Remove unused variables in modals and views

Key fixes:
• BaseTaskModal.ts: Fixed all substr deprecations and removed unused variables
• DueDateModal.ts: Removed unused imports and fixed navigator API usage
• ConfirmationModal.ts: Removed unused variable
• ICSEventInfoModal.ts: Fixed navigator API usage
• ScheduledDateModal.ts: Removed unused imports
• TaskCreationModal.ts: Removed unused imports
• TaskEditModal.ts: Removed unused imports
• TaskListView.ts: Fixed await non-thenable issue
• ICSSubscriptionService.ts: Fixed substr deprecation
• AdvancedCalendarView.ts: Fixed substr deprecations in color parsing
• helpers.ts: Fixed substr deprecation in ID generation

This brings us closer to a clean codebase by addressing the most critical
functional errors and deprecated API usage.
2025-06-25 07:14:48 +10:00
Callum Alpass
c46409a41f Address linting and plugin guideline issues
• Replacing explicit “window.setTimeout” and “window.clearTimeout” calls
with the standard “setTimeout” and “clearTimeout” functions throughout
the project. This was done in many modules (editor integrations,
services, UI components, DOM reconciler, performance monitor, request
deduplicator, and others) to keep the code clean and consistent.

• Updating timeout callbacks to use arrow–functions consistently and
ensuring that cleanup (e.g. removing timeouts from active sets) is done
using standard browser/global functions rather than the window property.

• Improving type annotations for better type–safety and clarity. For
example, several functions that previously accepted “any” now use
“unknown” or explicitly return a “TaskInfo” (or null) so that consumers
of the API receive proper type information.

• Adding error handling for clipboard operations in multiple UI actions.
In the task action palette and calendar event actions, the clipboard
writes are now inside try/catch blocks with appropriate notices if the
operation fails.

• Refactoring modal headings:
  – Instead of manually creating header elements (using createEl with
‘h2’ or ‘h3’), the code now creates headings via the Obsidian “Setting”
helper. This pattern is applied in ConfirmationModal, ICSEventInfoModal,
MigrationModal, StorageLocationConfirmationModal,
TaskActionPaletteModal, TimeblockCreationModal, TimeblockInfoModal,
AgendaView, NotesView, PomodoroStatsView, and PomodoroView.
  – This improves the consistency of modal headers and aligns with
Obsidian’s UI style.

• Within the task link related components (TaskLinkWidget,
ReadingModeTaskLinkProcessor, TaskLinkOverlay), minor adaptations were
done to align type information and manipulate the editor instance more
safely (e.g. casting with “as any” when needed).

• The package.json file has been updated to use caret (“^”) version
ranges for the @typescript-eslint packages and now includes the ESLint
dependency version "^8.56.0" alongside the new dependency on
"eslint-plugin-obsidianmd" version "^0.0.2". These changes likely
reflect updated compatibility requirements and ensure that dependencies
remain in sync.

• In several service and utility files (ICSSubscriptionService,
PomodoroService, DOMReconciler, PerformanceMonitor,
RequestDeduplicator), any use of window’s timer functions has been
replaced with the global versions. This removes unnecessary explicit
references to the “window” object and streamlines the code.

• In the modals and views where text headers are created (for example in
the Pomodoro statistics view, TaskActionPalette modal, various
confirmation modals), headers are now created via the Setting API to set
a heading rather than a plain element, promoting a more coherent style.

• Minor tweaks in regular expressions (e.g. updating a character range
from “\x00-\x1f” to “\x00-\x1F”) ensure that invisible control
characters are captured correctly.

Overall, these refactorings improve consistency, clarity, and
type–safety and add better error handling in asynchronous (clipboard)
operations, while also aligning the UI code with Obsidian’s recommended
patterns.
2025-06-24 23:23:13 +10:00
Callum Alpass
972a4ad4c6 Add testing suite 2025-06-24 00:24:11 +10:00
Callum Alpass
f25769238f Add rrule-based recurrence system & legacy migration support
• Upgrade version from 3.5.0 to 3.7.1 and update package dependencies:
  – In package-lock.json and package.json, bump version.
  – Add new dependencies “chrono-node” and “rrule” and update “dayjs”.

• Introduce new MigrationService and MigrationModal:
  – Create MigrationService (in src/services/MigrationService.ts) to scan task files for legacy RecurrenceInfo objects (stored as objects) and convert them into RFC 5545 rrule strings.
  – Add MigrationModal (src/modals/MigrationModal.ts) that prompts users to run the migration, displays progress, and reports errors.
  – Initialize MigrationService in main.ts and check for migration needs on startup, showing a migration prompt if needed.

• Refactor recurrence handling to use the rrule format:
  – Update BaseTaskModal (src/modals/BaseTaskModal.ts) to replace the old “recurrence” dropdown with a new “RRule Builder” that enables users to select frequency, interval, weekly, monthly, and yearly options.
  – Add helper methods to parse, generate, and display human-readable rrule strings.
  – Provide UI controls for selecting:
      • Frequency (None, Daily, Weekly, Monthly, Yearly)
      • Interval input (with updated unit display)
      • Weekly options (day checkboxes) using RRule weekdays
      • Monthly options with “day” or “weekday” modes, including set position selectors for nth weekday patterns
      • Yearly options (month and day)
      • End conditions (never, until date, or count)
  – Update methods to reflect changes immediately in a human-readable summary.

• Update task creation and editing flows:
  – In TaskCreationModal (src/modals/TaskCreationModal.ts), replace the recurrence dropdown with the new rrule builder and adapt logic to store recurrence as an rrule string.
  – In TaskEditModal (src/modals/TaskEditModal.ts), support both new rrule strings and legacy RecurrenceInfo objects by converting legacy data to rrule.
  – Adjust validation logic (e.g. ensuring weekly recurrence has selected days, monthly recurrence has valid day or weekday configuration, etc).

• Update UI elements and helper functions:
  – Modify TaskCard (src/ui/TaskCard.ts) to display a recurrence indicator that shows “rrule” if the recurrence is in the new format.
  – Update helper functions (src/utils/helpers.ts) to include:
      • isDueByRRule for checking occurrences of rrule-based tasks
      • generateRecurringInstances for generating recurrence dates using rrule
      • convertLegacyRecurrenceToRRule, which converts legacy RecurrenceInfo objects to RFC 5545 strings

• Update settings and type definitions:
  – Add a setting flag (recurrenceMigrated) in settings to track whether migration has been performed.
  – Adjust RecurrenceInfo types (src/types.ts) to allow recurrence to be a legacy object or an rrule string.

This commit lays the foundation for a more powerful, standards‑compatible recurrence system while ensuring a seamless user experience through background migration of legacy data.
2025-06-23 20:11:14 +10:00
Amith KK
096ea302ab Add task previews to reading mode 2025-06-21 17:46:21 +05:30
Callum Alpass
bb3030af03 release 3.4.0 2025-06-15 22:59:24 +10:00
Callum Alpass
32e6763a45 release 3.3.0 2025-06-15 15:37:13 +10:00
Callum Alpass
a5147e3d40 feat(plugin): Add multi-month calendar support and integrated filter bar in AdvancedCalendarView
• Bump package version from 2.2.4 to 3.0.1 and add the new @fullcalendar/multimonth dependency in package.json and package-lock.json, ensuring proper resolution, integrity, and dependency relations.
• Import and integrate multiMonthPlugin in AdvancedCalendarView so the calendar now supports a multi-month year view along with existing day grid and time grid views.
• Update calendar initialization to include multiMonthPlugin in the plugins list and adjust headerToolbar to offer a 'multiMonthYear' view option.
• Incorporate a new FilterBar UI component into the AdvancedCalendarView header:
  – Initialize a default filter query and attempt to restore saved filter state via viewStateManager.
  – Set up FilterBar with relevant options (advanced filters, search enabled, no grouping/sorting controls) and attach its cache refresh mechanism.
  – Listen to queryChange events from FilterBar to update currentQuery, persist the filter state, and trigger a refresh of calendar events.
• Modify the task fetching logic to retrieve tasks through the filterService (grouped tasks flattened for calendar use) instead of using the unfiltered task cache.
• Update view controls and toggles (scheduled tasks, due dates, time entries) UI elements to better reflect their purposes with concise labels.
• Revamp the CSS for the AdvancedCalendarView header:
  – Create a more flexible main row layout that accommodates both the filter bar and control toggles.
  – Improve responsiveness with adjustments for different viewport widths.
• Overall, these changes enhance the calendar’s functionality with multi-month support and improved filtering, delivering a richer user experience.
2025-06-13 20:42:43 +10:00
Callum Alpass
1f1f4370b0 Add Advanced & Mini Calendar Views, Unscheduled Tasks Modal, and CSS/styling updates
• Renamed and restructured calendar views:
  - Renamed the existing CalendarView to MiniCalendarView for better clarity.
  - Updated all references from CALENDAR_VIEW_TYPE to MINI_CALENDAR_VIEW_TYPE and renamed CSS classes accordingly.
  - Added a new AdvancedCalendarView incorporating FullCalendar plugins (dayGrid, timeGrid, interaction) that provides advanced event interactions (drag/drop, resizing, toggling time entries) with its unique CSS styling.

• Introduced new view support and commands in main.ts:
  - Updated imported view types in main.ts to include both MINI_CALENDAR_VIEW_TYPE and ADVANCED_CALENDAR_VIEW_TYPE.
  - Registered a new command “open-advanced-calendar-view” alongside the existing mini calendar activation.
  - Adapted activateCalendarView and getCalendarLeaf to reference the mini calendar view.

• Added UnscheduledTasksSelectorModal:
  - Created a new modal (src/modals/UnscheduledTasksSelectorModal.ts) that leverages obsidian’s FuzzySuggestModal to search unscheduled tasks.
  - The modal provides detailed task metadata, including priority, due date (with overdue/today indicators), and time estimates.
  - Implemented a highlight function for matching search terms and proper ARIA attributes for accessibility.
  - Added corresponding CSS (styles/unscheduled-tasks-selector-modal.css) for modal appearance and interactions.

• Updated package lock and project metadata:
  - Bumped project version from 0.1.0 (“chronosync”) to 2.2.4 (“tasknotes”).
  - Added new dependencies for @fullcalendar/core, @fullcalendar/daygrid, @fullcalendar/interaction, @fullcalendar/timegrid, along with preact for FullCalendar.

• Modifications and cleanup in CSS/styling:
  - Introduced new styles for AdvancedCalendarView in styles/advanced-calendar-view.css.
  - Made minor adjustments in agenda-view.css, filter-bar-bem.css, settings-view.css, and task-card-bem.css to remove redundant checkbox styles and update BEM class names for consistency.
  - Updated components.css to remove legacy checkbox styling.

• Overall improvements and integration:
  - Ensured proper integration with cacheManager and taskService for loading tasks and updating scheduling properties.
  - Added event listeners to refresh calendar events on data and task changes.
  - Improved accessibility features by updating instructional texts, aria attributes, and modal titles.

This commit provides enhanced calendar functionality with two separate views (mini and advanced), a refined unscheduled task selection experience, updated project metadata, and improved UI styling across multiple components.
2025-06-13 00:00:14 +10:00
Callum Alpass
b1c755ddfa Refactor plugin architecture and implement best practices
- Create modular folder structure
- Move classes to dedicated files
- Extract utility functions
- Improve error handling
- Apply Obsidian plugin guidelines
- Use setHeading for section headings
- Use Vault API instead of adapter where possible
- Simplify codebase with fewer console logs
- Update frontmatter processing to use FileManager.processFrontMatter
2025-05-18 11:50:16 +10:00