tasks: support custom recurrence intervals (every N days/weeks, monthly) #57
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
tasksmodule currently only supports two recurrence patterns:dailyweekly(with a fixed weekday)Real chore lists need richer cadences. From the paca/duck/puppy chore brief:
There's no way to express "every N days" or "every N weeks" or "monthly" today, so users have to either log it manually each time or pick the closest fixed cadence.
Scope
Extend the recurrence model and its publish/sync paths to support:
every-n-dayswithn: integer(e.g. every 3 days)every-n-weekswithn: integerandday_of_week: string(e.g. every 2 weeks on Monday)monthlywithday_of_month: 1..31 | "last"dailyandweeklyworking as shorthands forevery-n-days{n=1}andevery-n-weeks{n=1}(or just translate them at the boundary — TBD by client preference)Webapp surface (
src/modules/tasks)RecurrencePatterninterface inTaskService.ts(currently{ frequency: 'daily' | 'weekly', dayOfWeek?, endDate? }) extends withinterval: numberanddayOfMonth?: number | "last".doesRecurringEventOccurOnDateinTaskService.tslearns the new patterns.Lnbits side (aiolabs/tasks)
models.Recurrenceand the publisher's["recurrence", ...]tag emission.Tag convention (proposed)
Stay close to iCalendar-ish RRULE semantics without inventing too much:
["recurrence", "every-n-days"]+["recurrence-interval", "<n>"]["recurrence", "every-n-weeks"]+["recurrence-interval", "<n>"]+["recurrence-day", "<weekday>"]["recurrence", "monthly"]+["recurrence-day-of-month", "<1..31|last>"]["recurrence-end", "<YYYY-MM-DD>"]stays as-is.Open question: do we just lift RRULE itself instead and accept a single
["rrule", "FREQ=WEEKLY;INTERVAL=2;BYDAY=MO"]tag? Cleaner long-term, more parsing work short-term.Related
["event-type", "task"].Labelling note
There's no
app:taskslabel on this repo yet (onlyapp:activities,app:chat,app:marketplace,app:wallet,app:webapp). Filing withapp:webapp+enhancementfor now. Worth creatingapp:tasksso this module's issues are discoverable like the other standalones.