Unify Star/Watch/Fork/Clone header pills into one idiom (Star/Watch canonical): counts left of label, one aligned row #447
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#447
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
Unify the repository header action pills — Star, Watch, Fork, Clone — into ONE idiom, with the Star/Watch button style as the canonical pattern. All counts render on the LEFT of the label, and all four controls sit aligned on one row in the header actions cluster.
Current behavior (evidence)
web/src/pages/Repo.jsx, header actions cluster (.repo-headerright side, ~line 610-627):StarToggle, ~line 333):btn px-2 py-1 text-smbutton rendering★ {stars}— glyph+count, no text label.WatchToggle, ~line 179):btn px-2 py-1 text-smbutton rendering{watchers}with a glyph — glyph+count, no text label.<A class="pill">anchor renderingFork {forks}— LABEL-then-count (count on the RIGHT), and a different container class (pillvsbtn).CloneMenu, ~line 99):<summary class="pill">—pillcontainer, label only.Result: three container styles (
btnx2,pillx2) and two count placements (count-only vs label-then-count). The row reads as two families of control rather than one action strip.Canonical idiom (Star/Watch style)
btn px-2 py-1 text-smshape (toggles keep theirprimaryactive state; Fork stays an<A>link styled to the same metrics; Clone's<summary>adopts the same shape as its trigger).3 Star,2 Watch,4 Fork,Clone(no count). The glyph convention Star/Watch use may be kept, but the count must sit left of the text label in every case.ml-auto flex items-center gap-2cluster keeps all four on a single aligned row; no wrapping/orphans at narrow widths (follow the repo's mobile-collapse precedent from #438).Relationship to #446 (superseded)
#446 asked to render the fork count inside a
.tab-badgecount circle on the Fork button. That direction adds a second count idiom where the header needs one: this ticket absorbs and supersedes it. Closing #446 in favor of this one.Architecture notes
s().forks) — no new requests, no ETag concern (display-only).0 Forklike Star/Watch show0or keep it hidden; implementer's call, noted in the PR.Repo.jsx(+ possibly a shared small component if Star/Watch/Fork/Clone triggers want one source of the shape); no API, store, or routing changes.Acceptance criteria
btnstyle as canonical) in the header actions cluster.{n} Star,{n} Watch,{n} Fork); Clone renders label-only, same shape.Fixed by #454 (PR: unify header pills on the Star/Watch btn idiom, counts left of label). Headless tests + vite build green; no backend change.
Review #454 (fix/issue-447) — verified head-to-head in scratch (/tmp/wt-447 branch vs /tmp/wt-447-main pristine origin/main, node_modules symlinked from main in both; no browser per instructions — node tests + reasoning, explicitly noted):
ACCEPTANCE (all 5 met):
(1) One shape: Star/Watch buttons (Repo.jsx:207,362), Fork A-link (:636), Clone summary (:99) all carry btn px-2 py-1 text-sm; toggles keep primary, Fork stays a link, Clone stays popover trigger. (2) Count-left-of-label: {n} Star, {n} Watch, {n} Fork; Clone label-only, no interpolation (glyphs kept). (3) Fork zero-count: always renders incl. 0 (no hidden-at-zero conditional), noted in code comment + 12_web_ui entry + test. (4) #446 absorbed: closed with two #447 cross-ref comments; tab-badge-circle rejection noted in code + doc + test. (5) One row: ml-auto flex items-center gap-2 cluster (:615) and repo-header flex-wrap (:542) byte-identical to main; narrow widths collapse as one unit per #438 precedent; 390px arithmetic pinned. (6) Behavior byte-identical: diff touches only classes/labels — flip/reconcile, Fork nav, Clone popover (lazy recipes, outside-click, Esc) untouched and pinned. (7) #285/#438 pins faithful: social-toggles rewritten to the labeled idiom (supersede noted in test header, a11y/pressed/active kept); fork-438 matched-pair retargeted pill to btn. (8) No backend change, no new deps (5 files: Repo.jsx + 3 tests + 12_web_ui.md); doc entry accurate after review fix below.
TESTS (head-to-head full node suite): branch 957 total / 955 pass / 2 fail vs main 950 / 948 / 2 — failing set file-by-file identical (only the 2 live-server smoke.test.js subtests needing a live Go server). +7 net new, zero PR-caused. The 837/822/15 claim in the PR body + doc entry does NOT reproduce in-scratch (no blob-md/data-guard/etc. failures here). vite build green (2.23s).
REVIEW FIX (pushed
771f762to origin/fix/issue-447): corrected the 12_web_ui.md #447 entry to the verified 957/955/2 vs 950/948/2 numbers (Law 12; same correction pattern as #453 review). Re-tested after fix: 16/16 on the three touched files, full suite still 957/955/2. Note: PR #454 description body still carries the stale 837/822/15 numbers — consider updating it for the record.Browser proof open (shared-daemon loopback guard; no private daemon per workspace rules) — noted explicitly, no browser driven.
MERGE RECOMMENDATION: ready to merge (after optional PR-body number touch-up; not merge-blocking).
Fixed by PR #454 (review clean + test-count doc fix by reviewer; all 8 checks pass, #446 absorbed), merged. Closing.