Skip to content

fix(ui): 账号页限额 chip 改为按扫描间隔拉取并保留上次台账 - #120

Open
Demons12341 wants to merge 1 commit into
changexbc:mainfrom
Demons12341:fix/accounts-rate-limit-chip
Open

Demons12341 wants to merge 1 commit into
changexbc:mainfrom
Demons12341:fix/accounts-rate-limit-chip

Conversation

@Demons12341

Copy link
Copy Markdown
Contributor

旧逻辑按 payload 的 scannedAt 判断「距上次扫描 ≥ 5 分钟」才发请求:导致「距上次扫描不足 5 分钟时进页面」拿不到台账,chip 要等到下一个轮询周期才出现;另外请求失败会把 chip 全部清空(一次瞬时失败就全没了)。

改为:

  • 刷新间隔 5min → 1min(后端命中缓存时该接口是廉价的,真正的日志扫描在后端按 5 分钟节流)
  • 新增 RATE_LIMIT_FETCH_FLOOR_MS = 20s,只做防抖(可见性抖动 / 重挂载 / 事件风暴),不参与「要不要显示」
  • 请求失败保留上一次的台账(首次加载 map 本就为空,保留也不会误显示)

This branch has not been deployed

No deployments
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