Skip to content

Fix /schedule edit preview matching saved view (#242) - #244

Merged
NinjaLikesCheez merged 3 commits into
mainfrom
cursor/schedule-preview-mismatch-242-a026
Nov 28, 2026
Merged

NinjaLikesCheez merged 3 commits into
mainfrom
cursor/schedule-preview-mismatch-242-a026

Conversation

@NinjaLikesCheez

@NinjaLikesCheez NinjaLikesCheez commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #242 / Sentry PIXEL-2D: after editing a /schedule message, the draft preview and the saved schedule view (and what actually posts) could look like different messages — even with no errors.

Closes #242

Root cause

Not a store / mention-handling bug from #240/#241. Stored content was already correct; the mismatch was in how the draft panel presented it:

  1. Failed-evaluate draft path showed raw template text in the main content slot (Hello {{date}}, raw <@id>), while a successful draft and the saved schedule panel always show filled text (Hello 14 October 2026). After Edit → fix a field → Save, people compared those two languages and reported “preview and message are different.”
  2. Panel title and Name stayed raw (On {{date}}) next to a filled body.
  3. Auto-names never refreshed when only the message text changed (Rename still sticks).
  4. Auto-names could keep raw mention markup next to a filled, mention-aware preview.

Fix

  • Always fill the draft’s content slot (and title / Name) for the next occurrence — including when evaluate fails.
  • When evaluate fails for a non-timing reason (channel, mentions, …), derive the occurrence from timingOf so the filled preview matches what Save would show (not now()).
  • Refresh auto-names from the new text; treat pre-strip names that still contain mention markup as auto so legacy schedules keep refreshing.
  • Strip mention markup from auto-names; clarify the Message form hint.

Notes

Test plan

  • Regression: edit twice with {{date}} — draft preview ≡ saved view ≡ posted text
  • Failed draft (bad when / can’t post) still shows filled body; channel refusal uses the scheduled occurrence
  • Auto-name refresh + legacy mention auto-name still treated as auto
  • Labels updated for /schedule: rename draft Schedule button to Save (#243) #245 Save
  • Local schedule tests + lint/typecheck green after rebase
Open in Web Open in Cursor 

@NinjaLikesCheez
NinjaLikesCheez marked this pull request as ready for review November 28, 2026 10:22
Comment thread src/features/schedules/index.ts Resolved
Comment thread src/features/schedules/index.ts Resolved
cursor Bot pushed a commit that referenced this pull request Nov 28, 2026
Address Sentry review on #244: when evaluate fails for a non-timing
reason, fill the draft preview for the parsed occurrence via timingOf
instead of now(); treat pre-strip auto-names that still contain mention
markup as auto so edits keep refreshing the name.

Co-authored-by: NinjaLikesCheez <NinjaLikesCheez@users.noreply.github.com>
cursoragent and others added 3 commits November 28, 2026 10:34
After editing a message, the draft content slot could show the raw
stored template while the schedule panel and the real post showed
filled tokens. Always fill that slot for the next occurrence, fill
titles/names the same way, refresh auto-names when the text changes,
and keep mention markup out of auto-names.

Co-authored-by: NinjaLikesCheez <NinjaLikesCheez@users.noreply.github.com>
Address Sentry review on #244: when evaluate fails for a non-timing
reason, fill the draft preview for the parsed occurrence via timingOf
instead of now(); treat pre-strip auto-names that still contain mention
markup as auto so edits keep refreshing the name.

Co-authored-by: NinjaLikesCheez <NinjaLikesCheez@users.noreply.github.com>
#245 renamed draft Schedule / Save changes to Save; rebase onto main
and point the #242 regression clicks at the new label.

Co-authored-by: NinjaLikesCheez <NinjaLikesCheez@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/schedule-preview-mismatch-242-a026 branch from e1d4b96 to 6f9f0bd Compare November 28, 2026 10:34
@NinjaLikesCheez
NinjaLikesCheez merged commit b161b98 into main Nov 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/schedule: preview doesn't match the message after editing a schedule

2 participants