Skip to content

✨ feat(dashboard): show a draft pill in the activity tracker - #14573

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
feat/tracker-draft-pill
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
feat/tracker-draft-pill

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #14572

What

Draft PRs on the dashboard Hive activity monitor (e.g. #14427 / #14428 while isDraft=true + prow do-not-merge/work-in-progress) rendered as a bare "Open · since 18h" row with no status pill, which read as a stuck item. The hive's review and merge lanes skip drafts on purpose, so the wait is the author's — the row should say so.

Changes

  • Payload (stage_tracker.go): the draft modifier now fires when the PR snapshot's draft bit is set or the PR carries prow's do-not-merge/work-in-progress label. That WIP label is read as a draft on the tracker rather than a hold (it used to match holdLabels' do-not-merge/* prefix), so a WIP-only PR reads draft; a real hold/do-not-merge/hold still leads (hold +1).
  • Frontend (static/index.html): muted draft pill (same .ham-badge treatment as hold, not red) with tooltip "Draft PR — hive review and merge lanes skip drafts until the author marks it ready for review."; Open cell reads "Draft · since 18h" with a ✎ glyph in the draft tint and never takes the stale red tint; headline/tooltip say "Open · draft". Hold and blocked still win the cell.
  • Tests: new table-driven TestStageTrackerModifiers_Draft (draft bit; WIP label only; neither; draft+hold → ["hold","draft"]; WIP+hold; hold only; draft+blocked). Node fixture assertions in TestStageTrackerRows for the Open cell, segment class, pill HTML/tooltip, hold +1 fold, stage-50 draft, and current-stage HTML. No time.Sleep.
  • Docs: src/docs/dashboard-sections.md activity-monitor paragraph. Changelog changelog.d/added-tracker-draft-pill.md.

Webhook plumbing (ready_for_review / converted_to_draft) already refreshes Draft via patchPullRequest / patchWorkPRAny; no change needed there.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 27, 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 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this repository have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

@github-actions

github-actions Bot commented Oct 27, 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
#14821 🐛 fix: preserve supersession decisions across stage reconciliation same files 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

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added author/human A person pushed this PR themselves dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 27, 2026
@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:

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

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 added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@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.

Why:

  • the branch conflicts with the base and needs a rebase

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.

Read the Go change against the tree at 4e6ec94 plus the JS it feeds; the logic looks correct to me. One blocker that isn't the code: GitHub reports this CONFLICTING against v5 (conflicts-with-open-pr, DIRTY) — #14571 landed on v5 after this branched and touches stage_tracker.go and stage_tracker_ui_test.go, so it needs a rebase before the merge lane can take it. CI on the current head is otherwise green.

What I verified:

  • src/pkg/dashboard/stage_tracker.go:642-651 — the label loop lower-cases before the switch, so the prowWIPLabel case and the EqualFold in the DeleteFunc filter agree on case/whitespace; holdLabels (bands.go:571) matches do-not-merge/* by prefix, and the delete removes only the exact WIP label, so do-not-merge/hold still sets modHold. The output order at stage_tracker.go:665 keeps hold ahead of draft, which is what the hold +1 fold in the UI test relies on.
  • static/index.html:13906-13920 — openDraft is gated on !openHold && !openBlocked, the stale tint is suppressed only for the draft word, and openSince still computes for drafts so the age shows. --band-draft exists in both themes (index.html:87,190), so .ham-open-draft resolves.
  • PR body matches the diff (payload, frontend, tests, docs, changelog).

One cosmetic note, not a defect: stageTrackerHoldLabels (index.html:13829-13836) still matches do-not-merge/*, so for a PR carrying both do-not-merge/hold and do-not-merge/work-in-progress, the headline at index.html:13788 will read Open · on hold (do-not-merge/hold, do-not-merge/work-in-progress). WIP-only rows are unaffected since mods no longer contains hold. Fine to leave or filter the WIP label there too for consistency with the Go side.

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

Read the modifier path and its caller, not just the diff. This looks correct to me.

  • src/pkg/dashboard/stage_tracker.go:642-650 — do-not-merge/work-in-progress now sets draft and is filtered out of holdLabels(...) before the hold modifier fires. Verified the body's claim that it used to read as a hold: src/pkg/dashboard/bands.go:571 matches any do-not-merge/ prefix, so a WIP-only PR did get hold before this change. A real hold / do-not-merge/hold still survives the DeleteFunc and leads the pill (hold +1), as the body says.
  • static/index.html: openDraft is only true when n === 0 && !openHold && !openBlocked, and stale is masked by !openDraft — matches the stated "hold and blocked still win the cell / never tints stale".
  • Docs and changelog fragment (root changelog.d/, correct location) match the behaviour.

One thing blocking it: the branch no longer merges into v5 — src/pkg/dashboard/static/index.html conflicts with the head that landed via #14571 (I reproduced it with a local merge). Needs a rebase; nothing else from me.

Open question (not a defect, out of this PR's scope): bands.go:571 still classifies a WIP-only draft as held for the Overview band / heldReason, so the band and the tracker now disagree on what WIP means. Worth a follow-up if the band should match.

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

@clubanderson

Copy link
Copy Markdown
Member Author

Rebased onto v5 after #14571 — stageTrackerChipsHtml now keeps both the ham-mod-handled class for the muted "stage ↓" regressed pill and the draft tooltip.

On bands.go holdLabels treating a WIP-only PR as held: I looked at it and left it alone deliberately. holdLabels feeds prBand (the waiting band), the ⏸ held signal, heldReason's "On hold — label …" text, api_hive_advice's Held, and the issue hold check, so dropping do-not-merge/work-in-progress there would change band/signal output for every WIP PR (a WIP-labelled non-draft PR would fall through to open). That's a wider behaviour change than this PR should carry; this change scopes the "WIP reads as draft, not hold" rule to the tracker's modifier derivation. Happy to follow up separately if we want the bands to agree.

@github-actions github-actions Bot added conflicts-with-open-pr Open PR has a merge conflict with another open PR and removed conflicts-with-open-pr Open PR has a merge conflict with another open PR labels Oct 27, 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 added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@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 the stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act label Oct 28, 2026
@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.

Why:

  • the branch conflicts with the base and needs a rebase

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 added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@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

@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 stage_tracker.go, bands.go and the index.html segment/pill code at this head. The tracker change looks correct to me: stageTrackerModifiers (stage_tracker.go:709-718) now sets draft on prow's do-not-merge/work-in-progress and strips only that label from the holdLabels count, so a draft PR wearing nothing else reads draft instead of hold; the JS orders openDraft after hold and blocked and excludes drafts from the stale tint, matching the Go priority list.

One low-severity note, not a blocker and arguably out of #14572's scope: the same WIP label still counts as a hold everywhere else that calls holdLabels — bands.go:209 puts the PR in the waiting band (so the draft band at bands.go:224 stays unreachable for any prow-labelled draft), bands.go:242 adds the ⏸ held signal, and api_hive_advice.go:184 reports Held: true. After this lands a maintainer sees "Draft" in the tracker and "⏸ held / waiting" in the band for the same PR. If you want the two views to agree, the WIP exclusion probably belongs inside holdLabels itself (or a shared helper) rather than at the one tracker call site; happy to leave that to a follow-up.

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

Draft PRs on the Hive activity monitor rendered as a bare "Open · since 18h"
row with no status pill, which read as a stuck item. The tracker now derives a
muted draft modifier from the PR's draft bit or prow's
do-not-merge/work-in-progress label (which it reads as a draft rather than a
hold), renders a draft pill with an explanatory tooltip, and shows the Open
cell as "Draft · since …" without the stale tint. Hold still leads a draft.

Fixes #14572

Signed-off-by: Andy Anderson <andy@clubanderson.com>
The draft fixture is a PR, whose ham-pr-ref tooltip starts with the PR title,
so match the 'Open · draft' headline anywhere in it rather than at the start.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/tracker-draft-pill branch from a3b7caf to e54c67f Compare October 28, 2026 04:04
@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 stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 28, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 87ba55d into v5 Oct 28, 2026
82 of 85 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/tracker-draft-pill branch October 28, 2026 04:16
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#14573e54c67f` sha256:08be69feedcc2a5fd12e3636c347ea86c99c719122a98f7514f12469ad67719c — download from the dashboard or `hivectl review evidence #14573`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at e54c67f.

@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 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 Go and the tracker JS against v5; looks correct to me.

  • src/pkg/dashboard/stage_tracker.go:777: do-not-merge/work-in-progress now sets draft and is filtered out of holdLabels() before the modHold check, so a PR wearing only prow's WIP label reads draft rather than hold. Any other do-not-merge/* or hold label still sets modHold (bands.go:571), so a real maintainer hold on a draft PR is not masked. modDraft already existed in stageTrackerModifierOrder and stageTrackerSunkMods, so ordering and sink behaviour are unchanged.
  • static/index.html: the Draft word / ✎ chevron apply only when n === 0 && state === 'active' && !openHold && !openBlocked, and the stale tint is suppressed only in that same case, so a blocked or held Open cell keeps its existing stale signal.

Matches the scope of #14572 as the body states.

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

@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 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/human A person pushed this PR themselves 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.

Activity tracker: draft PRs show no status pill and look stuck

1 participant