Skip to content

site: live tending timer, merge in-flight runs into activity feed - #463

Merged
max-sixty merged 2 commits into
mainfrom
currently-tending
May 13, 2026
Merged

max-sixty merged 2 commits into
mainfrom
currently-tending

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Two changes that make the "currently tending" pulse provably real:

  • The hero line ticks elapsed time each second (tending repo · workflow · 0:42), driven by started_at. Live digits beat decorative text.
  • The hero is now an <a href="#recent-activity">, and the activity feed merges in-flight runs (kind: "tending") into the same time-ordered list — title links to the GitHub Actions run, time cell shows live elapsed, kind chip is a filled moss pulse. Click the pulse, land on the unified feed.

The shared m:ss / h:mm:ss formatter lives in site/src/lib/time.ts as elapsedTime(iso). A single setInterval updates every tending row.

Caveats:

  • One additional fetch (/currently-tending) from the activity section. The Worker caches both endpoints, so it's effectively free.
  • Anchor scroll only works once /activity has resolved and the section is no longer hidden. Sub-second normally; not papered over.

The hero "currently tending" line now ticks elapsed time each second
(driven by started_at), and the hero is an <a href="#recent-activity">
linking to the activity feed — which now merges in-flight runs as
top rows (kind: tending) alongside the existing PR/issue/review/comment
rows. Title links to the GitHub Actions run; time cell shows live
elapsed; kind chip is a filled moss pulse. Shared m:ss / h:mm:ss
formatter lives in lib/time.ts.

Co-Authored-By: Claude <[email protected]>

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding in CurrentlyTending.astro. The new setInterval(render, 1000) calls paint() each tick, and paint() does el.replaceChildren(dot, label) with a freshly-created .now-dot span. CSS animations restart from t=0 when the element is freshly inserted, so the dot's now-pulse 2.6s ease-in-out infinite animation is reset every second and never reaches the 50% keyframe (opacity 0.35) — the slow pulse is replaced by a barely-perceptible flicker. Updating just the label text avoids the issue; the dot pulse in Activity.astro's kind-tending rows is fine because updateTendingTimes only touches cell.textContent.

setInterval(render, 1000) called paint() which replaceChildren'd a fresh
.now-dot every second, restarting the CSS animation from t=0 — never
reached the 50% opacity keyframe, so the pulse read as a flicker. Paint
once, hold the label element, update only its textContent each tick.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 3fa38ea into main May 13, 2026
8 checks passed
@max-sixty
max-sixty deleted the currently-tending branch May 13, 2026 22:45
max-sixty added a commit that referenced this pull request May 14, 2026
## Summary

`/activity` review rows were linking to `#pullrequestreview-<id>`, which
scrolls to the review's summary block. tend's reviews are almost always
`COMMENTED` with an empty body — so the anchor has nothing to scroll to
and clicks land at the top of the PR.

Example: [PR #463's tend
review](#463 (review))
— empty body, one inline comment on
`site/src/components/CurrentlyTending.astro`. The link as served was
effectively a no-op.

Switch the reviews bucket to `/pulls/{n}/comments` (inline PR review
comments) and pick the bot's latest by `created_at`. The resulting
`#discussion_r…` anchor lands on the actual comment thread.

Body-only reviews (no inline comments) now fall back to the parent PR
URL rather than the review anchor; in practice tend rarely posts those,
and the parent URL is the same fallback already used on lookup failure.

## Test plan

- [x] `npm test` in `worker/` — 19 tests pass, including updated
`refreshActivity` assertions
- [x] Verified against PR #463 via `gh api`: the bot's latest inline
comment is `#discussion_r3237865298`, which the new code will pick
- [ ] After deploy, confirm `/activity` rows in the review bucket point
at `#discussion_r…` (≤5 min cache refresh after first request)

Co-authored-by: Claude <[email protected]>
max-sixty pushed a commit that referenced this pull request Aug 22, 2026
`global.css`'s header claims the site has "one animation (logo unfurl)".
Neither half is true any more: the logo animations live in `Logo.astro`,
and this file itself defines a second one — `now-pulse`, driving the
currently-tending dot and the activity feed's tending badge. Nightly
survey finding; the header dates from the original site prototype, and
the pulse landed after it.

The comment now names what each file actually holds, so a reader landing
on the header isn't sent looking for a logo animation that was never
here. Comment-only change — no test, nothing to exercise.

<details><summary>Provenance</summary>

- Header introduced in #412 (`2136f21`, 2026-05-10), when
the logo unfurl was the only animation on the site.
- `now-pulse` added later, in #433 and extended in
#463.
- Current keyframes: `now-pulse` at
[`site/src/styles/global.css#L329`](https://github.com/max-sixty/tend/blob/8cf262826adba8d0e1291eb6aa645b52412f56d2/site/src/styles/global.css#L329);
`logo-draw` / `logo-sfade` / `logo-breathe` in
[`site/src/components/Logo.astro`](https://github.com/max-sixty/tend/blob/8cf262826adba8d0e1291eb6aa645b52412f56d2/site/src/components/Logo.astro).

</details>

Co-authored-by: tend-agent <[email protected]>
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.

2 participants