fix(web): tolerant polling, objectURL cleanup, throttled pointermove
- home/detail video pollers no longer clearInterval on a single transient error (give up only after 10 consecutive failures), matching the agent page - agent page creates preview objectURLs inside useEffect so each has a matching revoke under strict-mode double-invocation - login pointermove throttled via rAF and skipped on coarse pointers - source-analysis.html: changelog entry for this hardening pass Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -116,11 +116,16 @@ export default function DetailPage() {
|
||||
|
||||
useEffect(() => {
|
||||
if (!job || !runningVideo) return
|
||||
let failures = 0
|
||||
const timer = window.setInterval(async () => {
|
||||
try {
|
||||
setJob(await getJob(job.id))
|
||||
failures = 0
|
||||
} catch {
|
||||
window.clearInterval(timer)
|
||||
// one transient 5xx / network blip must not freeze progress forever;
|
||||
// only give up after sustained failures
|
||||
failures += 1
|
||||
if (failures >= 10) window.clearInterval(timer)
|
||||
}
|
||||
}, 2600)
|
||||
return () => window.clearInterval(timer)
|
||||
|
||||
Reference in New Issue
Block a user