fix(03): IN-01 document RRULE_PRESETS lossy round-trip v1 limitation

This commit is contained in:
Lucas Berger
2026-06-09 11:05:50 -04:00
parent fd13852eb9
commit f95760e6c6
+10
View File
@@ -35,6 +35,16 @@ export interface NewEventParams {
/** /**
* Simple RRULE preset strings for whole-series recurring events (D-11 / CAL-07). * Simple RRULE preset strings for whole-series recurring events (D-11 / CAL-07).
* "weekly on Monday" example: 'FREQ=WEEKLY;BYDAY=MO' (not a key in this map; compose manually). * "weekly on Monday" example: 'FREQ=WEEKLY;BYDAY=MO' (not a key in this map; compose manually).
*
* IN-01 (v1 limitation — lossy round-trip): these presets map only to a BARE
* FREQ=DAILY|WEEKLY|MONTHLY|YEARLY. extractRruleString() preserves the FULL stored RECUR
* (which may carry BYDAY/INTERVAL/COUNT/UNTIL), and the preserve-on-edit path keeps that
* rich rule. But if a `recurrence` preset value is ever applied to a previously-rich rule,
* it COLLAPSES the rule to the bare preset — silently dropping BYDAY/INTERVAL/UNTIL/COUNT.
* This is acceptable in v1 only because the picker offers just these four bare presets and
* is disabled on edit (EventForm WR-01). When recurrence EDITING ships, do NOT replace the
* stored rule with a preset: parse the existing RECUR and modify it in place so qualifiers
* survive. See CR-01/WR-01 preserve paths for the precedent.
*/ */
export const RRULE_PRESETS: Record<string, string> = { export const RRULE_PRESETS: Record<string, string> = {
daily: 'FREQ=DAILY', daily: 'FREQ=DAILY',