Skip to content

✨ Show online ClankeR IDs on the Contributors count pill - #15849

Merged
clubanderson merged 5 commits into
v5from
feat/contributor-pill-online-ids
Oct 31, 2026
Merged

clubanderson merged 5 commits into
v5from
feat/contributor-pill-online-ids

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Summary

  • Add a styled hover/focus tooltip on the existing sidebar Contributors count pill, with one online ClankeR contributor ID per line, explicit empty/unavailable states, and escaped IDs.
  • Reuse the existing /api/status.contributorPool feed; add only online_ids, derived from the exact profile/heartbeat predicate previously used by the numerator. The numerator remains registered contributors with a live socket heartbeat within the configured presence window (15m default), not number of sessions; denominator remains registered profiles. Multiple sessions do not duplicate IDs.
  • Preserve pill classes, online/registered count and click navigation; add keyboard focus/Enter navigation. Reuse the shared portal, including viewport positioning, Escape/outside dismissal and mobile focus behavior. Refresh an open tooltip on normal status updates, without new requests or polling.
  • Cover backend mixed online/offline IDs, presence-window edge, multiple sessions, disconnect/reconnect, empty JSON and frontend vertical rendering, count/list updates, escaping, unavailable state, hover/focus, navigation wiring and scrollable-list persistence.

Validation

  • make dashboard-gen: regenerated canonical static-src bundle.
  • node --test dashboard/test/config-tooltip.test.js: 14 passed.
  • git diff --check and touched Go formatting: clean.
  • Code-review agent completed; its long-list scroll dismissal finding was fixed and regression-tested.
  • Go tests/build/vet intentionally not run locally per AGENTS.md; CI is the verdict. No live server/browser validation or live Hive configuration/queue changes.

Fixes #15848

@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 hanthor 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 the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label 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
#16011 🐛 fix: explain human requirements and optional tracker actions same files src/pkg/dashboard/static/index.html
#16012 🐛 fix: offer Close issue on every open tracker issue same files src/pkg/dashboard/static/index.html
#16020 ✨ feature: add opt-in Matrix Rain and Cascade display same files src/pkg/dashboard/static/index.html
#16017 🐛 fix: copy the selected tracker issue or PR link same files 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
#16016 🐛 fix(dashboard): read a registered contributor's PR as their clanker in the Activity Monitor same files src/pkg/dashboard/static/index.html
#15977 ✨ feat: serve Matrix lines via authorized /api/matrix/lines and content-free code-lines SSE nudge CONFLICT src/docs/api-reference/dashboard-misc.md

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission → 050-review-pending: required-check-pending:build-and-test

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • changelog-fragment-guard

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@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.

Correctness review (head d245f2b)

1. CI regression: TestHelpTooltipsUseBodyFixedPortal11269 fails — src/pkg/dashboard/modal_tooltip_regression_test.go:95.
The PR rewrites the capture-phase scroll listener in static-src/js/tooltips-dialogs.js:167 to (e) => { if (configTooltipIsOpen() && !configTooltipOwns(e.target)) hideConfigTooltip(); } (so the long-list tooltip survives scrolling inside the portal), but the existing anchoring guard still string-matches the old literal. Dashboard shards 3/4 and shuffle 1/3 fail with tooltip anchoring regression guard missing "window.addEventListener('scroll', () => { if (configTooltipIsOpen()) hideConfigTooltip(); }, true)". The behavior change itself is sound (configTooltipOwns(document) is false, so page scroll still dismisses: tooltips-dialogs.js:39-44); only the guard needs updating:

		"window.addEventListener('scroll', (e) => { if (configTooltipIsOpen() && !configTooltipOwns(e.target)) hideConfigTooltip(); }, true)",

(replace the 'scroll' entry at modal_tooltip_regression_test.go:95)

Checked and OK: setSidebarPairBadge resets textContent before the new tooltip span is appended, so tooltips don't accumulate across status updates (knowledge.js:219, contributors.js:502-508); OnlineIDs is always a non-nil slice so the empty state encodes []; sort is already imported in api_contribute.go. I could not read the changelog-fragment-guard / relative links job logs — please confirm those are unrelated to this branch.

