Skip to content

feat(web): Labels and Milestones pages to create, edit and delete them - #257

Merged
PastaPastaPasta merged 4 commits into
masterfrom
fix/qw-labels-milestones
Sep 30, 2026
Merged

PastaPastaPasta merged 4 commits into
masterfrom
fix/qw-labels-milestones

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

What

QW-019: there was no web UI for creating or managing milestones or labels. The milestone picker said "No open milestones (dg milestone create)", and labels could only be created inline, with no way to recolour, redescribe or delete them.

Issues and pull requests now have a Labels | Milestones switch beside the search box, as GitHub does. It leads to two new pages, which sit under the Issues tab.

/repo/labels

  • Lists the repo's labels: chip, description, and links to their Issues and Pull requests. A search box filters them.
  • Members (maintainers and writers) can create a label: name, description, and a colour from GitHub's palette, a random pick or a hex value, with a live preview.
  • Members can edit a label's colour and description, and delete it.
  • Delete follows dg label delete: it removes your definitions of the label. If another member also defined it, a retirement is written first, and the confirm dialog prices exactly that.
  • Retired labels are listed separately and can be restored, with a form to pick the colour and description.

/repo/milestones

  • Open and Closed tabs with counts.
  • Each milestone shows its due date ("Past due by N days" in red), description, and a progress bar with % complete and open / closed counts across its issues and PRs.
  • Each milestone links to the Issues and PR lists filtered with milestone: (from fix(web): apply GitHub's issue and PR search qualifiers, and page past the end #246).
  • Members can create, edit, close, reopen and delete milestones.

Issue sidebar

  • The milestone picker links to "Create a milestone" (the page with its form open) or "Manage milestones".
  • The label picker links to "Edit labels".

Also added: short URLs /owner/repo/labels and /owner/repo/milestones, page titles, and the header tab.

Why this way (the RC1 contracts are frozen)

  • label (forge-core) and milestone (forge-community) documents are member-gated, immutable and owner-deletable. The newest definition of a name or title wins.
  • Edits. An edit or a close writes a new definition. Names and titles are fixed once defined: an issue carries a label or milestone by its name, so a rename would leave every issue under the old one. The form says so; GitHub's rename can't be done without rewriting every item.
  • Deleting a milestone that another member also defined is refused, and closing it is offered instead. Deleting only your own definitions would bring theirs back.
  • Private repositories: milestones there are sealed, which neither this build nor dg does yet, so they are refused there with a note. Label definitions are plaintext by design, as the guide already says.
  • Progress comes from the member-event feed the lists share: the targets with a milestone event, resolved by id. A feed too large to read says "progress unknown", and a failed read says it failed; neither shows wrong numbers.

Tests

  • label-milestone-writes.test.ts: deleteLabel in both cases (all definitions yours, and retire-then-delete), defineMilestone including private-repo and schema refusals, deleteMilestone refusing when another member also defined the title, and dueOnOf / dayOf (matching the CLI's parse_day).
  • labels-milestones.test.tsx (jsdom):
    • Labels, as a member and as a visitor: rows, links, the retired list, name conflicts, the name fixed on edit, and the delete confirm.
    • Milestones: tabs, progress, past-due, links, delete refused when another member defined the milestone, and the private-repo note.
  • repo-header.test.ts and short-url.test.ts: the new routes.

Gates: tsc --noEmit clean; the full vitest run passes (4411); eslint is clean on the changed files. A code review ran; its fixes are in 6adc237e.

Live check (bonsia)

Evidence is in dash-forge-qa/evidence/qa-wave-bonsia/fixes/issues-search/:

  • c1–c3 (read-only, qa-issuesprs-main, as a visitor, in both themes at desktop and 390 px): the labels page lists bug and enhancement with no write controls; the milestones page shows v1.0 at 0% complete with 1 open; the Issues list shows the Labels | Milestones switch.
  • c4–c11 (this stream's own scratch repo DYXPkp8…/qw-issues-search-scratch, signed in as its owner): a full round trip in the web at desktop light and 390 px dark.
    • Labels: create (the form), edit colour and description, delete.
    • Milestones: create with a due date ("Due by December 1, 2026"), close (it moves to the Closed tab), delete.
    • Every step was signed and confirmed on Platform.

🤖 Generated with Claude Code

PastaPastaPasta and others added 2 commits September 30, 2026 10:30
QW-019: there was no web UI to create or manage milestones or labels; the issue picker pointed at 'dg milestone create' and labels could only be created inline, with no recolor, description edit or delete.

Issues and Pull requests now carry a Labels | Milestones switch, as on GitHub. /repo/labels lists the labels with links to their issues and PRs and lets members create one (name, description, colour with GitHub's palette and a preview), edit its colour and description, and delete it (the signer's definitions, retiring it first when another member also defined it, parity with dg label delete); retired labels can be restored. /repo/milestones lists open and closed milestones with due dates, descriptions and progress over their issues and PRs, and lets members create, edit, close, reopen and delete them (refused, with close offered, when another member also defined the title). Names and titles stay fixed once defined, since issues carry them by name. Private repositories' milestones stay refused, as in dg. The issue sidebar's pickers link to both pages.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ne forms against the schema

A label delete that writes a retirement was previewed as a single refund, so the affordability check was skipped. The dialog now reads the label's definitions first (planLabelDelete, shared with deleteLabel) and prices the retirement plus each delete. The label and milestone forms now run checkLabelInput and checkMilestoneInput, so input over the byte limit is refused in the form rather than failing at the confirm step. A label name that differs only in case is refused, as in the issue picker, and a retired name points to Restore. Restoring a retired label now opens a form to choose its colour and description instead of picking a random colour. The milestones page reads the milestone documents once instead of twice, tells a failed issue or PR read apart from a feed that is too large, and links the PR list next to the issue list because its counts include PRs. The picker's Manage milestones link opens the list, and only Create a milestone opens the form. issueMilestoneItems and pullMilestoneItems now share rowsWithEvent, which skips a feed entry with no target id.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 3313a594-c4b7-49e1-a5b5-53974aa7c39d

📥 Commits

Reviewing files that changed from the base of the PR and between 00d82bb and ebd190a.

📒 Files selected for processing (28)
  • crates/forge-core/src/collab/parity.rs
  • docs/guides/collaborating.md
  • forge-web/app/repo/labels/client.tsx
  • forge-web/app/repo/labels/page.tsx
  • forge-web/app/repo/milestones/client.tsx
  • forge-web/app/repo/milestones/page.tsx
  • forge-web/components/repo/issue-content.tsx
  • forge-web/components/repo/issues-content.tsx
  • forge-web/components/repo/labels-content.tsx
  • forge-web/components/repo/labels-milestones.test.tsx
  • forge-web/components/repo/milestones-content.tsx
  • forge-web/components/repo/pull-content.tsx
  • forge-web/components/repo/pulls-content.tsx
  • forge-web/components/repo/repo-header.test.ts
  • forge-web/components/repo/repo-header.tsx
  • forge-web/components/repo/target-rail.tsx
  • forge-web/components/repo/triage-nav.tsx
  • forge-web/lib/page-title.ts
  • forge-web/lib/repo/index.ts
  • forge-web/lib/repo/issue-index.ts
  • forge-web/lib/repo/label-milestone-writes.test.ts
  • forge-web/lib/repo/labels.ts
  • forge-web/lib/repo/milestones.ts
  • forge-web/lib/repo/pull-index.ts
  • forge-web/lib/repo/target-index.ts
  • forge-web/lib/short-url.test.ts
  • forge-web/lib/short-url.ts
  • forge-web/lib/utils.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

PastaPastaPasta and others added 2 commits September 30, 2026 10:58
…e milestone deletes per definition

A retried label delete could replay its cached retirement and then delete it as one of the signer's definitions, bringing another member's definition back. The plan now keeps the signer's own newest retirement, and the delete never removes the document it just wrote. The milestone delete dialog prices one delete per definition the signer wrote. The guide no longer says PRs can be put in milestones, and dg's private-milestone refusal no longer points at the web app, which refuses them too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@PastaPastaPasta

Copy link
Copy Markdown
Owner Author

Pre-merge check: I merged origin/master in and ran a code-review-validator pass. The label and milestone write semantics match dg / forge-core. Fixed in ebd190a:

  • Retrying a label delete could undo the retirement. A replayed retirement could be deleted as one of the signer's own definitions. The delete plan now keeps the signer's newest retirement, and the delete never removes the document it just wrote. There are two new tests for this.
  • Milestone delete pricing. The confirm dialog now prices one delete per definition the signer wrote.
  • Guide wording. collaborating.md no longer says PRs can be put in milestones.
  • dg's private-milestone refusal. It no longer says "use the web app", since the web refuses them too.

Left as is:

  • A milestone title containing " can't be expressed in the issue query language, which strips quotes. That limitation predates this PR.

Gates after the merge: tsc --noEmit, vitest run (4433 passed), eslint on the changed files, cargo fmt --check, clippy -D warnings and cargo test --workspace.


🤖 Posted autonomously by Claude on behalf of pasta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant