Skip to content

✨ feature: show clanker presence on waiting-on pills - #15054

Closed
thatguywob wants to merge 4 commits into
hivecommons:v5from
thatguywob:feat/15051-presence
Closed

thatguywob wants to merge 4 commits into
hivecommons:v5from
thatguywob:feat/15051-presence

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

PRs waiting on an author at 071 or 072 now show clanker presence before the first nudge, so operators can see whether to wait or expect adoption. The same presence appears in linked PR sub-rows and named-author Needs-human popovers.

  • Add accessible online dot / offline square / unknown ring indicators, heartbeat details, and reduced-motion support using tracker cue tokens.
  • Share adoption deadline calculation with the adoption engine and snapshot each author's hub presence once per response. Human PRs, stale heads, disabled adoption, and holds promise no adoption deadline.
  • Add Go derivation and payload tests plus Node rendering fixtures, documentation, and a changelog fragment.

Validation: gofmt -l on all changed Go files and git diff --check passed. Tests were not run locally, as required by AGENTS.md; CI runs the regression suites.

Closes #15051

— hive: backend=codex


🐝 Hive Agent: contributor | SHA: 36b881ddb

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 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 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 28, 2026
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

This PR conflicts with v5 itself. Rebase it first: until it merges cleanly into the base, conflicts with other open PRs cannot be told apart from base drift, so only same-file overlaps are listed.

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
#15072 🐛 Adoption: re-adopt when the hive's superseding copy is closed unmerged same files src/docs/dashboard-sections.md
src/docs/labels-and-control-signals.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
src/pkg/github/automerge/automerge_contributor_adopt.go
#15070 ✨ Activity Monitor: presence indicator (clanker online / offline / none) on the waiting-on pill same files src/docs/dashboard-sections.md
src/docs/labels-and-control-signals.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#15087 🐛 Activity Monitor: Ready for human merge offers Approve & merge / let hive merge; every needs-human state has its action same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#15085 ✨ Activity Monitor: Adopt now and Reroute to another clanker for PRs waiting on a contributor's clanker same files src/docs/dashboard-sections.md
src/docs/labels-and-control-signals.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
src/pkg/github/automerge/automerge_contributor_adopt.go
#15057 🐛 fix: recover orphaned supersede adoptions same files src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
src/pkg/github/automerge/automerge_contributor_adopt.go
#15067 🐛 fix: enable bulk delegation for multi-PR parent selections same files src/pkg/dashboard/static/index.html
#15074 🐛 Activity Monitor: server-derived stage actor icons, one row per PR, Merged-today counter above the gate same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/pkg/dashboard/static/index.html

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Share adoption deadlines with the Activity Monitor and expose relay presence before the first nudge, including linked PR rows and named-author decision popovers.

Hive-Run: hivecommons#15051
Hive-Plan: activity-monitor-waiting-presence
Hive-Spec: hivecommons#15051#proposal
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added 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 stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Failing checks:

  • test (dashboard 1/4)
  • test (dashboard 2/4)
  • test (dashboard shuffle 2/3)

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.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Failing checks:

  • mobile-shots

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 (0 waiting): fixes are handed out before new work as soon as you have capacity.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added the stage/050-review-pending Review swarm requested; awaiting a verdict for the current head label Oct 28, 2026
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 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.

Decision needed: @clubanderson should decide whether #15054 or your own #15070 lands for #15051 — both implement the same waiting-on presence indicator and conflict on the same files.

This PR and #15070 both implement #15051 and cannot both merge. Both add Presence to StageTrackerItem / StageTrackerLinkedPR in src/pkg/dashboard/stage_tracker.go, add a presence object to the tracker payload (same login/state/kind/since/last_seen/next/adopt_at shape), add the .ham-presence-{online,offline,unknown} CSS and stageTrackerPresenceTip(item, nowMs) helper in index.html, and edit the same two docs paragraphs. Same intent (both bodies: show whether the hive will wait or adopt), different designs:

#15054 (this) #15070 (@clubanderson, owner)
adopt-at clock refactors adoptionDue into exported automerge.AdoptionDeadline (automerge_contributor_adopt.go:152) and calls it — one clock, cannot drift re-derives the clock in stage_tracker_presence.go:150-180; omits the engine's !hasPresence → adoptionGrace() branch (automerge_contributor_adopt.go:160), so with the hub unavailable after an online nudge it shows 15m where the engine waits 2h
stages 071, 072 071, 072, 017 (PossiblyExisting)
presence snapshot cached once per response (cachedStageTrackerPresence) per-call
available flag yes (unavailable hub ≠ unregistered) no (ok dropped at :110)
tests Go + embedded node script Go + separate .test.js fixture
CI green (tide pending) needs-rebase, dirty

Correctness read on this PR: the adoptionDue → AdoptionDeadline refactor is behaviour-preserving (!now.Before(start+grace) ≡ now.Sub(start) >= grace for each of the four branches), and stageTrackerPersonPresence gates adopt_at on the same conditions the engine does (nudged head, AdoptionBlocked, adoption enabled, not held). Nothing I'd call a defect.

This is an ownership call between a maintainer's own PR and a contributor PR, not a code call, so I am not picking. If #15054 survives, #15070's 017 coverage is a small follow-up; if #15070 survives, the shared-AdoptionDeadline approach from here is worth carrying over. I have not closed anything.

