Repository navigation
site: refresh Stats and Activity on a timer - #550
Merged
Merged
Conversation
Follow-up to #549, which made liveData support timed refetch but only opted in CurrentlyTending. Stats and the Activity feed had the same fetch-once staleness: leave the tab open and "to date" totals never move, and a finished tending job's elapsed timer in the feed keeps incrementing forever because the row is never replaced by its settled representation. - Stats: opt into intervalMs at 5 min. Render is already idempotent (replaceChildren), no structural change. - Activity: opt in at 60s, and hoist setInterval(updateTendingTimes, 1000) out of the render callback to a single module-level ticker. It no-ops when no tending rows exist, so always-on is trivially cheap — and it can no longer stack a new interval on every refresh. The 60s refetch is what actually settles finished jobs (they drop out of /currently-tending and re-render as pr/review rows or age out). The transient-outage concern is covered by #547: the worker preserves the last good cached entry on a GitHub fanout failure, so a refetch during a blip gets stale-but-valid data, not null — refresh self-heals where fetch-once stayed hidden until reload. Co-Authored-By: Claude <[email protected]>
tend-agent
approved these changes
May 17, 2026
max-sixty
added a commit
that referenced
this pull request
May 17, 2026
## Summary Release 0.0.24. 11 PRs since 0.0.23: - #545 Rewrite the workflow generator on Jinja2 templates - #546 generator: switch build backend to uv_build - #544 generator: route install-test through `_apply_extras` - #535 install-tend: unify on the chain model (admin-gated refs + env policy pin) - #537 review-reviewers: migrate to the Codex harness - #551 debug-tend-run: support Codex session logs; instruct Codex to read skills in full - #552 review: stop re-posting "prior thread still applies" on every push - #547 fix(stats): stop blacking out the section on transient worker outage - #548 site: simplify "currently tending" to a prose repo list - #549 site: refresh "currently tending" on a 30s timer - #550 site: refresh Stats and Activity on a timer #551 and #552 are the reason for cutting now: together they stop the Codex harness re-posting near-identical "the prior thread still applies" reviews on every push. The behavior is release-gated, so it only reaches tend's own dogfooded workflows once 0.0.24 is published and the nightly regen repins the action ref. No new breaking changes since 0.0.23 (the `TEND_BOT_TOKEN` rename shipped in 0.0.23). ## Test plan - [ ] CI green (test, test-worker, lint) - [ ] After merge: tag `0.0.24`, PyPI publish (`pypi-release.yaml` on the tag push), `uvx [email protected] --help` works - [ ] Regenerate tend's own workflows to `@0.0.24` (separate `chore: regenerate` PR, after the tag exists) Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #549, which taught
liveDatato refetch on a timer but only opted inCurrentlyTending.Statsand theActivityfeed had the same fetch-once staleness:Changes
intervalMsat 5 min. Render is already idempotent (replaceChildren), no structural change needed. Slow-moving and no pulse, so a long period is fine.setInterval(updateTendingTimes, 1000)out of the render callback to a single module-level ticker. The old per-rendersetIntervalwould stack a new 1s interval on every refresh; the hoisted ticker no-ops when no tending rows exist, so always-on is trivially cheap. The 60s refetch is what actually fixes the forever-ticking timer — a completed job drops out of/currently-tendingand re-renders as a settledpr/reviewrow (or ages out).Transient-outage note
Covered by #547: the worker's stale-while-revalidate path preserves the last good cached entry on a GitHub fanout failure, so a client refetch during a blip gets stale-but-valid data (HTTP 200, real numbers), not
null. Only a true worker-down returnsnulland hides the section — and there the refresh self-heals on the next tick, whereas fetch-once stayed hidden until manual reload. Strictly better, not a regression.Verification
tsc --noEmitandnpm run buildclean. Not visually confirmed in a running browser (Chrome extension disconnected this session) — worth an eyeball of an actual feed refresh settling a finished job, alongside the same outstanding check for #549.