Skip to content

feat: refine Smart refresh detection with provider activity observations - #46

Merged
victorhqc merged 1 commit into
mainfrom
feat/improved-refresh-detection
Jul 29, 2026
Merged

feat: refine Smart refresh detection with provider activity observations#46
victorhqc merged 1 commit into
mainfrom
feat/improved-refresh-detection

Conversation

@victorhqc

Copy link
Copy Markdown
Owner

Summary

Smart refresh now reacts to explicit provider-reported usage, credit, and availability changes. It ignores presentation-only quota changes and reports safe diagnostic reasons.

Why

Display fields such as reset dates and labels caused false refresh activity. This change makes fast polling depend on semantic provider activity instead (core 09).

What changed

  • Added provider-neutral activity observations and structured Smart refresh decisions.
  • Updated Claude Code, Cursor, DeepSeek, OpenAI Codex, and z.ai mappings.
  • Expanded refresh intervals to 1–60 minutes and 10–60 seconds in five-second steps.
  • Added Core, App, and provider mapping tests.

Notes for review

  • Review stable metric IDs and provider-specific activity mappings.
  • Missing or unknown observations are handled conservatively.

Add ProviderActivityObservation with stable metric IDs,
usage/credits kinds, and availability. Attach to ProviderQuota
and update all providers to emit semantic activity metrics.
Replace UsageSnapshot with canonical comparison returning a
structured Decision. Expand slow interval options to every
minute 1–60 and fast options to 5-second steps 10–60.
@victorhqc
victorhqc merged commit aaf8c87 into main Jul 29, 2026
1 check passed
@victorhqc
victorhqc deleted the feat/improved-refresh-detection branch July 29, 2026 08:30
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