Commit graph

39 commits

Author SHA1 Message Date
Chris
077addadde
Fix recurring task initial due date calculation to match recurrence pattern (#965)
* Fix recurring task initial due date calculation to match recurrence pattern

Resolves #963

When creating a recurring task without an explicit due date, the system
was incorrectly setting it to "today" regardless of the recurrence pattern.
This caused issues where:
- Monthly tasks set to recur on a specific day (e.g., 28th) would show the
  wrong due date (today/yesterday instead of the 28th)
- Tasks wouldn't appear correctly in the Upcoming view
- The base due_date didn't match the recurrence_month_day setting

Changes:
- Add calculateInitialDueDate() helper to compute correct first occurrence
- For monthly recurrence with specific day: calculate next occurrence of that day
- For weekly recurrence with specific weekday: calculate next occurrence of that weekday
- For other types (daily, etc.): maintain current behavior (use today)
- Apply same logic to both task creation and updates

Tests:
- Add comprehensive test suite (9 new tests) covering:
  - Monthly recurrence with future day in current month
  - Monthly recurrence with past day (should use next month)
  - Weekly recurrence with specific weekday
  - Daily recurrence (should still default to today)
  - Edge cases (31st of month, explicitly provided dates)
  - Task updates adding recurrence

All 54 recurring task tests pass.

* Fix UTC timezone bug in recurring task expansion and add comprehensive tests

- Fix expandRecurringTasks() to use setUTCHours instead of setHours
- Add 42 unit tests for recurringTaskService UTC consistency
- Add 24 DST transition tests (spring forward/fall back)
- Verify no occurrence skips or duplicates during DST
- Test month-end handling, leap years, and timezone boundaries
2026-03-23 18:24:54 +02:00
Chris
11cd77bedd
Fix Telegram notification spam with channel-level rate limiting (#951)
* Fix Telegram notification spam with channel-level rate limiting

Addresses issue #950 where Telegram notifications were sent excessively
(96-288 messages per day per task) due to the delete-and-recreate pattern
added in commit 105a913a to fix navbar notification pile-up.

Changes:
- Add channel_sent_at JSON field to notifications table to track when
  each channel (telegram, email, push) was last sent
- Add helper methods to notification model:
  - markChannelAsSent(channel): Records send timestamp
  - wasChannelRecentlySent(channel, threshold): Checks if sent within 24h
- Modify sendTelegramNotification() to check rate limit before sending
- Update service layer (dueTaskService, deferredTaskService,
  dueProjectService) to preserve channel_sent_at when recreating
  notifications
- Add comprehensive unit and integration tests (20 tests, all passing)

Impact:
- Reduces Telegram notifications from 96-288/day to 1/day per item
- Preserves in-app notification refresh behavior (every 5-15 min)
- Maintains navbar pile-up fix from original commit
- Rate limit configurable (default: 24 hours)

Fixes #950

* Fix linting and formatting issues

* Fix integration test that was trying to access private function

* Fix prettier formatting in integration test
2026-03-19 20:26:11 +02:00
Chris
105a913a8d
Fix notification deduplication to prevent pile-up in navbar (#945)
* Fix notification deduplication to prevent pile-up in navbar (#944)

When tasks/projects remained pending for multiple days, duplicate
notifications accumulated in the navbar instead of showing only the
most recent one.

Updated notification services to properly handle existing notifications:
- Delete unread notifications before creating new ones
- Respect dismissed notifications (don't recreate)
- Respect read notifications (don't duplicate)

Changes:
- Updated dueTaskService, deferredTaskService, and dueProjectService
- Added comprehensive unit tests with 8 test cases

Fixes #944

* Fix lint errors and add GitHub bug template reminder to docs
2026-03-14 19:45:24 +02:00
Chris
1d5de49b48
Add URL detection to inbox processing service (#942)
* fixup! Fix date format inconsistency in Defer Until field

* fixup! fixup! Fix date format inconsistency in Defer Until field

* fixup! fixup! fixup! Fix date format inconsistency in Defer Until field
2026-03-14 08:43:41 +02:00
Chris
3486541272
Add comprehensive LLM development documentation (#939)
* Increase coverage

* Add comprehensive LLM development documentation

- Add CLAUDE.md as main documentation index
- Create 8 detailed documentation files in docs/:
  - architecture.md: Tech stack, data models, auth system
  - directory-structure.md: Complete file tree with paths
  - backend-patterns.md: Module architecture and patterns
  - database.md: Models, migrations, and workflows
  - development-workflow.md: Setup and daily development
  - code-conventions.md: Style guide and best practices
  - testing.md: Test organization and patterns
  - common-tasks.md: How-to guides for frequent tasks
- Update .gitignore to allow project-level CLAUDE.md
- 4,285 lines of comprehensive documentation
- Organized for easy navigation with cross-links
- LLM-optimized with absolute paths and code examples

* fixup! Add comprehensive LLM development documentation
2026-03-14 02:54:59 +02:00
Chris
aa686702e9
Fix defer date validation for recurring task instances (#910)
* Fix defer date validation for recurring task instances

* fixup! Fix defer date validation for recurring task instances
2026-03-05 08:20:30 +02:00
Chris
542be2c1e9
Fix bug 366 (#764)
* Optimize DB

* Clean up names

* fixup! Clean up names

* fixup! fixup! Clean up names
2026-01-07 18:18:07 +02:00
Chris
eee1bbc013
Fix bug 722 (#737)
* Fix project statuses

* Refactor project states

* Add translations
2025-12-28 07:51:15 +02:00
Chris
e73c354e7e
Fix bug 733 (#735)
* Refactor today

* fixup! Refactor today

* fixup! fixup! Refactor today
2025-12-27 21:00:52 +02:00
Chris
ad8ab3ec72
Fix refactor pt2 (#734)
* Cleanup task routes

* Cleanup frontend tasks

* Clean tasks

* Cleanup project uid

* Cleanup quick capture old modal

* Cleanup taskmodal

* Move all icons to shared components

* Test inbox flow

* fixup! Test inbox flow
2025-12-27 17:46:34 +02:00
Chris
819faf0d18
Feat telegram notifications (#692)
* Add telegram notifications

* fixup! Add telegram notifications

* Cleanup
2025-12-09 20:26:53 +02:00
Rafael Sargento
b3612dc0f2
changed ignore condition for telegram processing (#672) 2025-12-09 11:07:57 +02:00
Chris Veleris
bf9c8fa508 Add test coverage 2025-12-07 14:12:38 +02:00
Chris
cd6b810b08
Fix recurring structure (#646)
* Refactor recurring

* fixup! Refactor recurring

* Add after completion tests

* fixup! Add after completion tests

* fixup! fixup! Add after completion tests
2025-12-04 13:29:37 +02:00
Chris
18c7785b13
Feat notifications (#594)
* Add notifications for deferred and due tasks

* Cleanup

* fixup! Cleanup

* Add notifications settings

* ADd dismissed for notifications

* Beautify project cards

* fixup! Beautify project cards

* Fix an issue with icon badge

* Cleanup scripts

* fixup! Cleanup scripts
2025-11-25 21:16:21 +02:00
Chris
02b493d61f
Universal search (#412)
* Global search scaffold

* Add search preview text

* Add generic fallback for preview text in search

* fixup! Add generic fallback for preview text in search

* Add more tweaks

* fixup! Add more tweaks

* Fix an issue with criteria

* fixup! Fix an issue with criteria

* fixup! fixup! Fix an issue with criteria

* fixup! fixup! fixup! Fix an issue with criteria

* Fix an issue with priority filter

* fixup! Fix an issue with priority filter

* Add sortable pins

* fixup! Add sortable pins

* Make options collapsed by default

* Tweak UI

* Add tests

* Add translations

* Add more translations

* fixup! Add more translations

* Add minor tweaks
2025-10-22 22:00:45 +03:00
Chris Veleris
02633da704 Add tests 2025-10-22 15:56:48 +03:00
Chris
9d2b1895af
Feat/add project states (#354)
* Scaffold project states

* fixup! Scaffold project states

* Fix blinking project modal

* fixup! Fix blinking project modal

* fixup! fixup! Fix blinking project modal

* Fix an issue with the tag input autosuggest

* fixup! Fix an issue with the tag input autosuggest

* fixup! fixup! Fix an issue with the tag input autosuggest

* Add state to project details

* fixup! Add state to project details

* Add state indicator on project cards

* fixup! Add state indicator on project cards
2025-09-29 16:04:25 +03:00
Antonis
70956f9ecd
Change tags to use uids instead of ids. (#351)
* Small cleanups

* Change tags to use uid instead of id.

---------

Co-authored-by: antanst <>
2025-09-22 17:10:29 +03:00
Chris
d8cd794a0c
Small fixes (#320)
* Fix upcoming view

* Fix to show areas projects

* fixup! Fix to show areas projects

* Fix symbol validation for tags

* Add hash to allowed characters for tag names

* Fix project deletion constraints

* fixup! Fix project deletion constraints

* Fix search functionality in All Tasks view

* fixup! Fix search functionality in All Tasks view

* Fix task save not refreshing list
2025-09-12 12:39:03 +03:00
Chris Veleris
6910e6407b Fix test issues 2025-09-05 16:55:25 +03:00
Chris Veleris
d1f451da6a Limit users that can send to telegram bot 2025-08-14 18:00:57 +03:00
Chris Veleris
4d86549ac6 Convert classes to functions 2025-08-14 00:30:18 +03:00
Chris Veleris
f91b375079 Refactor Upcoming section and recurring setup 2025-08-13 19:00:37 +03:00
Chris Veleris
31b5672ba2 Fix timezone issues 2025-08-13 19:00:37 +03:00
Chris Veleris
27d41aaeed Setup slugify and fix nanoid issues 2025-08-08 23:14:40 +03:00
antanst
24c0354cbe Fix user service tests. 2025-07-31 14:02:42 +03:00
Chris Veleris
39fa47343e Fix lint issues
Fix test issues

Format fix
2025-07-23 12:22:06 +03:00
antanst
5123ca95e9 Lint and formatting fixes 2025-07-23 12:22:06 +03:00
Chris Veleris
3cf9fbe22b Add tests 2025-07-23 12:22:06 +03:00
Chris Veleris
35ac0d7852 Fix test issues 2025-07-23 12:22:06 +03:00
Antonis Anastasiadis
1e11ab5fa4
Add project sorting migration and a few tests (#192)
* Add necessary migrations for project model.

* Add a few tests for project model new columns.

---------

Co-authored-by: antanst <>
2025-07-22 13:10:10 +03:00
Chris Veleris
5b0130f52b Fix test issues 2025-07-01 14:43:42 +03:00
Chris Veleris
3e12dd999b Fix issue with project modal and the plus icon 2025-07-01 13:30:21 +03:00
Antonis Anastasiadis
e594d1075b
Linting cleanup (#99)
* Add eslint and prettier dependencies and configs

* Lint project.
2025-07-01 11:40:09 +03:00
Chris Veleris
8f5fd05926 Move recurring elements together 2025-06-20 12:04:36 +03:00
Chris
f3610137f0
Scaffold recurring task layout (#83)
* Scaffold recurring task layout

* Cleanup
2025-06-19 16:56:38 +03:00
Chris Veleris
f088fc9839 Fix test issues 2025-06-17 11:24:31 +03:00
Chris
3c1209a5a9
Express migration (#80)
* Initial migration

* Cleanup and create migration scripts

* Introduce test suite

* Fix test issues

* Correct CORS issue and update paths

* Update README
2025-06-16 21:50:44 +03:00