Repository navigation
site: render the "currently tending" indicator from the live-data Worker - #433
Merged
Merged
Conversation
Fetches /currently-tending and, when nothing is in progress, falls back to
/activity's newest event ("last tended N min ago") per the UI-fallback
contract in docs/website-data.md. Sits in the hero below the badges; hidden
only when both requests fail.
Extracts the relative-time formatter shared with Activity.astro into
site/src/lib/time.ts.
Co-Authored-By: Claude <[email protected]>
tend-agent
reviewed
May 12, 2026
tend-agent
left a comment
Collaborator
There was a problem hiding this comment.
One inline suggestion — the hidden attribute is being defeated by the new author rule, so the indicator's top margin leaves a visible gap before (and during outage of) the fetch.
The display: flex rule overrode the UA [hidden] { display: none } default,
so the empty <p hidden> kept its top margin and left a visible gap before
the fetch resolved (and permanently if both endpoints failed).
Co-Authored-By: Claude <[email protected]>
tend-agent
approved these changes
May 12, 2026
max-sixty
added a commit
that referenced
this pull request
May 12, 2026
…ponents (#438) ## Summary Pure refactor — no behavior change. `Stats.astro`, `Activity.astro`, and `CurrentlyTending.astro` each carried their own copy of the same runtime-fetch boilerplate (fetch with `Accept` header, `resp.ok` guard, `try/catch → bail`, `hidden = false` on success). A prior review on #433 flagged the duplication. This lifts it into `site/src/lib/api.ts`: - `fetchJson<T>(path): Promise<T | null>` — the fetch wrapper (null on non-OK / network error). Was `getJson` inside `CurrentlyTending`. - `liveData<T>(path, sectionId, render)` — looks up `getElementById(sectionId)`, calls `fetchJson(path)`, hands the parsed body (or `null` on failure) to `render(data, el)`, and reveals the element only if `render` returns `true`. `render` owns the DOM and the "is this worth showing?" decision, and may issue further fetches — `CurrentlyTending` passes an `async render` that does its `/activity` fallback this way. `WORKER_URL` is now module-private to `api.ts` (only `fetchJson` uses it). Renamed `CurrentlyTending`'s local `render` helper to `paint` so it doesn't overlap with `liveData`'s `render` parameter. README line updated. Net −12 lines; bundles shrink slightly (a shared `api.*.js` chunk replaces the per-component copies). ## Test plan - `npm run build` clean; `pre-commit run --all-files` green; `tsc --noEmit` passes (checked via reviewer) - Verified in a browser against the production Worker: all three sections render — saw both `CurrentlyTending`'s live state (`tending owner/repo · review (+2 more)`) and idle fallback (`last tended N min ago`), the stat strip, and the 10-row activity feed — no console errors - Behavior preserved: `CurrentlyTending` still falls back to `/activity` when `/currently-tending` *fails* (not only when it's empty); each section still hides in exactly the cases it did before 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]>
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.
Summary
Adds the third live-data element to the marketing site: a "currently tending" indicator in the hero. It fetches
api.tend-src.com/currently-tendingand shows● tending owner/repo · reviewwhile a tend workflow is running. When nothing is in progress — the common case — it falls back to/activity's newest event as○ last tended N min ago, per the UI-fallback contract already written intodocs/website-data.md. If both requests fail it stays hidden, like the existing stats strip and activity feed.Also extracts the relative-time formatter (
relativeTime) — previously duplicated insideActivity.astro— intosite/src/lib/time.ts, now shared by both components.Files
site/src/components/CurrentlyTending.astro— new component (server-rendered hidden<p>+ client<script>, same pattern asStats.astro/Activity.astro)site/src/lib/time.ts— new;relativeTime(iso)shared helpersite/src/components/Activity.astro— now importsrelativeTimeinstead of its local copysite/src/pages/index.astro— renders<CurrentlyTending />after the hero badgessite/src/styles/global.css—.now-tending/.now-dot{-live,-idle}+ anow-pulsekeyframe gated behindprefers-reduced-motion: no-preferencesite/README.md,docs/website-data.md— doc updatesTest plan
npm run buildclean;pre-commit run --all-filesgreenrelativeTimerefactor; no console errors