feat: sync request evidence refresh - #76
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e3b5dcdd3
ℹ️ 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".
| range={fixedWindow.requestEvidence.range} | ||
| data={requestEvidenceData} | ||
| isLoading={isRequestEvidenceLoading} | ||
| isRefreshing={isRequestEvidenceFetching && Boolean(requestEvidenceData)} |
There was a problem hiding this comment.
Keep sync signal active until trend refresh settles
这里的同步状态只看 Request Evidence 查询。共享 interval 同时触发 refetchCoreAnalytics() 和 refetchRequestEvidence(),但 React Query 会在每个请求各自完成时更新;当 /usage/events 先返回而 /analytics/core 仍在飞行时,卡片会立刻显示 “Synced with trend” 并可能展示新请求,而 Trend Workbench 仍是旧数据。请把 core analytics 的 fetching 状态也纳入,或等两者都 settle 后再标记为 synced。
Useful? React with 👍 / 👎.
Summary
Latest requestlabel with an accessible animated sync signalWhy
Trend Workbench and Request Evidence previously used separate query timers. They happened to share a 60-second interval, but there was no single refresh trigger or visible evidence refresh state.
Impact
Frontend-only and compatible. API contracts, backend behavior, navigation, and the Request Evidence 24-hour window are unchanged.
Verification
make lint-frontend test-frontend build-frontendnpm run test:e2e:mobilegit diff --check