Repository navigation
✨ tracker: show the row's lead action inline - #15457
Conversation
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>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@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. |
|
stage 080-awaiting-merge-admission → 071-needs-author: optional-check-failing:relative links and anchors resolve |
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
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 torunRowAction(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 inclient.goandwebhook_item_patch.gonow goes throughc.workIssue(no stragglers; the two remainingrepoWorkIssue(raw)hits indashboard/open_items.go:94andwebhook_tracker_refresh.go:824are a different, same-named decoder).isHumanAuthorexists atpr_self_authorization.go:53.stage_tracker.go:2322forwards the new field. scale-envelope.mdcitation update is accurate:RankActionableIssuesis atclient.go:4825on 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
There was a problem hiding this comment.
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 dispatchesstageTrackerDoAction(m.items, act)on the row items too (not ondecide.target), so target resolution fordecide:*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 nativedisabled, so the "why" tooltip stays hoverable; the Cmd/Shift-select handler at:705already skipsa, button, …, so thestopPropagationis belt-and-braces, not load-bearing.c.workIssuereplaces every productionrepoWorkIssue(caller inclient.goandwebhook_item_patch.go; the only bare call left is insideworkIssueitself.isHumanAuthoris nil-safe onuser(GetLogin()/GetType()on a nil*gh.Userare fine) andworkIssueguardsissue != nilbefore touching it.RepoWorkIssue.AuthorIsHumanis additive (author_is_human,omitempty), andrepoWorkIssueFromIssueplusbuildStageTracker(stage_tracker.go:2322) carry it through, so areporter_triagesidelined issue now classifies its reporter.static/index.htmlmirrorsstatic-srcline for line (87/87).
Two notes, neither a defect:
- Body/diff gap (small): the
AuthorIsHumanplumbing throughRepoWorkIssue/workIssue/stage_tracker.go:2322is a real behaviour change (sidelined issues gain an author kind) that the PR body never mentions; it only shows up implicitly inTestStageTrackerMaintainerRowsHaveLeadAction'sreporter_triagefixture. Worth a line so the changelog reader isn't surprised byauthor_is_humanappearing in the payload. - Open question, not verified:
Close (read)and thedecide:close-*options are now one click from the row header instead of two via ⋯. They keepham-menu-danger, but I did not trace whetherrunRowActionconfirms before a close. If it doesn't, that is unchanged behaviour made more reachable — your call whether that's intended. conflicts-with-open-pris real against #15444: both rewrite the sub-rowstageTrackerHeadColsHtml([ref], …)line (tracker-row.js:999here,:1005there). Mechanical to resolve — keep this PR'sstageTrackerLeadButtonHtmlterm and drop #15444's removed lineage-chip term.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15456
Owner complaint
Activity Monitor, five rows:
✦ New · since 28m 👤/ Hive: New · waiting for a maintainer's triage (addtriage/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:Accept triageLet hive decide(first Decide… option) — or the server's lead answer when it sends oneMerge now(server lead option)Adopt…Close (read)Rule (
stageTrackerLeadAction): the firststageTrackerRowActions(...)entry flaggedlead: true, else the first Decide… submenu option (carrying the decide target), elsedecide:adopt/ an enableddecide: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 withSTAGE_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 instageTrackerWireRowActionsand runsstageTrackerDecisionRun→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):
After (signed in with write):
After, read-only viewer (disabled, reason in the tooltip):
Tests
TestStageTrackerLeadActionInline(node harness): triage row (000-new reporter hold and 015) renders exactly one button labelled Accept triage with the menu hint astitle; 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, titledSTAGE_TRACKER_WHY_WRITE; labels and hints escaped; the dev warning only speaks on localhost.TestStageTrackerMaintainerRowsHaveLeadAction: runs the real pipeline (buildStageTrackerover the shared fixture + a 015 issue, a 090 untrusted-author PR and areporter_triagesidelined issue), marshals every row the server marks maintainer-moved and asserts each yields an enabled lead and exactly one button.TestStageTrackerAcceptTriage*menu composition unchanged;TestStageTrackerRowActionsWiring(tokens-only CSS) and the row-HTML node suites pass (stageTrackerLeadButtonHtmlistypeof-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 explicittrusted_loginsor by GitHubauthor_association(default OWNER / MEMBER / COLLABORATOR). There is no notion of "clanker owned by a trusted human" orrole/trustedon the issue side; those labels govern PR merge trust (#5117), not the issue gate. @onkar717 is a plain GitHubUser(not a bot), so #15437–#15440 were judged as a human reporter: not intrusted_logins, association not in the trusted set →reporter_triage, a maintainer'striage/acceptedrequired. 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: addonkar717toissue_filter.reporter_trust.trusted_logins.Why
author_kindwasnullon those rows — fixed in this PR (first commit). A sidelined issue (reporter triage, filtered, hold, …) reaches the tracker asgithub.RepoWorkIssue, which did not carryIssue.AuthorIsHuman;stage_tracker.gorebuilt agithub.Issuefrom it without the flag, sostageTrackerAuthorKindcould not inferhuman.RepoWorkIssuenow hasAuthorIsHuman(set via a newClient.workIssuewrapper at all 13 sidelining sites and inrepoWorkIssueFromIssue), and the tracker copies it. Covered byTestWebhookOpenedItemInsertedIntoTracker(rowauthor_kind= human) andTestClassifyWebhookIssue_UnadmittedReporterCarriesTriageRow.Docs
dashboard-sections.md: new The row's lead action, inline under the Activity Monitor row anatomy.dashboard-copy-inventory.md:stageTrackerLeadActionHtmlrow.changelog.d/added-tracker-inline-lead-action.md.Concurrent-edit note: rebased onto
origin/v5after #15449 and #15450 merged and regeneratedstatic/index.html.