Unable to apply label to issue. #45

Closed
opened 2026-09-04 17:46:44 +00:00 by crueber · 3 comments
Owner

I created a label

image

and I'm unable to apply it to an issue anywhere. It should have a way in the labels section on the right sidebar in the individual issue view. it should also show all applied labels in the issue list, but I can't tell if it's there or not since I can't apply one.

It should show on the right sidebar here for sure: image

I created a label ![image](/attachments/6be8b61d-3c1a-425b-adf6-8b97c318bde7) and I'm unable to apply it to an issue anywhere. It should have a way in the labels section on the right sidebar in the individual issue view. it should also show all applied labels in the issue list, but I can't tell if it's there or not since I can't apply one. It should show on the right sidebar here for sure: ![image](/attachments/27ad69e7-e985-450e-a782-7be2f639540f)
Author
Owner

Fixed by PR #57 (branch fix/issue-45): the sidebar LABELS card now has a working label picker (triage-gated, one PATCH per toggle with optimistic update) and applied labels show with colors on the issue list. Root cause was UI-only — the PATCH …/issues/{num} labels endpoint already worked; the 08 §2 LabelPicker was specified but unbuilt. Browser-verified on both themes with zero console errors.

Fixed by PR #57 (branch `fix/issue-45`): the sidebar LABELS card now has a working label picker (triage-gated, one PATCH per toggle with optimistic update) and applied labels show with colors on the issue list. Root cause was UI-only — the `PATCH …/issues/{num}` `labels` endpoint already worked; the 08 §2 LabelPicker was specified but unbuilt. Browser-verified on both themes with zero console errors.
Author
Owner

Review of PR #57 (fix/issue-45, commit f6db534) — sidebar label picker + list label colors.

METHOD: scratch worktree at /tmp/pr57 @ origin/fix/issue-45 (main worktree untouched, read-only). No docker/browser per review instructions; node tests + vite build + code reasoning.