— hive: agent=adjudicator-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.

Reviewed (security) — no blocking findings.

Advisory (low): online_ids is added to ContributorPoolStatus (src/pkg/dashboard/api_contribute.go:98), which is embedded in the cached StatusPayload (server.go:643, filled at server.go:2650). /api/snapshot is a public path (server.go:2356) and handleSnapshotAPI serves that cached status verbatim with no field stripping (api_snapshot.go:24-33), so when Hub.AutoSnapshot is on, the list of currently-online contributor IDs becomes visible without a dashboard session. IDs are opaque c-<6 hex> values (contribute_profiles.go:412) and gate nothing on their own (admin lookups by ID sit behind authenticated /api/contributors/...), so this is information disclosure only, not a credential leak — noting for awareness rather than requesting a change. Client-side rendering is safe: every ID goes through esc() before innerHTML (contributors.js:527; esc at debug-logs.js:469-478).

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/awaiting-ci (scanner): failing on d245f2b: test (dashboard 3/4) / dashboard shuffle — TestHelpTooltipsUseBodyFixedPortal11269 (modal_tooltip_regression_test.go:97) no longer finds window.addEventListener('scroll', () => { if (configTooltipIsOpen()) hideConfigTooltip(); }, true) in the static JS; also changelog-fragment-guard reports api-reference citation DRIFT (api-reference/contribute.md:8-13 vs api_contribute.go). Suggested fix: restore that scroll listener line, and run bash src/scripts/check-api-reference-citations.sh --fix and commit. The hive does not push to this branch; once green the sweep merges it.


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

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

@clubanderson

Copy link
Copy Markdown
Member Author

CI follow-through correction: the failures were caused by this PR, not owner action. The tooltip-scroll improvement changed the shared listener but its existing Go source-contract test still pinned the old listener; the dashboard/shuffle failures then cascaded to aggregate test and coverage. Adding online IDs also shifted 54 API route citations, failing both docs links and changelog guards. Updated the exact contract to retain outside-scroll dismissal while permitting tooltip-list scrolling, and ran the CI-authorized citation fixer (54 rewritten, zero unresolved). No checks or coverage requirements weakened. Pushed a signed correction and am monitoring the new head through CI completion; no merge/deployment.

@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
@clubanderson

Copy link
Copy Markdown
Member Author

Follow-through update: correction e3c4cc2 had no failing checks but eight required contexts never started because the PR became merge-conflicted against advancing v5 (one API-citation hunk). Refreshed only this feature branch from origin/v5, resolved that citation overlap with the authorized fixer, and regenerated the dashboard from the combined canonical static-src. No changes were taken from PR #15866 or its branch. New signed head: 9462072. All 14 focused tooltip JavaScript checks still pass. Continuing exact-new-head CI monitoring; not claiming readiness.

@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.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-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.

Reviewed — no findings from this perspective.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Addendum to the FIX_DIFF triage above (same failing run, no new push since): the harness fix needs more than createElement/appendChild. nav_count_delta.test.js loads only contributorsOnlineTitle and updateContributorBadge from contributors.js into the vm context, so after the TypeError is cleared the next failure will be ReferenceError for the symbols the new tooltip block reaches: add contributorsOnlineTooltip to the contributors list in the loader (and make sure esc is defined in the context, e.g. function esc(s) { return String(s); }), plus stubs var _configTooltipTrigger = null; function positionConfigTooltip() {} in the prelude.

Also a correction to point 2 above: setSidebarPairBadge assigns el.textContent before the append, which clears prior children, so tooltips do not accumulate across polls — no behaviour change needed there, harness only.

Not pushing: branch is not hive-authored. hive/awaiting-ci: author fix pending.


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

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

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/contributor-pill-online-ids branch from 8f9a478 to 0ff4ed1 Compare October 31, 2026 11:03
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2026
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 31, 2026
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…ement

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson merged commit d8e1d41 into v5 Oct 31, 2026
79 of 80 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/contributor-pill-online-ids branch October 31, 2026 11:32
@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

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

Labels

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. 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.

✨ Show online ClankeR IDs on the Contributors count pill

1 participant