Skip to content

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

Merged
hivecommons-hive[bot] merged 5 commits into
v5from
hive/adopt-15863
Oct 30, 2026
Merged

hivecommons-hive[bot] merged 5 commits into
v5from
hive/adopt-15863

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Supersedes #15863 (adopted after CI went red and the contributor was unavailable; original commits by @mendezr preserved).

Fixes #15795

This branch is #15863's head b56a80f282b9 as pushed by @mendezr (fork mendezr/hive), unchanged. Last lane reason on the original: conflicting.

Hive fix agent: rebase this branch on v5, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and their Signed-off-by; add your own sign-off on your commits. Do not open another PR.

Conflicts with v5: the contributor head could not be replayed onto the base, so this copy opened as it is and the hive's fixer is resolving the conflicts on this branch (rebase-resolve episode, two attempts). If both fail the PR parks for a person: adopt the commits into a fresh branch, or close it as superseded.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 2026
@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 kellyaa 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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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
#15895 ✨ feature: add abandoned counts to contributor leaderboards same files src/pkg/dashboard/static-src/js/contributors.js
src/pkg/dashboard/static/index.html
#15890 🐛 dashboard: point operator-reference help marks at the section sub-pages same files src/pkg/dashboard/static/index.html
#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
#15853 ✨ Complete native GitHub queue CI and policy integration same files src/pkg/dashboard/static/index.html
#15849 ✨ Show online ClankeR IDs on the Contributors count pill same files src/docs/api-reference/contribute.md
src/docs/api-reference/dashboard-misc.md
src/pkg/dashboard/api_contribute.go
src/pkg/dashboard/static-src/js/contributors.js
src/pkg/dashboard/static/index.html
#15731 📖 docs: split the operator reference CONFLICT src/docs/operator-reference.md
#15892 🐛 fix: preserve merge notifications across reloads and show countdown same files src/pkg/dashboard/static/index.html
#15888 ✨ ioscan: accept omp as a tool-less classifier CLI backend same files src/pkg/dashboard/static/index.html

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: rebased onto v5 (conflict was api-reference citation line drift in src/docs/api-reference/dashboard-misc.md; refreshed with check-api-reference-citations.sh --fix). Author commits preserved. CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: 14bd86a

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

@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 copilot conflicts-with-open-pr Open PR has a merge conflict with another open PR labels Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Intent-alignment re-review (read at current head feedd4e9, dispatched for 19abb4eb; delta since 14bd86a4 is a rebase onto v5 plus docs-citation refreshes and the CSS-class commit).

