Skip to content

fix: keep manual refresh responsive#2036

Draft
Yuxin-Qiao wants to merge 1 commit into
steipete:mainfrom
Yuxin-Qiao:agent/manual-refresh-without-enrichment-wait
Draft

fix: keep manual refresh responsive#2036
Yuxin-Qiao wants to merge 1 commit into
steipete:mainfrom
Yuxin-Qiao:agent/manual-refresh-without-enrichment-wait

Conversation

@Yuxin-Qiao

@Yuxin-Qiao Yuxin-Qiao commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • stop overview manual refreshes from forcing the foreground token-cost/OpenAI enrichment path
  • keep fixed refresh timers anchored to scheduled tick times instead of refresh completion time
  • add regressions for non-blocking manual refresh completion and fixed-cadence advancement

Root cause

The overview manual refresh path called the store with forceTokenUsage: true, which made the visible refresh wait for token/cost history, credits, OpenAI web enrichment, and possible Codex follow-up work. Separately, the fixed-frequency timer slept for the configured interval only after each refresh completed, so slow provider work permanently stretched a 2-minute cadence into refresh duration plus 2 minutes.

Impact

Manual overview refresh now finishes when provider quota/status refresh work completes, while token/cost enrichment continues in the existing background path. Fixed-frequency refreshes keep their intended cadence without starting overlapping catch-up refreshes if one tick runs long.

Test

  • git diff --check
  • swift test --filter 'AdaptiveRefreshTimerTests|StatusMenuPersistentRefreshTests'
  • swift test --filter 'UsageStoreManualTokenRefreshTests|StatusMenuMergedOverviewRefreshTests'
  • swift test --filter 'StatusMenuManualRefreshEnrichmentTests|StatusMenuPersistentRefreshTests'

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@Yuxin-Qiao Yuxin-Qiao force-pushed the agent/manual-refresh-without-enrichment-wait branch from 1bf3e3f to 3c52a77 Compare July 10, 2026 14:42
@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@Yuxin-Qiao Yuxin-Qiao force-pushed the agent/manual-refresh-without-enrichment-wait branch from 3c52a77 to a08e1f6 Compare July 10, 2026 15:17
@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep manual refresh responsive This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

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