Commit Graph

23 Commits

Author SHA1 Message Date
kolaente 44d01a0f82 refactor: rename parseTaskText module to quickAddMagic
Rename the frontend parsing module from `parseTaskText` to `quickAddMagic`
for clarity. The module handles much more than text parsing — it's the
core of the quick add magic feature. This rename makes its purpose
immediately obvious and aligns with how the feature is referenced
throughout the UI and documentation.

No logic changes — only directory/file renames and import updates.
2026-03-25 09:38:41 +00:00
kolaente 07b9742d98 fix: skip quick add magic parsing when text is wrapped in quotes
Closes go-vikunja/vikunja#2392
2026-03-23 17:34:56 +00:00
kolaente 8538b4c885 test: add failing tests for quote-escaped task text parsing 2026-03-23 17:34:56 +00:00
Claude cb81cf1aa8 refactor: reorganize quick add magic into focused modules
Split the monolithic parseTaskText.ts into a parseTaskText/ directory with
separate files for types, prefixes, prefix parsing, priority parsing, repeat
parsing, date parsing, and text cleanup. Moved parseDate.ts from helpers/time/
into the module since it's only consumed by the task text parser. Barrel export
in index.ts maintains backward compatibility — no consumer import changes needed.

https://claude.ai/code/session_01Aeo1ZunQUGKbWx2watMFdW
2026-03-22 20:47:10 +00:00
kolaente 77b8403c24 fix: iterate past rejected middle matches in matchDateAtBoundary()
When the first regex match is a rejected middle-of-text date, continue
searching for subsequent matches instead of returning null. This fixes
cases like "The 9/11 Report due 10/12" where 9/11 is rejected but
10/12 at the end should still be parsed.
2026-02-06 10:57:50 +01:00
kolaente 3f0bf71d30 fix: allow middle-of-text dates when followed by time expressions (#2195)
Reworked matchDateAtBoundary() to use a single regex pass instead of
two-pass start/end anchoring. Middle-of-text matches are now accepted
when followed by a time expression (at/@ prefix), so inputs like
"meeting 9/11 at 10:00" still parse correctly while "The 9/11 Report"
is rejected.
2026-02-06 10:57:50 +01:00
kolaente c544886524 test: add positive boundary tests for date parsing (#2195) 2026-02-06 10:57:50 +01:00
kolaente 829b10bfd2 test: add dot-separated middle-of-text date false positive test (#2195) 2026-02-06 10:57:50 +01:00
kolaente a82efa01b5 fix: restrict numeric date regex matching to text boundaries (#2195) 2026-02-06 10:57:50 +01:00
kolaente e9b10e67f3 test: add failing tests for middle-of-text date false positives (#2195) 2026-02-06 10:57:50 +01:00
kolaente 131f78277d feat(quick add magic): add more test cases 2026-01-24 00:00:46 +01:00
kolaente 8419794b65
fix(quick-add-magic): prevent parsing partial keywords in words (#2140)
- Fixed date parser incorrectly extracting date components from within
words
- "Renovation - 2nd Floor Bath" no longer becomes "Reation - Floor Bath"
with a due date of November 2nd

## Changes
- `getMonthFromText` now requires word boundaries, preventing "nov" from
matching inside "Renovation" or "mar" inside "Remark"
- `getDayFromText` now only matches ordinals when followed by
end-of-string, time expressions, or month names, preventing "2nd Floor"
from being parsed as a date

Resolves
https://community.vikunja.io/t/quick-add-magic-unintended-date-parsing/4259
2026-01-23 22:23:42 +00:00
kolaente 1f1e0b227d
fix(date parsing): 12pm/12am edge case
Fixes a regression introduced in
c2e224dbb1
2025-10-08 18:35:11 +02:00
kolaente c2e224dbb1
fix: correct case-sensitivity in duedate time parsing (#1613)
Co-authored-by: mechanarchy <1166756+mechanarchy@users.noreply.github.com>
2025-10-08 16:24:54 +00:00
kolaente fc55563ddd
fix: strip label syntax with parentheses from task title (#1300) 2025-08-17 15:05:55 +02:00
Finn Weigand fbec58a50b
feat: allow to write date via Quick Add Magic in DMY format with dots (#744)
Co-authored-by: Hudint Finn Weigand <dev@hudint.de>
2025-05-09 13:08:17 +00:00
Harry Martland 8dfb34c863 feat: add tonight as a quick add date option (#2866)
Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2866
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Harry Martland <HarryEMartland@gmail.com>
Co-committed-by: Harry Martland <HarryEMartland@gmail.com>
2024-11-26 10:46:09 +00:00
kolaente 703c641aeb fix: lint issues 2024-10-29 09:57:53 +00:00
kolaente 92cdf5fe9c
fix(quick add magic): assume today when no date was specified with time 2024-06-06 21:44:29 +02:00
kolaente b0db3ce34c
fix(quick add magic): parse full month name as month, do not replace only the abbreviation
Resolves https://kolaente.dev/vikunja/vikunja/issues/2320
2024-05-05 14:14:30 +02:00
kolaente 6641cbebc2
fix(project): save the last 6 projects in history, show only 5 on desktop
The project grid on the home page with the recently visited projects now contains an even number of projects which makes for a much nicer grid (because it's now uniform).
2024-04-07 14:34:18 +02:00
kolaente 1910f69392
fix(test): correctly mock localstorage in unit tests 2024-04-06 10:34:41 +02:00
kolaente fc4676315d
chore: move frontend files 2024-02-07 14:56:56 +01:00