Skip to content

Fix pull-to-refresh so stale provider failures do not hide good usage#37

Merged
BlockedPath merged 1 commit into
mainfrom
codex/pulldownrefresh
May 25, 2026
Merged

Fix pull-to-refresh so stale provider failures do not hide good usage#37
BlockedPath merged 1 commit into
mainfrom
codex/pulldownrefresh

Conversation

@BlockedPath

Copy link
Copy Markdown
Owner

Summary

  • Isolate Codex and Claude refresh failures so one stale server URL does not poison the other provider.
  • Preserve the last good payload on transient or cancelled refreshes instead of swapping the UI to the error card.
  • Add unit coverage for mixed-provider failure and cancelled-refresh cases.

Testing

  • xcodebuild build-for-testing passed for the iOS app target.
  • Local device build and install were verified on the paired iPhone.
  • Added regression tests for provider isolation and refresh cancellation behavior.

@BlockedPath BlockedPath merged commit 2d39111 into main May 25, 2026
4 checks passed

@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: 70c2d70a5e

ℹ️ 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 +281 to 284
if hasCurrentPayload {
errorMessage = nil
await fetchDaemonStatus()
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Track payload by provider before suppressing refresh errors

This branch suppresses errors whenever any in-memory payload exists, but usageJSON is a single shared value and not tied to selectedProvider. After switching from Codex to Claude, if the Claude request fails, hasCurrentPayload is still true from the prior Codex fetch, so the method returns with errorMessage = nil and leaves stale Codex metrics visible under Claude-selected UI labels. This is a regression from the previous behavior (showing an unreachable-server error) and can mislead users with wrong-provider usage data.

Useful? React with 👍 / 👎.

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