VERIFIED:

  • node --test web/test/unit/*.test.js in scratch worktree: 242 pass, 0 fail (includes new labels.test.js; note: scratch worktree needs web/node_modules — symlinked read-only from main worktree, no install).
  • vite build with repo-pinned local vite: OK (107 modules transformed, chunks rendered).
  • No backend change needed — CONFIRMED: PATCH {labels} key exists (internal/issues/http.go:240 allowlist :482, labels key handling), index cards carry labels[] (02 §2 projection), SDK issues.patch + labels.list already exist. Pure web/ change, 5 files.
  • Law 1: no new deps (package.json untouched; imports are solid-js + local lib only). Law 7: N/A (synchronous PATCH, no task). Law 8: no new seams/routes. Law 12: no doc edit needed — implements the already-specified 08 §2 LabelPicker contract + 02 §3.1 deleted-label rendering; commit message cites sections.

REVIEW CHECKLIST (all pass):

  • Triage gating: Issue.jsx:58,342 canTriage()=roleAtLeast(role(),triage) via shared perms helper, Show-gated picker; matches 02 §7 (labels keys: triage) and 08 §5; server authoritative with 403→tray. Anonymous/read see chips only.
  • One PATCH per toggle: Issue.jsx:207 issues.patch(num(),{labels:next}) with full next set; toggleLabel (lib/labels.js:17) returns sorted unique array, case-insensitive remove — matches PATCH contract.
  • Optimistic update: Issue.jsx:205 patchCached + :211 reload() (guarded invalidate/new generation) — correct reuse of the #36/#42 bump pattern in the same file (:138-145); generation retirement + reconcile/rollback semantics hold.
  • Deleted-label rendering: LabelPicker.jsx:28-41 LabelChip uses labelColor→null for unknown names, Show-gates the dot, renders bare string — 02 §3.1 self-heal rendering, no crash (labelColor null-safe on missing map; Issues.jsx:48 labelColorMap handles undefined).
  • List efficiency: Issues.jsx:47 single shared useData labels:{o}/{r} (30s TTL, same key as thread-page picker) — one cached entry, promise-cache single-flight, no per-card fetch.
  • a11y: aria-pressed true/false on native buttons (LabelPicker.jsx:65), role=group + aria-label, keyboard-native; inline list means no focus-trap/Esc needed (08 §7 trap rule targets modals — documented in file header; accepted).
  • Theming: dot carries color, text stays theme foreground; dark: variants on borders/headers match existing patterns.

NITS (non-blocking, no fix pushed):

  • Issue.jsx:200-217 busy-clear is not in finally (reaction withBusy at :119 uses try/finally). patchCached/invalidate cannot throw (both guarded), so no stuck-disabled path exists today — consider finally for symmetry in a follow-up.
  • Issues.jsx:48 colorMap() builds a new Map per evaluation; fine at label-set scale, memoize only if ever measured hot.

MERGE RECOMMENDATION: ready to merge.

Review of PR #57 (fix/issue-45, commit f6db534) — sidebar label picker + list label colors. METHOD: scratch worktree at /tmp/pr57 @ origin/fix/issue-45 (main worktree untouched, read-only). No docker/browser per review instructions; node tests + vite build + code reasoning. VERIFIED: - node --test web/test/unit/*.test.js in scratch worktree: 242 pass, 0 fail (includes new labels.test.js; note: scratch worktree needs web/node_modules — symlinked read-only from main worktree, no install). - vite build with repo-pinned local vite: OK (107 modules transformed, chunks rendered). - No backend change needed — CONFIRMED: PATCH {labels} key exists (internal/issues/http.go:240 allowlist :482, labels key handling), index cards carry labels[] (02 §2 projection), SDK issues.patch + labels.list already exist. Pure web/ change, 5 files. - Law 1: no new deps (package.json untouched; imports are solid-js + local lib only). Law 7: N/A (synchronous PATCH, no task). Law 8: no new seams/routes. Law 12: no doc edit needed — implements the already-specified 08 §2 LabelPicker contract + 02 §3.1 deleted-label rendering; commit message cites sections. REVIEW CHECKLIST (all pass): - Triage gating: Issue.jsx:58,342 canTriage()=roleAtLeast(role(),triage) via shared perms helper, Show-gated picker; matches 02 §7 (labels keys: triage) and 08 §5; server authoritative with 403→tray. Anonymous/read see chips only. - One PATCH per toggle: Issue.jsx:207 issues.patch(num(),{labels:next}) with full next set; toggleLabel (lib/labels.js:17) returns sorted unique array, case-insensitive remove — matches PATCH contract. - Optimistic update: Issue.jsx:205 patchCached + :211 reload() (guarded invalidate/new generation) — correct reuse of the #36/#42 bump pattern in the same file (:138-145); generation retirement + reconcile/rollback semantics hold. - Deleted-label rendering: LabelPicker.jsx:28-41 LabelChip uses labelColor→null for unknown names, Show-gates the dot, renders bare string — 02 §3.1 self-heal rendering, no crash (labelColor null-safe on missing map; Issues.jsx:48 labelColorMap handles undefined). - List efficiency: Issues.jsx:47 single shared useData labels:{o}/{r} (30s TTL, same key as thread-page picker) — one cached entry, promise-cache single-flight, no per-card fetch. - a11y: aria-pressed true/false on native buttons (LabelPicker.jsx:65), role=group + aria-label, keyboard-native; inline list means no focus-trap/Esc needed (08 §7 trap rule targets modals — documented in file header; accepted). - Theming: dot carries color, text stays theme foreground; dark: variants on borders/headers match existing patterns. NITS (non-blocking, no fix pushed): - Issue.jsx:200-217 busy-clear is not in finally (reaction withBusy at :119 uses try/finally). patchCached/invalidate cannot throw (both guarded), so no stuck-disabled path exists today — consider finally for symmetry in a follow-up. - Issues.jsx:48 colorMap() builds a new Map per evaluation; fine at label-set scale, memoize only if ever measured hot. MERGE RECOMMENDATION: ready to merge.
Author
Owner

Fixed by PR #57 (review clean with 2 non-blocking nits; 242/242 node tests), merged. Closing.

Fixed by PR #57 (review clean with 2 non-blocking nits; 242/242 node tests), merged. Closing.
crueber added this to the v1 milestone 2026-09-10 22:20:44 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crueber/walhub#45
No description provided.