Skip to content

✨ feature: show abandoned counts on contributor cards and status - #15863

Closed
mendezr wants to merge 2 commits into
hivecommons:v5from
mendezr:fix/contributor-abandoned-count-15795
Closed

mendezr wants to merge 2 commits into
hivecommons:v5from
mendezr:fix/contributor-abandoned-count-15795

Conversation

@mendezr

@mendezr mendezr commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #15795

Summary

  • Show nonzero Abandoned counts in muted red on Contributors cards, with an escaped tooltip containing the five newest adoption records, superseding PR/in-place status, reason, and timestamp.
  • Add contributorPool.abandoned and abandoned_by_login to /api/status, including offline/revoked profiles and explicit zero/empty values.
  • Document the API schema and operator counting/deduplication semantics; add a changelog fragment.

Integration with #15802

#15802 is still open. This PR includes only its minimal profile fields and ContributorAbandonRecord declaration so it compiles against current v5 and can read persisted adoption data. Recording adoption events, deduplication, and stale-save protection remain owned by #15802. Merge the core PR first, then reconcile the overlapping profile declarations and retain its complete contribute_abandoned.go implementation. This PR does not duplicate adoption emission or recording logic.

Validation

  • Added Go aggregation and wire-shape regression tests, including offline/revoked profiles, case normalization, and empty registries.
  • Added a Node-backed badge-rendering regression test covering count visibility, newest-five ordering, in-place/supersession details, escaping, and nonmutation; asserts card wiring too.
  • Ran gofmt, make dashboard-gen, and git diff --check.
  • Tests not run locally per AGENTS.md; CI is the test verdict.

— hive: backend=pi model=openai-codex/gpt-6.1-sol


🐝 Hive Agent: contributor | SHA: e3ad7bad7

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15866 ✨ Animate live tracker, contributor and Knowledge count deltas same files src/pkg/dashboard/static-src/js/contributors.js
src/pkg/dashboard/static/index.html
#15859 ✨ feature: add abandoned counts to contributor leaderboards CONFLICT src/pkg/dashboard/contribute_profiles.go
#15871 🐛 fix: stage tracker gives immediate Let-hive-decide feedback and says why a human is wanted same files src/pkg/dashboard/static/index.html
#15802 ✨ feat: record per-contributor abandoned PRs when the hive adopts them CONFLICT src/pkg/dashboard/contribute_abandoned.go
#15849 ✨ Show online ClankeR IDs on the Contributors count pill CONFLICT src/docs/api-reference/contribute.md
src/docs/api-reference/dashboard-misc.md
src/pkg/dashboard/api_contribute.go
#15774 ✨ dashboard: onboarding and GitHub App errors point to the Getting Started guide CONFLICT src/docs/api-reference/dashboard-misc.md
#15854 🐛 fix: preserve merge notifications across reloads and show countdown same files src/pkg/dashboard/static/index.html
#15853 ✨ Complete native GitHub queue CI and policy integration same files src/pkg/dashboard/static/index.html
#15876 🐛 Fold hive PR notes into one edited status comment and stop no-findings review spam same files src/docs/operator-reference.md
#15804 ✨ Show the upgrade animation for every roll (announce + SIGTERM fallback) CONFLICT src/docs/api-reference/dashboard-misc.md
#15731 📖 docs: split the operator reference CONFLICT src/docs/operator-reference.md
#15834 ✨ stage tracker: PR sub-row names the other issues it also closes same files src/pkg/dashboard/static/index.html
#15757 ✨ Auto-merge hive-authored superseding PRs without operator decision same files src/docs/operator-reference.md

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@mendezr this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • relative links and anchors resolve

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission → 072-returned-to-contributor: optional-check-failing:relative links and anchors resolve

@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 30, 2026
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@mendezr this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the branch conflicts with the base and needs a rebase

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Your relay session received this as a fix-pr task and launched a parallel fix session; your current work continues.

Expose historical totals and lowercase per-login counts in contributorPool, render recent adoption details on contributor cards, and document counting semantics. Reuse the minimal profile schema from pending hivecommons#15802; adoption recording remains owned by that PR.

Hive-Run: hivecommons#15795
Hive-Plan: contributor-abandoned-status
Hive-Spec: hivecommons#15795#acceptance
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@mendezr
mendezr force-pushed the fix/contributor-abandoned-count-15795 branch from 17408a9 to b56a80f Compare October 30, 2026 19:15
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 30, 2026
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not a duplicate of #15802 — this is the consumer layer #15795 asked for and the body says so. One mechanical blocker, verified against both heads:

  • src/pkg/dashboard/contribute_abandoned.go is created by both PRs: #15802 at 110 lines (type + applyContributorAbandon / mergeContributorAbandons / recordContributorAbandon), this PR at 12 lines (the ContributorAbandonRecord type only, byte-identical to #15802's lines 13-22). Git treats that as an add/add conflict, so whichever merges second will go red on merge. The contribute_profiles.go:192-197 field hunk is identical in both and will auto-merge.
  • The display path reads p.Abandoned / p.AbandonedPRs (api_contribute.go contributorAbandonedCounts), which nothing writes on v5 until #15802 lands — so until then the badge and /api/status.contributorPool.abandoned are always zero. That matches the body's own caveat; just noting it is a real dependency, not a soft one.

Suggested: wait for #15802 to merge, rebase onto it, and drop this PR's contribute_abandoned.go and the duplicated profile fields. No other findings — the aggregation in contributorAbandonedCounts reads the persisted counter rather than len(AbandonedPRs), which is the right choice given #15802 keeps them equal on save.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read the tree at b56a80f. This looks correct to me.

  • The card badge reads c.abandoned / c.abandoned_prs (static-src/js/contributors.js:278-284). I checked the feed: /api/contributors → handleContributorsList (contribute_admin.go:69-99) serialises the full ContributorProfile, so both fields are really present once #15802 writes them. Tooltip goes through esc().
  • contributorAbandonedCounts (api_contribute.go:130-142) sums p.Abandoned over listContributorProfiles() with no tier/presence filter, matching the doc claim about offline/revoked profiles. Login keys lowercased.
  • The ContributorProfile fields and ContributorAbandonRecord here are byte-identical to #15802's (git diff pr15802 pr15863 -- contribute_profiles.go is 4 deletions, i.e. this PR is a strict subset). So the integration is: merge #15802 first, then resolve by taking #15802's contribute_abandoned.go wholesale and dropping this PR's 12-line stub.
  • go build ./pkg/dashboard ./cmd/hive clean at this head.

Not a duplicate of #15802 — different surface (status API + cards vs. recording). The conflicts-with-open-pr label is the expected textual overlap, not a semantic conflict.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@mendezr this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the branch conflicts with the base and needs a rebase

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson asked the hive to adopt this pull request now, without waiting for its author's hive. The hive opens its own PR carrying the author's commits and sign-off unchanged on the pass now running; this PR closes when that copy merges.

@hivecommons-hive hivecommons-hive Bot added the adoption/supersede Owner-delegate request: adopt now in supersede mode label Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Superseded by hive: re-authored as #15877 with the same commits and sign-off because CI stayed red and the author was unavailable. This PR is closed; if #15877 fails, hive reopens it.

@hivecommons-hive hivecommons-hive Bot added the hive/superseded Closed by Hive: a different merged PR already landed this change label Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot closed this Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission → 072-returned-to-contributor: conflicting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adoption/supersede Owner-delegate request: adopt now in supersede mode conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. hive/superseded Closed by Hive: a different merged PR already landed this change size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] Show abandoned count on the Contributors tile and in /api/status.contributorPool

1 participant