Commit graph

103 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
2b71938c30
Fix project update API to support clearing nullable fields (#961)
Resolves #960

The update_project endpoint now properly handles clearing nullable fields
(due_date_at, area_id, priority, image_url) when set to null or empty string.

Previously, sending an empty string would not clear the field. Now empty
strings are explicitly converted to null for database consistency.

Changes:
- Convert empty strings to null for nullable fields in project update
- Add tests for clearing due_date_at with null and empty string
- Apply same fix to area_id, priority, and image_url for consistency
2026-03-22 22:17:23 +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
3712d695fc
Show original task names for recurring tasks in search results (#914) (#915)
Recurring task templates had their names replaced with the recurrence
type label (e.g. "Weekly") in search results, making them unrecognizable.
Skip the display name transform when serializing tasks for search.
2026-03-06 08:57:10 +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
121cb70aa3
Fix deferred planned tasks not appearing in Today view after defer time (#892) 2026-03-03 12:52:53 +02:00
Chris
c656c2aa67
Fix bi-weekly+ recurring tasks reverting to weekly (#844) (#890) 2026-03-02 23:36:47 +02:00
Chris
1e69ae59cf
Fix cancelled control tasks and subtasks (#867) 2026-02-26 23:54:09 +02:00
Chris
45aec304a3
Fix project view due date timezone bug and recurring multi-weekday bug (#836) 2026-02-12 12:12:24 +02:00
Chris
6922bc8916
Set stalled projects active without tasks (#793) 2026-01-23 23:06:35 +02:00
Chris
d2a9a6dc5a
Fix subtask completion auto-completing parent task (#792) 2026-01-23 20:04:58 +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
b4de9c23eb
Fix recurrence occurences (#750) 2025-12-29 12:13:08 +02:00
Chris
d1296f1a90
Fix skipping month (#745) 2025-12-28 17:08:33 +02:00
Chris
454aed5f6c
Add defer until to upcoming (#739) 2025-12-28 08:39:21 +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
4d2ea4212c
Cleanup statuses (#724)
* Cleanup statuses

* Add more statuses

* Hide buttons

* fixup! Hide buttons

* Show subtasks on click

* Fix status button in taskdetails page

* fixup! Fix status button in taskdetails page

* fixup! fixup! Fix status button in taskdetails page

* Fix today planned query
2025-12-19 11:13:27 +02:00
Chris
a8548b045b
Introduce sort utils (#709)
* Introduce sort utils

* Fix test issues
2025-12-14 01:13:57 +02:00
Chris
819faf0d18
Feat telegram notifications (#692)
* Add telegram notifications

* fixup! Add telegram notifications

* Cleanup
2025-12-09 20:26:53 +02:00
Chris
b0b613f7bd
Reorder elements (#687)
* Reorder elements

* Enhance global search
2025-12-09 10:51:51 +02:00
Chris Veleris
6466f6ae00 Fix an issue with attachment permissions 2025-12-08 16:33:49 +02:00
Chris
e3dcb49efa
Fix bug 661 (#682)
* Limit project card text length

* Fix projects issues

* fixup! Fix projects issues
2025-12-08 16:14:10 +02:00
Chris
17b2ca29cd
Fix sequelize issue (#678)
* Fix sequelize issue

* fixup! Fix sequelize issue
2025-12-08 11:27:00 +02:00
Chris
3796324675
Feat add inbox flow (#676)
* Replace quick capture

* Transfer to inbox

* Fix inbox edit

* fixup! Fix inbox edit

* fixup! fixup! Fix inbox edit

* fixup! fixup! fixup! Fix inbox edit

* fixup! fixup! fixup! fixup! Fix inbox edit

* fixup! fixup! fixup! fixup! fixup! Fix inbox edit

* Add long text

* fixup! Add long text

* fixup! fixup! Add long text

* fixup! fixup! fixup! Add long text

* fixup! fixup! fixup! fixup! Add long text

* fixup! fixup! fixup! fixup! fixup! Add long text

* fixup! fixup! fixup! fixup! fixup! fixup! Add long text

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! Add long text

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Add long text

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Add long text

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Add long text

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Add long text

* fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Add long text
2025-12-08 09:21:35 +02:00
Chris Veleris
bf9c8fa508 Add test coverage 2025-12-07 14:12:38 +02:00
Chris
8e71cadd9e
Fix bug 578 (#648)
* Fix user deletion

* fixup! Fix user deletion
2025-12-04 14:00:51 +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
0917c9e6f0
Fix bug 528 (#643)
* Add case for monthly recurring

* fixup! Add case for monthly recurring

* fixup! fixup! Add case for monthly recurring
2025-12-03 22:24:07 +02:00
Chris
270a80f71b
Fix an issue with tasks appearing in today without a flag (#640) 2025-12-03 16:48:47 +02:00
Chris
2d2a989a5f
Fix bug 619 (#629)
* Add tasks today plan fixes

* fixup! Add tasks today plan fixes

* fixup! fixup! Add tasks today plan fixes

* fixup! fixup! fixup! Add tasks today plan fixes
2025-12-02 18:00:36 +02:00
Chris
bfeffa069f
Fix an issue with task not completing in TaskDetails view (#620)
* Fix test issues

* Fix uid issue

* Fix id wrong param

* Fix test issues

* fixup! Fix test issues

* fixup! fixup! Fix test issues

* fixup! fixup! fixup! Fix test issues

* fixup! fixup! fixup! fixup! Fix test issues
2025-11-30 14:51:49 +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
a1b9095bce
Fix tag hides task (#586)
* Fix limited tags fetch

* fixup! Fix limited tags fetch
2025-11-21 19:13:31 +02:00
Chris
01ba863372
Prevent duplicate generation (#560) 2025-11-17 22:22:59 +02:00
Chris
2a1769bd72
Fix smart view pagination (#557)
* Add pagination to smart views

* fixup! Add pagination to smart views

* fixup! fixup! Add pagination to smart views

* fixup! fixup! fixup! Add pagination to smart views
2025-11-17 18:39:14 +02:00
Chris
9e3b389d42
Fix cyrillic search (#556)
* Fix cyrillic alphabet search case sensitive

* fixup! Fix cyrillic alphabet search case sensitive
2025-11-17 17:32:41 +02:00
Chris Veleris
1848abd113 Add tests for subtask handling 2025-11-17 13:11:28 +02:00
Chris Veleris
c90be27b4a Add tests for subtask handling 2025-11-17 13:09:56 +02:00
Chris
b0041bafe1
Fix today recurring missing (#548)
* Expose today task from a recurring series

* fixup! Expose today task from a recurring series

* fixup! fixup! Expose today task from a recurring series
2025-11-16 18:00:39 +02:00
Chris
b6748aa0d7
Fix subtasks copy (#546) 2025-11-15 22:00:18 +02:00
Chris
6fb87ac80a
Feat refactor tasks pt1 (#536)
* Refactor swagger docs

* Scaffold refactor

* Refactor crud tasks

* fixup! Refactor crud tasks

* Break down task layout

* fixup! Break down task layout

* fixup! fixup! Break down task layout

* Cleanup comments

* fixup! Cleanup comments

* Cleanup obsolete code

* Remove helpers
2025-11-15 14:02:06 +02:00
Chris
bdc6e1e71f
API Access (#495)
* Scaffold API docs

* fixup! Scaffold API docs

* Add versioning

* Scaffold API Access

* fixup! Scaffold API Access

* fixup! fixup! Scaffold API Access

* Remove DEBUG logs, add tests

* fixup! Remove DEBUG logs, add tests

* Add rate limiter

* Only enable swagger in development

* Update docs

* fixup! Update docs

* fixup! fixup! Update docs

* Fix issue with markdown table headers
2025-11-07 15:19:30 +02:00
Chris
8bc951b0ff
Replace ?uid with /:uid (#482)
* Replace ?uid with /:uid

* fixup! Replace ?uid with /:uid
2025-11-04 14:29:31 +02:00
Chris
f5c3bf7e69
Prevent admin from seeing all tasks (#477)
* Prevent admin from seeing all tasks

* fixup! Prevent admin from seeing all tasks
2025-11-04 09:40:33 +02:00
Chris
00eda4b936
Fix/descriptive ai feat (#464)
* fix AI feature not working

* fixup! fix AI feature not working
2025-11-02 14:14:55 +02:00
Chris Veleris
c983ba42ba Fix an issue with completed tasks in views 2025-10-29 15:19:38 +02:00
Chris Veleris
ddaae04978 Set first user role as admin 2025-10-25 21:48:28 +03:00
Chris
5cf662d028
Fix tags deletion (#447)
* Add tag title validation and show icons

* fixup! Add tag title validation and show icons
2025-10-23 23:28:56 +03:00