What happened?
hey! while linking journal dates with @ in a page, I noticed typing @next sa suggests Next Sunday instead of Next Saturday (and @last sa suggests Last Sunday instead of Last Saturday).
looking at suggestJournalDate in packages/frontend/core/src/modules/journal/suggest-journal-date.ts, nextWeekDates and lastWeekDates are checked in Sunday-first order using fuzzyMatch(date.alias, query, true), which matches any subsequence (n.*e.*x.*t.*s.*a.*). since "nextsunday" has an s followed by the a in "sunday", it matches Next Sunday first and returns before reaching Next Saturday (similarly @no matches Next Monday before reaching November).
is that intentional or should prefix/contiguous word matches take priority in suggestJournalDate? happy to put up a quick PR if you want!
ss
Distribution version
Web (https://app.affine.pro)
App Version
0.27.5
What browsers are you seeing the problem on if you're using web version?
Chrome
Are you self-hosting?
- Yes
Self-hosting Version
N/A
Relevant log output
N/AAnything else?
packages/frontend/core/src/modules/journal/suggest-journal-date.ts
Is your content generated by AI?
- I confirm that the content I submitted was not generated by AI / merely contained minimal AI edits.
Issue Status: 🆕 *Untriaged
*🆕 Untriaged
The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md
This is an automatic reply by the bot.