fix: keep manual refresh responsive#2036
Conversation
|
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. |
1bf3e3f to
3c52a77
Compare
|
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. |
3c52a77 to
a08e1f6
Compare
|
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 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 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 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 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 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 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 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 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. |
Summary
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 --checkswift test --filter 'AdaptiveRefreshTimerTests|StatusMenuPersistentRefreshTests'swift test --filter 'UsageStoreManualTokenRefreshTests|StatusMenuMergedOverviewRefreshTests'swift test --filter 'StatusMenuManualRefreshEnrichmentTests|StatusMenuPersistentRefreshTests'