— 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

Choose a reason for hiding this comment

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

Decision needed: @clubanderson should decide which of the two #15051 implementations lands — this PR (#15054, green, shares the adoption engine's clock) or your own #15070 (needs rebase, re-derives the clock, also covers 017) — since both add presence to StageTrackerItem and edit the same index.html pill, so they conflict and cannot both merge.

Looks correct to me, but it conflicts with #15070, which closes the same issue (#15051). Flagging for a maintainer to pick one; I have not closed anything.

What I verified against v5 (770b66d2a):

  • src/pkg/github/automerge/automerge_contributor_adopt.go:152-190 — adoptionDue is now a thin wrapper over the new exported AdoptionDeadline; the four branches (no presence → grace, online → grace, offline → after_offline from max(nudge, last_seen), unregistered → after_unregistered) return the same instants adoptionDue previously compared against now, so engine behaviour is unchanged and the tracker's adopt_at is by construction the engine's own deadline. That is the "never contradicts the adoption text" requirement from #15051, satisfied structurally rather than by copy.
  • src/pkg/dashboard/stage_tracker_person_presence.go:27-82 — presence is emitted only for PR rows at 071/072 (trackerNumberNeedsAuthor/trackerNumberReturned, stage_tracker.go:504-505); human-authored rows and rows with rec.AdoptionBlocked(head) or a hold/do-not-merge label (same label set as the engine's adoptionBlocked, automerge_contributor_adopt.go:216-224) never get next: adopt.
  • stage_tracker.go:1548 — the lookup is wrapped in cachedStageTrackerPresence, so a relay connecting mid-response cannot make the dot and the adoption caption disagree on one row.
  • stage_tracker.go:2508 — Presence is mirrored onto linked-PR sub-rows next to Adoption.
  • SPA: role="img" + escaped aria-label, distinct shapes per state, prefers-reduced-motion disables the breathe — asserted in TestStageTrackerPersonPresenceJS (stage_tracker_person_presence_test.go:112-161), which also covers the <unsafe> login escape. The "Node rendering fixtures" in the body are these node scripts driven from Go, not a .test.js file.

Conflict with #15070 (same files: stage_tracker.go, static/index.html, both docs pages, both changelog fragments). The two are not a no-op pair — different Go types (StageTrackerPersonPresence vs StageTrackerPresence), different mechanics (this PR reuses the engine clock; #15070 re-implements it in stage_tracker_presence.go:106-186 and also emits presence at 017 Possibly-existing, which #15051 did not ask for). #15070 is currently needs-rebase; this one is green and mergeable. Whichever lands first makes the other a rewrite, so this is an ownership/scope call for the issue author rather than a code defect.

One non-blocking note: stage_tracker_person_presence.go:55-58 sets since to last_seen whenever it is later than the nudge start, including for an online clanker, so since on an online row means "last heartbeat" rather than "waiting since". The tooltip only reads since in the offline branch today, so nothing visible is wrong.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

Head: verdict requires_human @aee3eae, 57/57 checks green, DCO yes, soak 0s of 30m0s.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed. An ordinary contributor cannot release their own PR.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob 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 (2 waiting): fixes are handed out before new work as soon as you have capacity.

@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

hivecommons-hive Bot pushed a commit that referenced this pull request Oct 28, 2026
…glyph on every gated row (#15084)

* 🐛 Activity monitor: one merge-gate vocabulary and a labelled leading glyph on every gated row

At 15:11 ET two Merge gate rows both read 'Ready for auto merge ⬡' while one
carried a spinning glyph and the other none. The glyph was the agent-working
cue (an agent's lastAction on that PR this round — the review swarm was
re-reviewing #15042; nobody was on #15054), unlabelled, so it read as merge
progress; and STAGE_TRACKER_ACTIVE_WORD mapped 060, 080 and 100 all to
'Ready for auto merge', so a 060 PR with CI still pending read as ready.

- /api/stage-tracker PR items (and nested linked_prs) carry
  merge_gate {state, reason, sweep_running, last_sweep_at, next_sweep_at,
  soak_until, soak_remaining_seconds}; automerge gains a SweepClock that
  records the running pass (cause, targets) and the next floor time.
- Pill words in pipeline order: Awaiting merge gate (what holds it) →
  Ready for auto merge (next sweep in Ns) → Soaking (time left) → Merging
  → Merged. Every gated row gets a leading glyph with the same sentence as
  title + aria-label; it spins while a sweep is on the PR, shows a clock
  while it waits; countdowns tick from the existing cue timer.
- The agent-working spinner now carries 'Working now: <agent> …' as
  title + aria-label.
- Legend in docs/dashboard-sections.md; node fixture tests on the
  captured #15042 / #15054 / #15044 payloads; Go tests for merge_gate.

Fixes #15073

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* 🌱 automerge: SweepClock unit test

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* 📖 docs: resync api-reference citations after server.go line shift

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

---------

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closed as superseded by #15070 by @clubanderson from the Hive dashboard.

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

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off 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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Monitor: presence indicator (clanker online / offline / none) on the waiting-on pill so the operator can anticipate wait vs adopt

1 participant