Fix #314: milestones page rework #317

Merged
crueber merged 1 commit from fix/issue-314 into main 2026-09-11 00:27:56 +00:00
Owner

Reworks the milestones page card layout (web/src/pages/Milestones.jsx) per #314:

Open milestone cards: title is now a plain heading (+ state chip + counts), progress bar and MilestoneIssues list unchanged, then a footer row with an explicit "View N issues" button LEFT (an <A class="btn"> to the same ?milestone=<id> filter the old title-link used) and Close / Delete RIGHT-aligned (ml-auto), Delete styled btn danger (red, both themes — existing ui.css rule). No typed-confirm added (kept existing no-confirm behavior).

Closed milestones: collapse to a single line each in a muted "Closed" section below the open cards — linked title (same filter href), Reopen button, open/closed counts right-aligned. No progress bar, no issues list, no Delete. Trade (as the issue anticipates): a closed milestone is deleted after reopening, or via the API.

Notes / implementer's calls:

  • Empty milestones (0 issues) still render the button ("View 0 issues" → empty filtered list) so the affordance is consistent.
  • Unknown milestone states fail visible in the open section (never silently collapsed).
  • Triage gating (server-side) and counts/progress math unchanged. Keyboard: all affordances are native links/buttons. Dark/light via existing card/btn/chip/muted tokens; footer/closed rows flex-wrap + truncated closed titles for 390px widths.
  • Closed-vs-open split lives in testable pure helpers (splitMilestones, milestoneFilterHref, milestoneTotal in web/src/lib/milestones.js).

Tests: node --test web/test/unit/*.test.js — 600 pass, 0 fail (4 new tests for the helpers); vite build green; no new deps. Live-browser check not performed (shared obscura daemon blocks loopback; per task instructions did not start a daemon) — markup uses only existing theme tokens and semantic controls.

Reworks the milestones page card layout (`web/src/pages/Milestones.jsx`) per #314: **Open milestone cards:** title is now a plain heading (+ state chip + counts), progress bar and `MilestoneIssues` list unchanged, then a footer row with an explicit **"View N issues"** button LEFT (an `<A class="btn">` to the same `?milestone=<id>` filter the old title-link used) and **Close / Delete RIGHT-aligned** (`ml-auto`), Delete styled **`btn danger`** (red, both themes — existing `ui.css` rule). No typed-confirm added (kept existing no-confirm behavior). **Closed milestones:** collapse to a single line each in a muted **"Closed"** section below the open cards — linked title (same filter href), **Reopen** button, open/closed counts right-aligned. No progress bar, no issues list, no Delete. **Trade (as the issue anticipates):** a closed milestone is deleted after reopening, or via the API. **Notes / implementer's calls:** - Empty milestones (0 issues) still render the button ("View 0 issues" → empty filtered list) so the affordance is consistent. - Unknown milestone states fail visible in the open section (never silently collapsed). - Triage gating (server-side) and counts/progress math unchanged. Keyboard: all affordances are native links/buttons. Dark/light via existing `card`/`btn`/`chip`/`muted` tokens; footer/closed rows `flex-wrap` + truncated closed titles for 390px widths. - Closed-vs-open split lives in testable pure helpers (`splitMilestones`, `milestoneFilterHref`, `milestoneTotal` in `web/src/lib/milestones.js`). **Tests:** `node --test web/test/unit/*.test.js` — 600 pass, 0 fail (4 new tests for the helpers); `vite build` green; no new deps. Live-browser check not performed (shared obscura daemon blocks loopback; per task instructions did not start a daemon) — markup uses only existing theme tokens and semantic controls.
Open cards: plain title heading + chip + counts, progress bar,
MilestoneIssues list, footer row with explicit 'View N issues' link
(left, same ?milestone= filter href) and Close/Delete right-aligned
(Delete = btn danger). Closed milestones collapse to one line each
(linked title, Reopen, counts) in a Closed section: no bar, no list,
no Delete (delete after reopen, or via API).

Pure split/href/total helpers in lib/milestones.js with node --test
coverage; triage gating and counts math unchanged.
Sign in to join this conversation.
No description provided.