Commit graph

8 commits

Author SHA1 Message Date
Chris
dcb711c515
fix(inbox): Fix tag/project autocomplete selection (#1043)
* fix(mcp): Include subtasks in get_task API response

Add Subtasks association to the findTaskByIdentifier function
so that the get_task MCP API endpoint returns subtasks along
with the main task. This enables clients to access the full
task hierarchy in a single API call.

The serializeTask function already supported subtasks
serialization, so this change only required updating the
query includes to load the Subtasks relation with proper
ordering and Tag associations.

Fixes #1029

* fix(inbox): Fix tag/project autocomplete selection

Fixes #996

Previously, when creating a task from inbox with autocomplete suggestions,
the tag/project replacement would fail if there was regular text before
the hashtag or plus sign. This caused two issues:

1. When typing "#technical_writing" and creating a task, the tag wouldn't
   be created or applied because the autocomplete wasn't replacing the input
2. When typing "#tech_" and selecting "technical_writing" from autocomplete,
   a new tag "tech_" would be created instead of applying the existing tag

This was caused by an overly restrictive condition in handleTagSelect and
handleProjectSelect that prevented replacement when there was regular text
before the tag/project marker.

Changes:
- Removed the allowReplacement condition that blocked autocomplete when
  regular text preceded the tag/project marker
- Simplified handleTagSelect and handleProjectSelect to always replace
  partial input when a suggestion is selected
- Added a space after the selected tag/project for better UX
2026-04-18 10:04:57 +03:00
Chris
6c9902b584
fix: add CSRF token support to frontend requests (#1025)
This commit implements CSRF token support for all session-based API
requests to fix the "CSRF token missing" and "CSRF token mismatch" errors
introduced after CSRF protection was added in commit 62c4cc84.

Changes:
- Created csrfService.ts utility for fetching and caching CSRF tokens
- Added getPostHeadersWithCsrf() helper to authUtils for async token injection
- Updated all service files (*Service.ts) to include CSRF tokens in POST/PUT/PATCH/DELETE requests
- Updated components with inline fetch calls to use getCsrfToken()
- Fixed CSRF middleware to use single lusca instance instead of creating new instances per request
- Improved generateToken() to use req.csrfToken() when available
- Added CalDAV path exemption to CSRF protection

Technical details:
- CSRF tokens are fetched from /api/csrf-token endpoint
- Tokens are cached and reused across requests to avoid unnecessary fetches
- Tokens are included in x-csrf-token header for state-changing requests
- Public endpoints (login, register) remain exempt from CSRF protection
- Bearer token authentication remains exempt from CSRF protection

Files modified:
- Backend: app.js, middleware/csrf.js
- Frontend: 13 service files, 8 component files
- New file: frontend/utils/csrfService.ts

This ensures all session-based requests properly include CSRF tokens while
maintaining support for API token authentication.
2026-04-14 15:06:56 +03:00
Chris
3ee54dbdc7
Fix an issue with breaking inbox input on long strings (#823) 2026-02-07 09:03:13 +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
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 Veleris
595252820e Move +Add to inbox top 2025-12-08 18:11:25 +02:00
Chris
3649e24448
Fix bug 677 (#679)
* Add lint-staged

* fixup! Add lint-staged
2025-12-08 12:06:27 +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