Profile page: avatar is a floating orphan — the header did not reflow around it (#390 follow-up) #395
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#395
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 wrong
The #390 profile-page avatar landed in the right corner but as a floating island disconnected from the profile content — the rest of the page didn't reflow around it. Screenshot evidence:
crueber, location/timezone, "Hi there!" bio) is left-aligned on the far left, with a large band of dead whitespace between the two columns.Root cause (code evidence)
web/src/pages/Repos.jsx:291-307— #390 added the avatar as its ownmb-3 flex justify-endrow (:298) above the header row (:308,flex items-center justify-betweenwith the h2 username), rather than integrating it into the header flow. The header itself only contains the username + New-repository button; location, bio, and the profile action buttons render in separate blocks below. Nothing anchors the avatar to the identity content.Fix direction
Compose a real profile header: a two-column flex/grid row — identity content left (username as h1, location · timezone, bio), avatar right (the h-24 circle) — with the avatar's own actions (Regenerate / Remove) grouped under or beside the avatar, and the New-repository + Edit-profile actions either in a shared action row or placed with their related content:
Acceptance criteria
Fixed by #400 (branch fix/issue-395): #400 — composed two-column profile header; CTA choice noted (top-right row above the grid); light+dark via shared layout/ring classes; headless tests + vite build green, browser proof open per workspace rules.
REVIEW PR #400 (fix/issue-395) — verified in scratch worktree /tmp/walhub-395 (pre-existing; left in place). Main worktree untouched (still clean apart from pre-existing untracked .opencode/).
ACCEPTANCE (all vs web/src/pages/Repos.jsx):
(1) Composed header OK — profile-header flex row :316 (identity left: h1 displayName :318, handle, location·timezone, bio via renderBody, Edit profile; avatar right in profile-avatar :354 with Regenerate/Remove beneath :366-373). New-repo CTA in its own top-right row above the grid :310-314 (implementer's call per issue), canWrite-gated as before.
(2) Orphan gone OK — the only 'mb-3 flex justify-end' left is :310 and it holds the CTA, not the avatar; avatar img exists only inside profile-avatar.
(3) Orgs: behavior-identical, NOT byte-untouched as D-WEB-9 claimed — redundant inner isOrg guards folded into the outer Show gate; '{isOrg() ? orgName() : displayName()}' -> '{orgName()}'. One real (correct, #359-aligned) behavior change: owner-profile location/bio/Edit blocks previously also rendered on org pages (old guards lacked !isOrg); now non-org-only so org pages read the org doc alone. Tests pin this. FIXED DOC: pushed
d6175e9rewording D-WEB-9 to 'behavior-identical … owner-profile fields now render non-org-only'.(4) Gates unchanged OK — Edit = getProfile()?.can_edit (:336,:382); avatar actions = isSelf() (:364), Remove on userSrc; isSelf/regenerate/remove/refreshAvatar + invalidate user:/me (:250-281) byte-identical to main. #376 intact.
(5) 390px OK by reasoning (no browser per review instructions — noted explicitly): flex-col-reverse + identity-first DOM paints avatar on top, both columns full-width (flex-1 / shrink-0, flex-wrap buttons), no dead half-width band.
(6) h1 OK — single h1 on the page (:318, user only); org keeps h2 (:400, mutually exclusive Shows); ProfileForm has no headings; displayName() falls back to owner slug.
(7) No-avatar self keeps Regenerate OK — column gate 'userSrc() || isSelf()' (:353) preserves #376 opt-back-in; correct.
(8) Light+dark OK by reasoning (no browser): ring-zinc-300 dark:ring-zinc-600 kept on avatar; layout classes theme-independent.
(9) No backend change (diff = DEVIATIONS.md + Repos.jsx + 2 test files), no new deps (package manifests untouched), D-WEB-9 warranted (law 12, follows D-WEB-8 pattern; wording fixed by
d6175e9).TESTS: full 'node --test web/test/unit/*.test.js' = 786 pass / 2 fail; the 2 failures are both server-dependent smoke.test.js cases (they fetch :8080, currently answering 401 from a live instance I did not touch) — smoke.test.js is byte-identical main..branch so definitionally pre-existing/environmental (with no server they skip: 3 skipped). All 8 new profile-header.test.js + rewritten identity-nav #395 test pass (38/38 in the two files). vite build + esbuild SDK build green (chunk-size warning only, advisory).
MERGE RECOMMENDATION: ready to merge.
Fixed by PR #400 (review clean + one D-WEB-9 wording fix by reviewer; header composed, org leak closed, gates intact), merged. Closing.