Repository navigation
fix(events): preserve event color during pending recurring time edits - #5189
Merged
Merged
Conversation
Align optimistic replace color merging with sync mergeUpdateContent so schedule-only edits no longer strip provider colorHex or slot fills while the write is in flight. Native draft optimistic payloads use the same rules. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Contributor
|
Boot bundle: 572.7 KB gzip (+0.0 KB vs main) |
Refresh loadedEvents from the repository as soon as replaceOptimistic writes the cache, instead of rebuilding from stale rows after draft commit. Resolve draft overlay fills from slot hex so coral-style Google events do not fall back to gray during drag or save. Add native regression tests and broaden web/sync pending color coverage for thisAndFollowing/all scopes and explicit user color clears. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Document that Google colorId 4 lands as coral slot (salmon #E67C73 via EventColorSlotHex), not stored colorHex. Add NativeCalendarRootModel tests for keyboard nudge overlay and in-flight replace fill + schedule. Correct stale-cache test naming; allow injecting EventsAPI in test env. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Tyler’s macOS report: recurring Google “Devotion” turns default gray while a time replace is pending; siblings stay colored.
Google sync shape (Devotion):
googleColorIdToSlot("4")→ Compass slotcoral; fill at render isEventColorSlotHex.hex(.coral)→#E67C73. Stored ascontent.color: "coral"(slot), notcolorHex, unless the event useseventLabelIdcustom labeling instead ofcolorId.Web (kept): optimistic merge +
mergeEditableContentColor; strip-before-merge for explicit slot clears.macOS (Tyler’s repro):
editDraftcopiescolor: coral; old overlay setcolorHex = nilwhendraft.color != nil→fillColorHex == nil→ default gray during drag/keyboard/form pending.presentationColorHexfixes that. StaleloadedEventsafter commit keeps salmon at the old start time (not gray);presentOptimisticCachemoves time + color together while replace is in flight.Root cause evidence
color: nullwipedcolorHexin optimistic mergepresentOptimisticCacheFails on
main:NativeCalendarRootModelPendingRecurringColorTests(keyboard + form edit overlays);EventsStorePendingPresentationColorTests.testDraftOverlayResolvesSlotColorBeforeSave.Verify
Head:
d83e0bf83d46d2ee285613df2f12eb87c3570dbeCI on
d83e0bf83: Unit (required), E2E (required), static, swift-packages, macos-build green (last poll).