Fix #324: one-click label packs #333
No reviewers
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 milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!333
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-324"
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?
Empty-state label-pack offer (GitHub + GitLab default sets, hex verified against live palettes) with one-click creation via sequential labels.create calls.
Final pack lists + sources (verified 2026-09-11)
GitHub pack (8 labels) — source:
GET https://api.github.com/repos/albandil/Hex/labels, the 8 entries flagged"default": trueon a pristine repo:Note: the issue sketch listed 9 labels incl.
documentation(#0075ca), but the live API shows it is NOT among GitHub's current defaults, so the pack ships the 8 live-verified defaults rather than a stale memory.GitLab pack (8 labels) — source: docs.gitlab.com Manage > Labels (names: bug, confirmed, critical, discussion, documentation, enhancement, suggestion, support) + colors from
lib/gitlab/issues_labels.rb@ master (gitlab-org/gitlab, fetched via the public API):GitLab generates no descriptions, so those entries carry none. Note: the issue sketch guessed an
improvementlabel — the live source hassuggestioninstead. No scoped (::) labels, per the issue.Creation mechanics — decision: option (a), sequential client-side POSTs
No bulk endpoint. One click fires sequential
labels.createcalls through the existing endpoint (8 requests, human-rate — same precedent as uploadFilesSequential). Rationale: zero backend change, triage gate enforced per request server-side, trivially correct; partial failure reports per label into the error tray and the reload shows what landed. Existing names are skipped case-insensitively (idempotent-ish re-add). A bulkPOST …/labels/packstays a follow-up if atomicity ever matters. No route-provider seam touched, so law 8 is untouched.Gating / visibility
Chooser renders only when
labels.length === 0(a repo that deletes all labels sees it again — accepted per the issue). Buttons render for everyone exactly like the create form (no new client gating invented); the server 403s non-triage per request. Preview chips are color dots + default text (legible light/dark); cards collapse to one column undersm:(390px OK).Tests
web/test/unit/label-packs.test.js: per-pack count (8), no case-insensitive dup names, 6-hex colors, name/description bounds per 02 §3.1,missingFromPackskip semantics.node --test web/test/unit/*.test.js: 620/620 pass.vite build: green. No backend touched → no go tests. No new deps.17f3a5bd9dtof0de0e71da