Repository navigation
Harden dashboard task freshness reconciliation - #8156
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c53437ae04
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if record.dueAt != item.dueAt { | ||
| record.dueAt = item.dueAt |
There was a problem hiding this comment.
Preserve optimistic due-date edits during dashboard refresh
When a user changes or clears a due date and a dashboard refresh runs before the PATCH has completed or propagated, syncTaskActionItems still skips the older server row via the 60-second optimistic-update guard, but this new reconciliation immediately writes the stale server dueAt back anyway. That can undo the local-first edit that TasksStore.updateTask deliberately preserves on API failure, or at least make the task jump back to the old dashboard bucket until another successful sync arrives.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c8b26c51d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if record.completed != item.completed { | ||
| record.completed = item.completed | ||
| changed = true |
There was a problem hiding this comment.
Preserve optimistic completion toggles during refresh
When a user toggles a task and a dashboard refresh overlaps the in-flight PATCH, syncTaskActionItems still skips the stale server row because updateCompletionStatus just set updatedAt, but this new reconciliation immediately applies the older server completed value anyway. In that scenario the task can jump back into the dashboard until the PATCH response or a later sync arrives, defeating the 60-second optimistic-update guard that explicitly protects toggles.
Useful? React with 👍 / 👎.
c7f01e6
into
BasedHardware:codex/desktop-startup-warmup-performance
Summary
Testing
git diff --checkxcrun swift package --package-path Desktop describe --type jsonxcrun swiftc -parse Desktop/Sources/Stores/DashboardTaskRefreshPolicy.swift Desktop/Sources/Stores/DashboardTaskRefreshService.swift Desktop/Sources/Rewind/Core/ActionItemStorage.swift Desktop/Tests/DashboardTaskRefreshPolicyTests.swift Desktop/Tests/ActionItemStorageVisibilityReconciliationTests.swiftxcrun swift test --package-path Desktop --filter 'DashboardTaskRefreshPolicyTests|ActionItemStorageVisibilityReconciliationTests'; blocked while downloading SwiftPM binary artifacts with duplicate GitHub keychain entries, then killed after ~5m\n\nFixes Desktop: harden dashboard task freshness reconciliation #8124\n\nStacked on [codex] Improve desktop startup warmup performance #8013 becauseDashboardTaskRefreshServiceis introduced there.