Skip to content

Team dashboard: fire the GitHub activity check from the checklist too - #370

Merged
gregv merged 1 commit into
developfrom
fix/team-dashboard-activity-and-cache
Sep 21, 2026
Merged

gregv merged 1 commit into
developfrom
fix/team-dashboard-activity-and-cache

Conversation

@gregv

@gregv gregv commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

What

The "Push code to your repo" checklist row on /hack/[event_id]/manageteam reads the same GitHub activity as the Code activity card, but the fetch only fired when the card (bottom of the page) scrolled near. Anyone who landed on #project saw "Checking your repo's activity…" indefinitely — nothing was checking.

  • useGithubActivity(team, refOrRefs) now accepts a ref or an array of refs; the fire-once IntersectionObserver observes all of them and loads on the first to come near.
  • TeamDashboard passes [checklistRef, codeCardRef]; DeliverablesChecklist exposes a containerRef wrapper.
  • CLAUDE.md contract updated (dashboard load rule + hook description).

Still fire-once, still ONE setState, still no fetch in IN_REVIEW (neither element renders).

Pairs with backend PR

opportunity-hack/backend-ohack.dev#287 (fix/github-activity-exclusions-team-cache-cdn):

  • get_repo_activity drops commits by the repo-bootstrap account (GITHUB_ACTIVITY_EXCLUDED_LOGINS, default gregv) so a fresh repo reads "No commits yet" instead of "2 commits by gregv".
  • get_team reads the team doc fresh (per-worker cache could serve a stale project story for up to 10 min).
  • Shared cdn_server() so the thumbnail validator can't disagree with the upload route's URL prefix.

This frontend PR is safe to deploy in either order; the backend PR is what changes the numbers.

Test plan

  1. /hack/fall-2026/manageteam#project — stay at the top. The "Push code to your repo" row should resolve within a couple of seconds without scrolling (to "No commits yet" or "done"), never stuck on "Checking your repo's activity…".
  2. Scroll to the Code activity card — same data, no second network call to /api/github/activity for the same repo (Network tab).
  3. Team with no github_links — row shows 🔒 "Repository not yet created"; card shows the "Repository not yet created" line; no GitHub calls.
  4. IN_REVIEW team — hero + deadline strip + Slack + roster only; no /api/github/* requests.
  5. Switch teams via TeamSwitcher (if you have two) — the check re-runs for the new team's repos.

🤖 Generated with Claude Code

The "Push code to your repo" checklist row reads the same GitHub activity
as the Code activity card, but the fetch only fired when the card (bottom
of the page) scrolled near — so the row sat on "Checking your repo's
activity…" for anyone who stayed at #project. useGithubActivity now takes
a ref or an array of refs and TeamDashboard observes both the
DeliverablesChecklist and the CodeActivityCard; whichever comes near first
fires the fire-once load.

Pairs with the backend change that excludes the repo-bootstrap account's
commits (GITHUB_ACTIVITY_EXCLUDED_LOGINS, default gregv) and reads the
team doc fresh in get_team so the public team page reflects a story edit
immediately.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
frontend-ohack-dev Ready Ready Preview Sep 21, 2026 5:04am UTC

Request Review

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.

1 participant