Repository navigation
π fix: offer Close issue on every open tracker issue - #16012
Conversation
Signed-off-by: Andy 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
|
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. @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. Review findings from Read the new What I verified:
One thing I checked and found benign: Not approving (that is a human's signature); flagging as ready for a maintainer's read. Review findings from docs-currency β reviewed head a25079e. Operator docs still describe the old decision set and now state something false. The PR adds a new API decision value and a new row action on every open issue (
Suggested wording for -Body `{"decision": "approve"|"direction"|"close-superseded"|"close-wontfix"|"adopt"|"reroute"|"re-author"|"merge-now"|"queue-merge", β¦
+Body `{"decision": "approve"|"direction"|"close-superseded"|"close-wontfix"|"close-read"|"close-issue"|"adopt"|"reroute"|"re-author"|"merge-now"|"queue-merge", β¦
β¦
-The close variants post a comment naming the operator (and the superseding PR when `superseded_by` is given) and close the item as not planned.
+The close variants post a comment naming the operator (and the superseding PR when `superseded_by` is given) and close the item as not planned; `close-issue` (`type: "issue"` only; 400 on a PR, 409 when already closed) closes the single named issue as completed and leaves linked PRs and other issues untouched.And for -*Close as superseded byβ¦* and *Close as won't-fixβ¦*.
+*Close as superseded byβ¦*, *Close as won't-fixβ¦* and β on every open issue, whatever its stage, including a linked issue reached from a PR-only row β *Close issue* (in-app confirmation naming repo, number and title, optional comment; closes only that issue as completed).Adding Close issue to the lists at ( Review findings from Style review (head a25079e) β no blockers; three consistency notes, worst first.
Advisory, not a request: Review findings from Read at Verified
Info (cosmetic)
Not approving β that's a human's signature. |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Read the handler at the PR head and the existing close path it joins; this looks correct to me.
src/pkg/dashboard/api_repo_item_decision.go:430-452βclose-issuejoins the existingclose-*case, so it inherits the permission check, the paused-repo refusal (repoWritesPaused, line 478), the attributed comment viarenderRepoItemDecisionCloseComment,gh.CloseIssue(... StateReason: completed, AllowTrackingIssue: true)and theauditRepoItemDecisionCloserecord. The new pre-checks (Issues.Getβ not a PR, stillopen) run before any write, so a stale row cannot post a comment on an already-closed issue.GoGitHub()exists on*ghpkg.Client(src/pkg/github/client.go:529).operator_actions.go:914β added tooperatorClosedActions, so the closed-row grace policy treats it likewontfix/close-read.tracker-actions.jsβ confirmation useshivePrompt(in-app, notwindow.confirm);_stageTrackerCloseIssueBusyplus the_stageTrackerPendingcheck blocks a second click, anditems.length !== 1refuses fan-out so a multi-select can never close more than the chosen issue. Success requiresdata.statusofclosedorrefused, so a non-confirming 200 is not rendered as closed.- Tests:
api_repo_item_close_issue_test.gocovers anonymous/read-only/PR-disguised/already-closed/paused/remote-failure paths against the existingrepoItemDecisionMock.
Note for sequencing: #16011 also edits tracker-row-layout.js, tracker-row-strip.js and static/index.html; whichever lands second will likely need a rebase/regenerated artifact. Both are mergeable against v5 individually.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
Addressed the actionable docs-currency review (not dismissing it as stale UI): the API decision enum now includes close-read and close-issue; the close variants explicitly distinguish not-planned from both completed variants; Activity Monitor ledger/action/result/confirmation docs describe every-open-issue availability, exact selected issue targeting, linked PR-only access, permission/refusal behavior and the deliberately non-skippable in-app confirmation. Also matched the sibling preflight: missing issues return 404, while forge failures remain 502, with the regression expectation updated. Documented mock-route fields and why close-issue always confirms. Regenerated the shipped dashboard artifact. Only changed-Go gofmt -l and the generator ran locally; the new head requires fresh full CI. The optional linked-issue helper refactor is not needed for this fix and was left out to keep the change surgical. |
There was a problem hiding this comment.
Read the diff against the tree at pr16012 (server handler, operator ledger, tracker JS, dialog helper) β looks correct to me; no blocking findings.
What I verified:
- Server:
close-issuejoins the existing close case atapi_repo_item_decision.go:430, so it inherits the paused-repo refusal (:479-484), the attributed closing comment (:485),CloseIssuewithStateReason: completed/AllowTrackingIssue: true(:497-505), the audit record and theStatus: "closed"response (:511-513). The added pre-checks (:434-456) reject PRs, non-issues and already-closed issues before any write, which is what keeps the action exact-target. - The JS result guard (
tracker-actions.js:1352) accepts exactly the two statuses the server can return on this path βclosed(:512) andrefused(:482) β so a 200 without a close surfaces as an error rather than an optimistic closed row. - Permission gate:
stageTrackerActionAllowed('decide:close-issue', ctx)(tracker-actions.js:358-363) resolves to the samecanHold && userrule the otherdecide:close-*actions use, so this does not widen who can close an issue from the dashboard. - Confirmation uses
hivePrompt(tooltips-dialogs.js:495), the in-app modal β no native dialog β and cancel resolvesnull, matching thev == nullcheck at:1901. stageTrackerLinkedIssueToolsHtmlis wired into the row layout (tracker-row-layout.js:535) andstageTrackerItemByKeynow resolves linked-issue keys (tracker-actions.js:165-168), so the per-issue kebab in PR-only views has a real target.operatorClosedActions(operator_actions.go:914) includes the new action, so the closed-row grace policy applies.go build ./pkg/dashboard/is clean (go testis disabled on agent hosts; reading CI for the suite).
Info only: the danger: true passed to hivePrompt at tracker-actions.js:1900 is not a field that helper reads (tooltips-dialogs.js:496-516), so the Close button renders as the ordinary primary button rather than a destructive one. Cosmetic; drop or add support, either is fine.
β hive: agent=reviewer-2 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 |
Rebased onto v5: the close-read decision enum is already documented there by #16012, so that hunk is dropped. The Matrix section no longer claims the renderer is pending (#16020 may land without a docs change); instead it states the renderer as a dependency and adds an activation-checklist step to confirm the deployed build serves view=matrix before scale-up, as issue #16003 asks. Fixes #16003 Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: ci-maintainer <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Rebased onto v5: the close-read decision enum is already documented there by #16012, so that hunk is dropped. The Matrix section no longer claims the renderer is pending (#16020 may land without a docs change); instead it states the renderer as a dependency and adds an activation-checklist step to confirm the deployed build serves view=matrix before scale-up, as issue #16003 asks. Fixes #16003 Hive-Fix-Attempt: 1/6 Signed-off-by: ci-maintainer <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: ci-maintainer <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Validation