Skip to content

Harden dashboard task freshness reconciliation - #8156

Merged
Git-on-my-level merged 2 commits into
BasedHardware:codex/desktop-startup-warmup-performancefrom
Git-on-my-level:fix/desktop-dashboard-task-freshness
Jun 24, 2026
Merged

Git-on-my-level merged 2 commits into
BasedHardware:codex/desktop-startup-warmup-performancefrom
Git-on-my-level:fix/desktop-dashboard-task-freshness

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jun 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • share/await an in-flight dashboard refresh so concurrent callers still reload local dashboard state
  • paginate dashboard freshness buckets instead of relying on offset=0 only
  • add a targeted authoritative visibility reconciliation path for completed/deleted/dueAt without overwriting user-edited task text

Testing

  • git diff --check
  • xcrun swift package --package-path Desktop describe --type json
  • xcrun 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.swift
  • attempted xcrun 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 because DashboardTaskRefreshService is introduced there.

Review in cubic

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +644 to +645
if record.dueAt != item.dueAt {
record.dueAt = item.dueAt

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +632 to +634
if record.completed != item.completed {
record.completed = item.completed
changed = true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit c7f01e6 into BasedHardware:codex/desktop-startup-warmup-performance Jun 24, 2026
1 check 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.

1 participant