Badge test now contradicts the badge markup (in-scope, will fail CI). Commit feedd4e9 moved the badge colour from an inline style to .contrib-abandoned { color: var(--status-error) } — src/pkg/dashboard/static-src/js/contributors.js:284 now emits <span class="contrib-abandoned" title=…> with no style attribute. But src/pkg/dashboard/contributor_abandoned_badge_test.go:30 still asserts badge.includes('color-mix(in srgb, var(--red) 70%, var(--muted))') ("muted red missing"). The node-backed render in that test (exec.Command(node, "-e", js), line 40) therefore throws on every runner with node on PATH (v2-ci sets up node before the Go tests, .github/workflows/v2-ci.yml:856). Fix: assert on class="contrib-abandoned" (or that the CSS rule exists in index.html) instead of the removed inline value. Note the issue (#15795) asks for "muted red"; var(--status-error) is the full error red — if the muted tone matters, mix it in the CSS rule rather than reintroducing the inline style.

Previous finding — contribute_abandoned.go duplicates #15802's type and ContributorProfile fields: still present. #15802 is still open; the ContributorAbandonRecord struct in src/pkg/dashboard/contribute_abandoned.go:6-12 and the Abandoned/AbandonedPRs fields in contribute_profiles.go:196-197 are byte-identical to #15802's. Whichever lands second must drop its copy; since this PR has no producer, it is the one that should shed the stub at that point. Sequencing only — not blocking on its own.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed (security, delta 14bd86a→19abb4e) — no blocking findings.

Advisory (low): ContributorPoolStatus.AbandonedByLogin (src/pkg/dashboard/api_contribute.go:103) is attached to StatusPayload.ContributorPool (server.go:655, set at server.go:2673), and s.status is served raw by the public /api/snapshot (api_snapshot.go:17-34, isPublicPath /api/snapshot prefix) when Hub.AutoSnapshot is on. This is the first GitHub-login-keyed data in that payload (by_role had none), so operators with public snapshots now publish per-login adoption counts unauthenticated. Logins are already public via /api/leaderboard, so exposure is minor; if undesired, drop AbandonedByLogin from the snapshot copy or move it to /api/contributors only.

Tooltip/badge rendering is safe: contributors.js:283-284 passes the whole tooltip through esc() (quotes, backticks, newlines escaped — debug-logs.js:474-484) and count is coerced via Number(); the test at contributor_abandoned_badge_test.go:42-44 exercises the attribute-breakout case.

Prior intent-alignment note (contribute_abandoned.go duplicating #15802) is unchanged at this head — the file is still a new file against v5.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correctness (delta re-review) — read at dispatched head 19abb4eb and the PR's current head feedd4e9 (pushed after dispatch).

Stale test assertion breaks TestContributorAbandonedBadge at feedd4e9. Commit feedd4e9 ("style abandoned badge via CSS class") removed the inline style: src/pkg/dashboard/static-src/js/contributors.js:284 and src/pkg/dashboard/static/index.html:40968 now emit <span class="contrib-abandoned" title=…> with the colour in .contrib-abandoned { color: var(--status-error) } (sparklines-indicators.css:29). But src/pkg/dashboard/contributor_abandoned_badge_test.go:30 still asserts badge.includes('color-mix(in srgb, var(--red) 70%, var(--muted))'). The test executes the function under node (LookPath("node"), line 15) and build-and-test installs node (.github/workflows/v2-ci.yml:856), so this test fails in CI; where node is absent it silently skips. Fix: drop that assertion or assert class="contrib-abandoned" instead (the CSS already carries the colour).

Prior intent-alignment note (duplicate contribute_abandoned.go / ContributorProfile.Abandoned* fields vs #15802) is still present — #15802 is still open on v5, so whichever lands second will fail to compile with duplicate declarations; nothing in this PR writes Abandoned, so counts are always 0 until #15802 merges.

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

@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels 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 hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
mendezr and others added 5 commits October 30, 2026 19:11
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 #15802; adoption recording remains owned by that PR.

Hive-Run: #15795
Hive-Plan: contributor-abandoned-status
Hive-Spec: #15795#acceptance
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
TestStyleRatchet counts style= attributes in static/index.html; the new
contributor abandoned badge added one inline style. Move the colour to a
.contrib-abandoned rule in static-src CSS and regenerate index.html.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Hive-Fix-Attempt: 2/6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: rebased onto v5 after #15802 and #15894 landed (dropped this branch's stub contribute_abandoned.go in favour of #15802's, refreshed api-reference citations). CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: 6db6ed2cf

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

@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 added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read the diff against v5 at 99afcd2 (merge-base), plus contribute_admin.go and contribute_profiles.go. Looks correct to me.

  • handleContributorsList (contribute_admin.go:69-98) returns the full ContributorProfile, so abandoned and abandoned_prs (contribute_profiles.go:196-197) reach contributorAbandonedBadge(c) without an API change; the badge tooltip goes through esc() and the test covers attribute-breaking input.
  • contributorAbandonedCounts (api_contribute.go:132) reads the persisted counter and includes revoked profiles, while the leaderboard excludes revoked contributors (contribute_leaderboard.go:51). That difference is stated in the code comment and the openapi description ("include offline and revoked profiles"), so I read it as intended, not a bug — noting it only so a maintainer is not surprised when contributorPool.abandoned exceeds the leaderboard sum.
  • Not a duplicate of #15895: that PR adds the leaderboard column; this adds pool-status counters and the card badge. The two heads' contributors.js/index.html hunks merge cleanly (git merge-tree conflicts only on the ContributorProfile.Abandoned line #15895 still carries from before #15802), so both can land.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read against v5 HEAD (99afcd224) and the current head 6db6ed2. Looks correct to me.

  • src/pkg/dashboard/api_contribute.go — contributorAbandonedCounts reads p.Abandoned straight from the persisted profiles, so revoked/offline contributors are counted (the issue's "presence does not filter historical cost"). Login key is lower-cased + trimmed; the " Alice "/"ALICE" merge in TestContributorAbandonedCounts covers that. Nil-hub path is fine: BuildContributorPoolStatus already guards s.contributeHub != nil and the new call sits outside that block.
  • static-src/js/contributors.js contributorAbandonedBadge — field names in the tooltip (repo, pr, adopted_into_pr, reason, at) match the JSON tags on ContributorAbandonRecord (src/pkg/dashboard/contribute_abandoned.go:16-22); abandoned_prs is omitempty on the profile and the badge tolerates its absence. esc() is already in scope in that file; --status-error is defined in static/tokens.css:70/230.
  • index.html mirrors the static-src edits.

The api-reference/*.md churn is citation line-number drift from editing api_contribute.go, not content change.

Note: the conflicts-with-open-pr label is #15895's stale re-add of ContributorProfile.Abandoned (already on v5); it clears once #15895 is rebased. No conflict in this PR's own hunks.

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

@hivecommons-hive
hivecommons-hive Bot merged commit d9e14fd into v5 Oct 30, 2026
80 of 82 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the hive/adopt-15863 branch October 30, 2026 23:23
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#158776db6ed2` sha256:9c541e62fbb81abcb6eaade4b8887e01d7c000e2422d9df7a1281c27b4e4185f — download from the dashboard or `hivectl review evidence #15877`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
hivecommons-hive Bot added a commit that referenced this pull request Oct 30, 2026
Carry the new 'Abandoned contributor PRs' section (#15877) into
operator-reference/README.md and index it from the stub page.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR conflicts-with-open-pr Open PR has a merge conflict with another open PR copilot dco All commits are DCO signed-off 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.

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