Repository navigation
✨ Activity Monitor: presence indicator (clanker online / offline / none) on the waiting-on pill - #15070
Conversation
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether this PR or #15054 lands for #15051 — both implement the same waiting-on presence indicator and conflict on the same files.
Overlaps #15054 (same issue #15051, same files, same payload shape). Full side-by-side is on #15054; the short version: #15054 exports automerge.AdoptionDeadline and calls it so the pill and the engine share one clock, while this PR re-derives the clock in the dashboard. Both cannot merge; this is your call as owner, not mine.
One concrete divergence in this PR, against the body's "same precedence and clocks as the adoption code":
src/pkg/dashboard/stage_tracker_presence.go:110drops the lookup'sok. When the hub presence source returnsok=false(orpresenceis nil), the row falls into thedefault:branch at:176-177and projectsadopt_at = nudge + after_unregistered(15m). The engine'sadoptionDue(src/pkg/github/automerge/automerge_contributor_adopt.go:160) handles!hasPresenceseparately viaadoptionGrace(), which isgrace_online(2h) when the nudge went out while the author was online. So with presence unavailable after an online nudge the pill promises adoption ~1h45m before the engine would act. Severity: low (unavailable-hub case only). Carryingokthrough — or calling a shared deadline function as #15054 does — closes it.
I have not closed anything.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
One verified gap in the adopt-at projection, plus this conflicts with #15054 (same issue #15051).
Finding — hold / do-not-merge labels are not honoured by the tracker clock (src/pkg/dashboard/stage_tracker_presence.go:156-160, low/medium)
The body says the projection uses "the same precedence … as the adoption code (…, held/blocked), so the dot never contradicts the adoption text". The only hold the code checks is rec.AdoptionBlocked(head). That method (src/pkg/stagelabels/store.go:1117-1122) returns AdoptBlockedBy for a block the engine recorded — and the engine records one only for the maintainer_policy case (automerge_contributor_adopt.go:599, NoteAdoptionBlocked), and only once adoption is already due. The label hold is a separate check at automerge_contributor_adopt.go:591-594: adoptionBlocked(obs.Labels) logs and returns; nothing is written to the record. So for a 072 clanker PR carrying hold, the engine will never adopt, but stageTrackerPresenceFor still falls through to the switch out.State at :172-186 and emits next: "adopt" with an adopt_at — the tooltip reads "hive will adopt at …" on a PR the hive will not touch. The fix is a label check mirroring adoptionBlocked (hold, do-not-merge, do-not-merge/hold; automerge_contributor_adopt.go:213-221) before computing at. (#15054 does this at its stage_tracker_person_presence.go:98-106.)
Conflict with #15054. #15054 (@thatguywob, green CI, mergeable) also closes #15051: it adds a Presence *StageTrackerPersonPresence to the same StageTrackerItem / StageTrackerLinkedPR structs (stage_tracker.go:401, :492) and edits the same waiting-on pill in static/index.html, with a different shape (available flag, no 017 stage) and a different mechanism — it exports automerge.AdoptionDeadline out of adoptionDue so the tracker reuses the engine's clock instead of re-deriving it (stage_tracker_presence.go:106-186 here). The two cannot both merge. I raised the "which one lands" question to you on #15054 rather than here, since you authored both the issue and this PR; if this one is the survivor, the label-hold gap above is the one thing I'd fix before it lands, and the re-derived clock means future changes to adoptionDue will need a matching edit here (the maintainer_policy pre-due case, for example, is also invisible to this projection).
Not a defect, noted for completeness: stageTrackerWaitingOn (stage_tracker_presence.go:92-101) also emits presence at 017 Possibly-existing, which #15051 scoped to 071/072 and sub-rows; harmless, but it is scope beyond the issue.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
d520ad7 to
293b20f
Compare
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
|
@clubanderson this PR is held at Failing checks:
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. |
|
@clubanderson this PR is held at Why:
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. |
There was a problem hiding this comment.
Read src/pkg/dashboard/stage_tracker_presence.go side by side with src/pkg/github/automerge/automerge_contributor_adopt.go (adoptionDue, line 152) at v5. The adopt-at projection matches the engine's rules branch for branch: online → nudge + GraceOnline (default 2h, adoptionDue line 169); offline → later of nudge / LastSeen + AdoptAfterOffline (default 15m, lines 175-181); unregistered → nudge + AdoptAfterUnregistered (default 15m). The same guards precede it — head must equal NudgeHead, NudgeCount > 0, not Adopted(head)/AdoptedInPlace(), and additionally AdoptionBlocked(head) so a held row shows no clock. stageTrackerWaitingOn limits presence to PR rows at 071/072/017 with a non-empty author, and the sub-row mirror copies the parent pointer. Looks correct to me.
One open question, not verified as reachable: when the server's presence lookup is nil (presence == nil in stageTrackerPresenceFor), the row falls into the unregistered branch and reports next: adopt at nudge + 15m. The engine with no presence source takes a different path — adoptionDue line 160-162 returns adoptionGrace(rec, policy), which is GraceOnline (2h) when rec.NudgeOnline is set. So a hive with no ContributorPresenceSource wired and an online-nudged PR would show "adopt in 15m" while the engine waits 2h. If s.stageTrackerPresence() can be nil in a running hive, mirroring adoptionGrace in the no-lookup case closes the gap; if it cannot, ignore this. The existing stageTrackerAdoption text shares the lookup, so the two pill texts stay consistent with each other either way.
Also: the PR is mergeable_state=dirty against v5 and needs a rebase before the lane can take it.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Following up on #15051: the implementation choice is already resolved in favor of this PR; #15054 was closed as superseded. Please rebase this branch and resolve the outstanding adoption-prediction checks before human approval: when presence lookup is unavailable, the displayed deadline must agree with the adoption engine (do not promise 15-minute adoption if the engine applies the online-nudge grace); held PRs must not promise adoption. Keep the fix here rather than opening another competing implementation. Existing CI/review and head-scoped gates remain required. |
…ne) on the waiting-on pill
Every PR row that waits on a named person (071, 072, 017) now carries
presence{login, state, kind, since, last_seen, next, adopt_at}, read from
the contributor hub's live presence — the same lookup adoption consults —
and projected through adoption's own clock, so the indicator never
contradicts the adoption text on the row.
The SPA draws it inside the pill before the @login: a filled dot
(--cue-decision, soft breathe, stilled under prefers-reduced-motion) when
the clanker is online, a filled square (--status-error) when it is
offline with the adopt-at time and countdown in the tooltip, a hollow
ring when no clanker is registered (a human's PR). Shape carries the
state, not colour alone; the indicator has its own aria-label. The same
line shows in the Needs-human popover and per-PR sub-rows.
Fixes #15051
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
a40cbb0 to
ace6fd4
Compare
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at ace6fd4. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Read the new projection against the adoption engine it claims to mirror; this looks correct to me.
src/pkg/dashboard/stage_tracker_presence.go:142-181reproducesadoptionDue(src/pkg/github/automerge/automerge_contributor_adopt.go:152-188) branch for branch: online →GraceOnlinefrom the nudge withnext: wait; offline →AdoptAfterOfflinefrom max(nudge, last heartbeat); unregistered →AdoptAfterUnregistered. Defaults (pkg/config/config.go:2885-2902) match the engine's inline fallbacks (2h / 15m / 15m).- The one place I expected drift — no contribute hub — does not drift:
cmd/hive/contributor_nudge_sink.go:33-38returns a zeroContributorPresencewithhasPresence=true, so the engine falls into the unregistered branch exactly as the projection does with a nilpresenceLookup. - The clock is gated the same way the engine gates it (072 only, nudged, head unchanged, not adopted,
AdoptionBlockedempty), soask/neverholds show "waiting" rather than an adopt-at the engine would never act on. - SPA:
stageTrackerDecisionTriggerHtml(static/index.html:17507) already takes pre-escapedinnerHtml, so passing the dot markup instead ofesc(text)is safe;escis applied to the text halves around the dot. No native dialogs, tokens only.
Nit, no action needed: the PR body says 073 possibly-existing; the code and the docs diff correctly say stage/017-possibly-existing.
go build ./pkg/dashboard/ ./pkg/github/automerge/ passes at ace6fd4; CI was still running when I read it.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Fixes #15051
What
The "waiting on @login" pill in the Activity Monitor / stage tracker now carries a presence indicator so the operator can anticipate hive's next move — wait vs adopt:
human · no clanker)Shape differs per state (not colour-only); indicator has
role="img"+aria-label; online "breathe" animation is subtle and disabled underprefers-reduced-motion.Backend
presenceobject on every PR row (and mirrored sub-row) that is waiting on a named person (071 needs-author, 072 returned-to-contributor, 073 possibly-existing):presence{login, state: online|offline|unknown, kind: clanker|human, since, last_seen, next: wait|adopt, adopt_at}ContributeWSHub.Presence, registered clankers + last heartbeat) with the same precedence and clocks as the adoption code (grace_online,after_offline,after_unregistered, head-unchanged, held/blocked), so the dot never contradicts the adoption text.src/pkg/dashboard/stage_tracker_presence.go(+ tests).SPA
@login; mutedwaiting on @loginpill with indicator for non-adoption waiting rows.@Danathar's clanker: online, last seen 2 min ago — hive is waiting for them@hanthor's clanker: offline 26h — hive will adopt at 15:10 (in 38m)@someone: no clanker registered — waiting for a human replyTests
stage_tracker_presence.test.js— rendering, tooltip text, aria labels, popover line, style ratchet.Docs
src/docs/dashboard-sections.md(Activity Monitor pills)src/docs/labels-and-control-signals.md(adoption section)changelog.d/added-15051-presence-indicator.md