Skip to content

✨ tracker: show the row's lead action inline - #15457

Merged
clubanderson merged 3 commits into
v5from
feat/tracker-inline-lead-action
Oct 29, 2026
Merged

clubanderson merged 3 commits into
v5from
feat/tracker-inline-lead-action

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15456

Owner complaint

Activity Monitor, five rows: ✦ New · since 28m 👤 / Hive: New · waiting for a maintainer's triage (add triage/accepted); the hive's next pass in 10m. Owner: "i dont have any way to act on these." The action existed — Accept triage leads the ⋯ menu (#15221) — but three dots are invisible.

What changes

The row's lead action is rendered inline, as a real <button class="ham-lead-act"> in the chip slot on the right of the row header (and on each nested PR sub-row's header), generically for every row whose next move is the viewer's:

Row Inline button
New · waiting for a maintainer's triage, Triage needed Accept triage
Needs human decision (045 issue / 085 PR), duplicate Needs a pick Let hive decide (first Decide… option) — or the server's lead answer when it sends one
Ready for human merge Merge now (server lead option)
Returned contributor PR, adoption due Adopt…
Advisory issue Close (read)

Rule (stageTrackerLeadAction): the first stageTrackerRowActions(...) entry flagged lead: true, else the first Decide… submenu option (carrying the decide target), else decide:adopt / an enabled decide:adopt-now / decide:delegate-all. One button only; everything else stays in ⋯. It carries the menu entry's id, its hint as hover and its enable/disable reason: a viewer without write sees it disabled with STAGE_TRACKER_WHY_WRITE (Sign in with write access to this repo), a non-merger sees a merge action disabled with the role reason — never hidden. Clicking is delegated in stageTrackerWireRowActions and runs stageTrackerDecisionRun → runRowAction(action, row) — exactly the menu's path, so the busy chevron, acting caption, toast and history badge are unchanged. The button is a real focusable <button>; click stops propagation so Cmd/Shift-select never fires.

A row the server marks maintainer-moved (actor: maintainer / new.next_mover: maintainer) that yields no lead logs a console warning on a development host (localhost / 127.0.0.1).

Before / after

