Milestones page: explicit View-issues button instead of title-link, right-aligned Close/Delete with danger red, closed milestones collapse to one line #314
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#314
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What's requested
Rework the milestones page card layout (
/:owner/:name/milestones,web/src/pages/Milestones.jsx):?milestone=<id>) — undiscoverable (nothing says the title is clickable). Instead: below the listed issues, an explicit "View N issues"-style button that navigates to the milestone-filtered issue list.<div class="flex gap-1">); move them to the right side of the card (ml-auto/justify-end), and style Delete with the existingbtn dangertreatment (used elsewhere, e.g. release delete).?milestone=<id>link),{open_issues} open · {closed_issues} closed).No progress bar, no issues list, no Delete button for closed milestones.
Current implementation (code evidence)
<li class="card grid gap-1 p-3">renders title-link (state chip + counts) → progress bar →<MilestoneIssues>inline list (oneGET …/issues?milestone=<id>&n=100per milestone,MilestoneIssuesat :21-52) → Close/Delete button row (:139-147).close()→milestones.update(id, {state: open|closed}), triage-gated); delete 409s while open issues reference the milestone (documented in the file header) — which is why closed milestones currently still show Delete; removing Delete from the closed shape is safe since a closed milestone's deletion can be done after reopening (or via API) — note this trade in the PR.?milestone=filter link already exists on the title (:116-123); reuse the same href for the new button.Design details
MilestoneIssueslist; then a footer row: "View issues" button left, Close / Delete right (Delete =btn danger, keep the existing no-confirm behavior or add the typed-confirm if trivial — implementer's call, note it).Acceptance criteria
/:owner/:name/issues?milestone=<id>.btn dangerred.MilestoneIssues/the page's state logic is factored (the closed-vs-open render split should live in testable pure logic where practical).PR #317 (fix/issue-314) implements the rework: open cards get the explicit View N issues button left + right-aligned Close/Delete (danger-red), closed milestones collapse to one-line rows in a Closed section. Trades noted in the PR (delete-after-reopen; View 0 issues still rendered). Tests: 600/600 node --test green, vite build green.
Review of PR #317 (fix/issue-314, commit
5ee195c) — verified in scratch worktree /tmp/pr317 (node tests + reasoning, no browser per instructions).PASS — all checklist items hold:
NIT (non-blocking): an unknown-state milestone renders in the open section with a Close label, but close() would PATCH state->open for it (toggle logic, Milestones.jsx:82). Unreachable in practice (server emits only open/closed) and fail-visible placement is correct — leaving as-is.
VERIFY: node --test web/test/unit/*.test.js → 600/600 pass (incl. 11/11 milestones incl. 4 new #314 tests); vite build OK in 1.84s (only pre-existing chunk-size warning). Note: scratch worktree initially lacked web/node_modules (gitignored), so markdown-dependent suites errored until node_modules was symlinked from the main worktree — environmental, not PR-caused.
RECOMMENDATION: ready to merge.
Fixed by PR #317 (review clean; open/closed shapes, gating, helpers verified; 600/600), merged. Closing.