Commit graph

841 commits

Author SHA1 Message Date
Chris
e80847b01f
Fix project name overflow and add 6-word validation limit (#972)
* Fix project name overflow and add validation

This commit addresses issue #971 by implementing both UI fixes and
validation to prevent excessively long project names.

Changes:
1. Add word-break and line-clamp to ProjectBanner.tsx to handle
   overflow gracefully with line-clamp-3 for names
2. Add frontend validation in ProjectModal.tsx limiting names to
   6 words maximum
3. Add backend validation in project.js model with custom wordCount
   validator
4. Show user-friendly error messages when validation fails

This ensures project names remain concise and UI-friendly while
preventing the extreme overflow cases that were possible before.

Fixes #971

* Add overflow-hidden to make line-clamp work properly

The line-clamp utility requires explicit overflow-hidden to function
correctly. Without it, the text continues to display in full rather
than being truncated with ellipsis.

* Fix line-clamp using inline CSS styles

Tailwind's line-clamp utilities weren't working, so switched to using
inline styles with the standard CSS approach:
- display: -webkit-box
- -webkit-line-clamp: 3
- -webkit-box-orient: vertical

This ensures the text truncation works reliably across browsers.

* Use Tailwind line-clamp utilities (already defined in CSS)

The project already has line-clamp-1/2/3 utilities properly defined
in tailwind.css with all the necessary webkit properties. Simplified
the component to use these existing utilities instead of inline styles.

* Add dedicated CSS classes with !important for line-clamp

Created custom project-name-clamp and project-desc-clamp classes
with !important flags to ensure they override any conflicting styles.
This should finally fix the text truncation issue.

* Use component-scoped styles for line-clamp

Adding inline style tag in the component to ensure the line-clamp
CSS is definitely loaded and applied. This bypasses any potential
issues with external CSS compilation or loading order.

* Change project name line-clamp from 3 to 2 lines

Limiting project name display to 2 lines with ellipsis for better
visual density and cleaner appearance.

* Increase line-height for project name in banner

Added line-height: 1.3 to project name for better readability
and visual spacing between lines.
2026-03-24 17:36:24 +02:00
Chris
402d5b05e1
Fix Today page task completion issues (#970)
* Fix Today page task completion issues

- Fix completed task border color staying as priority color
  - Add isInCompletedSection prop to TaskItem for explicit completed state
  - Tasks in completed section now always show green border regardless of priority
  - Fixes race condition where status wasn't updated during optimistic UI update

- Fix completed task reappearing after unmarking and page refresh
  - Add defensive check in backend to force clear completed_at when status is not DONE
  - Add development logging in tasksService for debugging completion toggle
  - Ensures database state is consistent even if handleCompletionStatus doesn't clear it

- Update TaskList and TasksToday components to pass isInCompletedSection prop
  - Explicitly marks tasks rendered in the completed section
  - Prevents border color flickering during state transitions

* Add comprehensive logging to debug completion issues

* Fix duplicate API requests causing completion state issues

- Separate state update logic from API call in handleTaskUpdate
- Create new updateTaskInState function for state-only updates
- Pass onTaskCompletionToggle to completed section to avoid duplicate calls
- This fixes the persistence issue where unmarked tasks came back after refresh
- Completion toggles now only make ONE API call instead of two

* Add debug logging to updateTaskInState
2026-03-24 16:45:31 +02:00
Chris
bdeb5bbc32
Fix Telegram notification spam by marking JSON field as changed (#969)
Fixes issue where Sequelize wasn't detecting changes to the
channel_sent_at JSON field, causing markChannelAsSent() to not
persist updates to the database.

This caused the same notification to be sent via Telegram every
15 minutes (on each scheduler run) because the rate limiting
timestamp was never saved.

The fix adds this.changed('channel_sent_at', true) before save()
to explicitly mark the field as modified, which is required for
Sequelize to detect changes to JSON fields.

Impact: Reduces duplicate Telegram notifications from every 15min
to at most once per 24 hours per task.
2026-03-24 14:30:31 +02:00
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
22349fb46f
Fix visual overlap between subtasks icon and status dropdown (#958)
* Fix visual overlap between subtasks icon and status dropdown

Increased right padding from pr-44 to pr-48 in TaskHeader desktop view
to prevent the subtasks toggle button from overlapping with the expanded
status dropdown icon.

Fixes #957

* Improve fix for subtasks icon and status dropdown overlap

- Removed flex-1 from task name container to prevent unnecessary expansion
- Wrapped SubtasksToggleButton in flex-shrink-0 div to maintain its width
- Increased right padding from pr-48 to pr-56 for better spacing
- This prevents the subtasks icon from overlapping with the status dropdown

Fixes #957

* Fix subtasks icon placement to be adjacent to task name

Moved SubtasksToggleButton to be directly after the task name within
the same flex container, instead of in a separate container. This positions
the icon immediately next to the task name on the left, rather than being
pushed to the right where it overlaps with the status dropdown.

Fixes #957
2026-03-22 12:12:28 +02:00
Chris Veleris
35aa94ae9d release: v1.0.0-rc.1 2026-03-21 19:27:37 +02:00
Chris
2444e36f47
Fix date format inconsistency in Task detail screen (#956)
* Fix date format inconsistency in Task detail screen (#938)

Replace browser-dependent toLocaleDateString() with explicit country-based
date formatting to ensure consistent date formats based on user's timezone.

Problem:
- User with English language + Greek timezone saw MM/DD/YYYY format
- Expected DD/MM/YYYY format based on timezone/country
- Browser's Intl.DateTimeFormat had incomplete locale support for
  combined locales like "en-GR"

Solution:
- Add country-to-format mapping in dateUtils.ts (60+ countries)
- New formatDateByCountry() for dates (DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD)
- New formatDateTimeByCountry() for datetimes with 24h time
- Update TaskDueDateCard and TaskDeferUntilCard to use new functions
- Uses date-fns for consistent cross-browser formatting

Testing:
- Added 40 comprehensive test cases covering all format types
- Verified with Greece (DD/MM), US (MM/DD), Japan (YYYY/MM/DD)
- All tests passing

Fixes #938

* chore: remove unused import in dateUtils.ts
2026-03-21 18:47:33 +02:00
Chris Veleris
84d30b5230 release: v1.0.0-dev.3 2026-03-20 16:56:15 +02:00
Chris
b63f684190
feat: Add MCP Integration with client-agnostic instructions (#953) 2026-03-20 16:55:49 +02:00
Chris Veleris
2d2bc15750 release: v1.0.0-dev.2 2026-03-19 20:26:41 +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 Veleris
471d29e495 release: v1.0.0-dev.1 2026-03-18 18:01:32 +02:00
debode
024ef0a522
fix: use getAssetPath() for logo images in Navbar and Login (#946)
Both Navbar.tsx and Login.tsx hardcode absolute paths for the logo
images ('/wide-logo-light.png', '/wide-logo-dark.png'). This breaks
when tududi is served behind a reverse proxy with a subpath, such as
Home Assistant ingress.

The getAssetPath() helper from config/paths already handles base path
detection (including HA ingress auto-detection), and Login.tsx already
uses it for the login graphic. This commit applies the same pattern to
the logo images.

Changes:
- Navbar.tsx: add getAssetPath to import, use it for logo src
- Login.tsx: use getAssetPath for logo src (was already imported)
2026-03-18 15:26:25 +02:00
Chris Veleris
e3a272afef Add db layout 2026-03-15 09:07:21 +02:00
Chris Veleris
a0b769164c Add LLM docs 2026-03-15 09:01:38 +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
f1ea7843a7
Fix date format inconsistency in Defer Until field (#941)
Fixes #938

The Defer Until field was using i18n.language directly instead of
resolveUserLocale(), causing it to display dates in MM/DD/YYYY format
(US default) regardless of timezone setting.

Now uses the same locale resolution pattern as the Due Date field,
which combines language with timezone-derived country code (e.g.,
"en" + Greek timezone → "en-GR" → DD/MM/YYYY format).

Changes:
- Import useMemo and resolveUserLocale
- Add displayLocale memo to resolve timezone-aware locale
- Use displayLocale instead of i18n.language in toLocaleString()
2026-03-14 08:04:00 +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 Veleris
25b11086e2 release: v0.89.0 2026-03-12 11:32:05 +02:00
Chris Veleris
6c6f2851f1 release: v0.89.0-rc.3 2026-03-10 18:44:43 +02:00
Chris
23131d686a
Fix sidebar toggle causing unnecessary task list reload (#888) (#937)
Remove isSidebarOpen from the useEffect dependency array and from the
API request parameters in Tasks.tsx. The sidebar visibility state has no
bearing on which tasks should be fetched, so toggling it should not
trigger a data re-fetch.
2026-03-10 18:37:07 +02:00
Chris
1a1b70b5e7
Fix subtask completion not persisting to backend (#920) (#936)
The toggle handler required onSubtaskUpdate callback to make the API
call, but TaskSubtasksCard never provided it. Extract a shared handler
that calls toggleTaskCompletion for persisted subtasks regardless of
whether onSubtaskUpdate is provided, falling back to updating local
state via onSubtasksChange.
2026-03-10 17:30:45 +02:00
Chris
c33682bac0
Fix subtask completion not persisting when onSubtaskUpdate is not provided (#920) (#932)
When toggling subtask completion in TaskSubtasksSection, the toggle handler
required onSubtaskUpdate callback to make the API call. Components like
TaskSubtasksCard don't pass this callback, so toggling fell through to the
local-only state update path, never sending a network request.

Add an intermediate code path: when the subtask is persisted but
onSubtaskUpdate is not provided, call toggleTaskCompletion() directly
to persist the change, then update local state.

Fixes #920
2026-03-10 17:23:29 +02:00
Chris
a01dd9f41c
Fix subtask icons invisible on Today page (#839) (#935)
The SubtasksToggleButton was placed inside the same flex container as
the task name with truncate, causing it to be squeezed to zero width.
Wrap the task name in an inner flex container (matching the upcoming
view layout) so the button stays visible.
2026-03-10 17:15:06 +02:00
Chris
45ea578393
Fix tag view showing completed projects when Open filter is active (#933) (#934) 2026-03-10 17:07:45 +02:00
Chris
20581c8178
Fix subtask ordering to prevent random reordering (#931)
Added proper ordering configuration (separate: true and order clause)
to subtask queries in query-builders.js. This ensures subtasks are
always returned in the correct order based on the 'order' field and
'created_at' timestamp, preventing the intermittent reordering bug
that occurred after checking subtasks as complete and reloading.

Fixes #921
2026-03-10 14:15:44 +02:00
Chris
7f7ffd8ac9
Fix subtask ordering to prevent random reordering (#930)
Added proper ordering configuration (separate: true and order clause)
to subtask queries in query-builders.js. This ensures subtasks are
always returned in the correct order based on the 'order' field and
'created_at' timestamp, preventing the intermittent reordering bug
that occurred after checking subtasks as complete and reloading.

Fixes #921
2026-03-10 00:17:26 +02:00
Chris
8fea7020bb
Fix: Show Projects with due dates in Upcoming view (#928)
* Add projects with due dates to upcoming view

Fetch and include projects with due_date_at in the upcoming range
when type=upcoming is requested. Projects are filtered by ownership
or permissions and exclude completed/archived projects.

Part of #925

* Display upcoming projects in Upcoming view

Add UI to show projects with due dates in the Upcoming view.
Projects are displayed in a separate section below tasks with
links to project details and formatted due dates.

Fixes #925

* Fix prettier formatting errors
2026-03-09 23:36:14 +02:00
Chris
358f577576
Fix note creation with project assignment (#927)
Transform project data in createNote to match updateNote behavior.
This ensures project_uid is properly extracted from nested project
object when creating notes with project associations.

Fixes #926
2026-03-09 23:14:44 +02:00
Chris
fbe9ce0703
Fix vulns (#918) 2026-03-08 16:47:53 +02:00
Chris
9f61bbbb21
Fix date format to respect timezone preference, not just language (#898) (#916)
Date fields in the task edit page used i18n.language (e.g. "en") to
determine date format, giving MM/DD for English even when the user's
timezone indicates a DD/MM region (e.g. Europe/Athens).

Enhance resolveUserLocale to derive the country from the user's
timezone and combine it with the language (e.g. "en" + "GR" = "en-GR")
so date formatting follows regional conventions.
2026-03-06 15:44:15 +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
DorianStrasser
d416c869f0
Prevent mobile zoom (#763) 2026-03-06 08:48:55 +02:00
Chris
3a1b4ca1b4
Load areas into store (#913) 2026-03-06 08:46:07 +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 Veleris
ad0f083886 release: v0.89.0-rc.2 2026-03-04 22:25:09 +02:00
Chris
3a3cb0bc36
Include task with subtasks (#907) 2026-03-04 21:44:45 +02:00
Chris
6812627a32
Update swagger (#906) 2026-03-04 18:47:48 +02:00
Chris
0bde44e460
Fix task name not being saved for new tasks (#905) 2026-03-04 18:13:37 +02:00
Chris Veleris
47d270b242 release: v0.89.0-rc.1 2026-03-03 18:07:50 +02:00
Chris
82f7427348
Fix security vulns (#895) 2026-03-03 18:07:36 +02:00
Chris
19b90ccc6a
Fix in-progress tasks not appearing in Today and All Tasks views (#894)
* Fix in-progress tasks not appearing in Today and All Tasks views

* fixup! Fix in-progress tasks not appearing in Today and All Tasks views
2026-03-03 17:11:13 +02:00
Chris
c3832464e2
Fix admin password update silently failing due to Sequelize VIRTUAL field (#893) 2026-03-03 15:44:41 +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
74d2027d17
Introduce focus mode in notes (#891) 2026-03-03 00:29:03 +02:00
Chris
c656c2aa67
Fix bi-weekly+ recurring tasks reverting to weekly (#844) (#890) 2026-03-02 23:36:47 +02:00
Chris
b81abd9bfe
Fix abandoned 'New Task' persisting when navigating away without changes (#889) 2026-03-02 18:28:54 +02:00
Chris Veleris
29aad09591 release: v0.89.0-dev.1 2026-03-02 17:47:24 +02:00