Before (owner's view — the rows tell him what is needed and offer no control):

before: five rows, no visible action

After (signed in with write):

after: Accept triage, Let hive decide, Merge now inline on the rows that wait on the maintainer; nothing on the Claimed row

After, read-only viewer (disabled, reason in the tooltip):

after, read-only: the same buttons greyed with "Sign in with write access to this repo"

Tests

  • TestStageTrackerLeadActionInline (node harness): triage row (000-new reporter hold and 015) renders exactly one button labelled Accept triage with the menu hint as title; 045 issue renders Let hive decide carrying the decide target; 085 PR with server options renders Merge now (disabled with the role reason for a non-merger); returned PR with adoption due renders Adopt…; Claimed / soaking / hive-moved / plain returned rows render none; without write the button is present, aria-disabled, titled STAGE_TRACKER_WHY_WRITE; labels and hints escaped; the dev warning only speaks on localhost.
  • TestStageTrackerMaintainerRowsHaveLeadAction: runs the real pipeline (buildStageTracker over the shared fixture + a 015 issue, a 090 untrusted-author PR and a reporter_triage sidelined issue), marshals every row the server marks maintainer-moved and asserts each yields an enabled lead and exactly one button.
  • Existing TestStageTrackerAcceptTriage* menu composition unchanged; TestStageTrackerRowActionsWiring (tokens-only CSS) and the row-HTML node suites pass (stageTrackerLeadButtonHtml is typeof-guarded since the harnesses lift functions by name).

Item 4 — trusted clankers and triage (answer for the owner)

Reporter trust does not bypass triage by author kind, by design. config.ReporterTrustConfig.Trusted(login, association) (pkg/config/reporter_trust.go) trusts a reporter by explicit trusted_logins or by GitHub author_association (default OWNER / MEMBER / COLLABORATOR). There is no notion of "clanker owned by a trusted human" or role/trusted on the issue side; those labels govern PR merge trust (#5117), not the issue gate. @onkar717 is a plain GitHub User (not a bot), so #15437–#15440 were judged as a human reporter: not in trusted_logins, association not in the trusted set → reporter_triage, a maintainer's triage/accepted required. That is the configured policy working as written. If the owner wants clankers owned by trusted humans to bypass triage, that is a policy change (map clanker → owner → trust); follow-up question for the owner, nothing added here. Quickest operator fix today: add onkar717 to issue_filter.reporter_trust.trusted_logins.

Why author_kind was null on those rows — fixed in this PR (first commit). A sidelined issue (reporter triage, filtered, hold, …) reaches the tracker as github.RepoWorkIssue, which did not carry Issue.AuthorIsHuman; stage_tracker.go rebuilt a github.Issue from it without the flag, so stageTrackerAuthorKind could not infer human. RepoWorkIssue now has AuthorIsHuman (set via a new Client.workIssue wrapper at all 13 sidelining sites and in repoWorkIssueFromIssue), and the tracker copies it. Covered by TestWebhookOpenedItemInsertedIntoTracker (row author_kind = human) and TestClassifyWebhookIssue_UnadmittedReporterCarriesTriageRow.

Docs

  • dashboard-sections.md: new The row's lead action, inline under the Activity Monitor row anatomy.
  • dashboard-copy-inventory.md: stageTrackerLeadActionHtml row.
  • changelog.d/added-tracker-inline-lead-action.md.

Concurrent-edit note: rebased onto origin/v5 after #15449 and #15450 merged and regenerated static/index.html.

A reporter_triage (or any work-bucket) issue reached the Activity Monitor
through RepoWorkIssue, which dropped Issue.AuthorIsHuman, so the row's
author_kind was unknown and the triage row could not say who filed it.
RepoWorkIssue now carries AuthorIsHuman and the tracker copies it.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Owner, on five 'New · waiting for a maintainer's triage' rows: 'i dont
have any way to act on these.' Accept triage led the ⋯ menu, invisible.

Every row whose next move is the viewer's now renders its lead action as
a real button in the chip slot — the ⋯ menu's lead entry (Accept triage,
Merge now, Close (read)), else the first Decide… option (Let hive
decide), else Adopt — with the menu entry's hint as hover and its
enable/disable reason, run down runRowAction, the menu's path. One
button only; everything else stays in ⋯. A maintainer-moved row without
a lead warns on a dev host and fails
TestStageTrackerMaintainerRowsHaveLeadAction over the real fixtures.

Fixes #15456

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 29, 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 danathar 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 29, 2026
@github-actions

github-actions Bot commented Oct 29, 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
#15444 🐛 tracker: one-line PR sub-row header CONFLICT src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15455 ✨ auto-merge: 'merge only on current base' switch in Features + per-repo override same files src/docs/dashboard-copy-inventory.md
src/docs/dashboard-sections.md
src/pkg/dashboard/static/index.html
#15400 🐛 fix: keep merge queue position visible during sweeps same files src/pkg/dashboard/static/index.html
#15425 🐛 fix: identify tracker claims from the local ledger same files src/pkg/dashboard/static-src/js/tracker-row.js
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 29, 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 hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

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

  • relative links and anchors resolve

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

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission → 071-needs-author: optional-check-failing:relative links and anchors resolve

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

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

Code reads correct to me; the one thing a maintainer needs to know is the merge order against #15444.

Conflict, verified: git merge-tree --write-tree pr15457 pr15444 conflicts in src/pkg/dashboard/static-src/js/tracker-row.js (both PRs rewrite the sub-row ham-row-head line at :999/:1010) and src/pkg/dashboard/static/index.html. #15444 already carries a hive approve at its head, so whichever lands second needs a rebase; this one is the likelier candidate. Not a defect, just the conflicts-with-open-pr label made concrete.

What I verified in the tree:

  • Click path is the menu's own: stageTrackerDecisionRun (tracker-actions.js:814-817) forwards to runRowAction(act, item), the same function the ⋯ menu and the decision popover already use, so the lead button cannot diverge from the menu entry it mirrors. The handler stops propagation before the row-selection click handler, so a lead click does not also select the row.
  • Go side: every repoWorkIssue(...) call in client.go and webhook_item_patch.go now goes through c.workIssue (no stragglers; the two remaining repoWorkIssue(raw) hits in dashboard/open_items.go:94 and webhook_tracker_refresh.go:824 are a different, same-named decoder). isHumanAuthor exists at pr_self_authorization.go:53. stage_tracker.go:2322 forwards the new field.
  • scale-envelope.md citation update is accurate: RankActionableIssues is at client.go:4825 on this head.
  • The "relative links and anchors resolve" FAILURE in the rollup is from a superseded run; the current run for this head passes.

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

Read the diff against v5 and the code it plugs into: stageTrackerRowActions (the lead: true entries at tracker-actions.js:363/393/398 and the decide submenu with target at :402), the ⋯ menu's click dispatch at :629-641, stageTrackerDecisionRun at :814, Client.isHumanAuthor (pr_self_authorization.go:53), and every repoWorkIssue( call site in pkg/github. Looks correct to me.

What I verified:

  • The inline button runs stageTrackerDecisionRun(item, act) → runRowAction(act, item). The ⋯ menu dispatches stageTrackerDoAction(m.items, act) on the row items too (not on decide.target), so target resolution for decide:* happens downstream in both paths — the button is genuinely the same path, as the body claims.
  • aria-disabled + early return (tracker-actions.js:692) rather than native disabled, so the "why" tooltip stays hoverable; the Cmd/Shift-select handler at :705 already skips a, button, …, so the stopPropagation is belt-and-braces, not load-bearing.
  • c.workIssue replaces every production repoWorkIssue( caller in client.go and webhook_item_patch.go; the only bare call left is inside workIssue itself. isHumanAuthor is nil-safe on user (GetLogin()/GetType() on a nil *gh.User are fine) and workIssue guards issue != nil before touching it.
  • RepoWorkIssue.AuthorIsHuman is additive (author_is_human,omitempty), and repoWorkIssueFromIssue plus buildStageTracker (stage_tracker.go:2322) carry it through, so a reporter_triage sidelined issue now classifies its reporter.
  • static/index.html mirrors static-src line for line (87/87).

Two notes, neither a defect:

  1. Body/diff gap (small): the AuthorIsHuman plumbing through RepoWorkIssue / workIssue / stage_tracker.go:2322 is a real behaviour change (sidelined issues gain an author kind) that the PR body never mentions; it only shows up implicitly in TestStageTrackerMaintainerRowsHaveLeadAction's reporter_triage fixture. Worth a line so the changelog reader isn't surprised by author_is_human appearing in the payload.
  2. Open question, not verified: Close (read) and the decide:close-* options are now one click from the row header instead of two via ⋯. They keep ham-menu-danger, but I did not trace whether runRowAction confirms before a close. If it doesn't, that is unchanged behaviour made more reachable — your call whether that's intended.
  3. conflicts-with-open-pr is real against #15444: both rewrite the sub-row stageTrackerHeadColsHtml([ref], …) line (tracker-row.js:999 here, :1005 there). Mechanical to resolve — keep this PR's stageTrackerLeadButtonHtml term and drop #15444's removed lineage-chip term.

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

@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

Copy link
Copy Markdown
Contributor
Evidence bundle `#15457234f97c` sha256:b8be4fa182c65be80cfcd7874dbe2051f9139f7c42ac4a743a691f6e0e3cb264 — download from the dashboard or `hivectl review evidence #15457`.

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.

Activity Monitor rows that wait on the maintainer show no visible action

1 participant