Repo header action strip: uneven gaps between Star/Watch/Fork/Clone pills — one spacing mechanism for the row #463
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#463
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
The Star/Watch/Fork/Clone action strip in the repo header renders with uneven gaps between its pills. One spacing mechanism for the whole row should own the gaps; no element in the row should add invisible layout.
Evidence (static read of
web/src/pages/Repo.jsxon main,06c9743)Repo.jsx:615:<div class="ml-auto flex items-center gap-2">—gap-2is the intended single spacing mechanism.Repo.jsx:618places<TasksOverlay repo={repoClient} />between WatchToggle and the summary-gated Fork/Clone pair. TasksOverlay's returned tree is an unconditional wrapper<div class="tasks-indicator relative" ref={root}>(Repo.jsx~line 434) whose inner<Show when={getRunning().length || getDone().length}>guards only the pill button.gapapplies on both sides of it, so the Star-to-Watch gap renders as 2× gap-2 (16px) while Watch-to-Fork and Fork-to-Clone get the normal 8px. That is the uneven gap.<button class="btn px-2 py-1 text-sm">, Fork is<A class="btn px-2 py-1 text-sm">(636), Clone is<summary class="btn ...">inside<details class="clone-menu relative">(99) — the<details>element (block,.clone-menu { position: relative }inweb/css/repo.css:90) is the flex item, which matches metrics today but means nothing in the row itself enforces consistent spacing if any one child is absent or wrapped (exactly the TasksOverlay failure).Architecture notes
<Show>above the wrapperdiv(orreturn null/ wrap at the call site) so the flex row contains only real pills;gap-2on the row then owns all gaps by itself. The popover positioning (relativewrapper,absolute right-0drop) must keep working when tasks ARE running — the wrapper only exists when the pill exists.hidden/display: contentswhen the inner Show is false). Either way, the rule is: no idle element contributes a flex item to this row.gap-2distribution, so no per-pair spacing rules are needed or allowed.Acceptance criteria
gap); no child element adds, removes, or doubles spacing.Fixed by #473 — TasksOverlay renders nothing when idle (guard Show above the wrapper div), gap-2 owns all spacing, #447 contract extended to spacing. New headless test header-gap-463.test.js (5/5 green); targeted suites 55/55; full web 980/982 (2 smoke failures pre-existing on baseline); vite build clean.
Review of PR #473 (fix/issue-463,
faae6b7) — verified in a scratch worktree (created /tmp/pr473, removed afterward with --force; main worktree left clean, no checkouts/edits there; no live instance, docker, or volume touched; no browser — node tests + source reasoning, as instructed).Scope matches expectations exactly: web/src/pages/Repo.jsx (TasksOverlay Show hoist + #447 comment extension) + new web/test/unit/header-gap-463.test.js. No backend/Go change, no new deps (package.json/go.mod untouched), no docs/infra change.
Findings by checklist (all pass, no fix-ups needed):
Tests (scratch worktree, node_modules symlinked from main): header-gap-463 + header-pills-447 + header-narrow = 19/19 pass; full suite minus server-smoke = 979/979 pass; vite build succeeds in ~2s (only the pre-existing >500kB chunk-size warning). The 2 smoke.test.js failures are environmental, not the PR: something already listens on 127.0.0.1:8080 returning 401 for / (the healthz-ok probe un-skips the tests, then / asserts 200) — a pure-frontend diff cannot cause that, and I left the live process alone per instructions.
MERGE RECOMMENDATION: ready to merge (not merging per instructions).
Fixed by PR #473 (review clean — all 7 checks pass, active states byte-identical), merged. Closing.