Move New repository button from profile header into the Repositories section #413
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#413
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?
Move the "New repository" button out of the profile header into the Repositories section
What's requested
On the owner profile page (
/:owner,web/src/pages/Repos.jsx), the New repository button currently renders inside the profile header's action row — grouped with "Edit profile" under the bio (user profile, lines ~326-337) and in the org title row (orgs, lines ~404-408). Move it into the Repositories section, so the header carries only identity/profile actions and the primary create CTA sits with the list it populates.Evidence (current tree,
0b0e9e6)web/src/pages/Repos.jsx:326-337— user profile action row:<Show when={canWrite()}><A class="btn primary px-3 py-1" href="/new?owner=…">New repository</A></Show>sits beside "Edit profile" under the bio. The header closes with a bottom divider (pb-6 border-b), then the Repositories section follows far below.web/src/pages/Repos.jsx:394-409— org variant: same CTA in the org title row (justify-betweenwith the<h2>), again above the org doc fields and unrelated to the list placement.web/src/pages/Repos.jsx:436-458— the Repositories section is a bare<h3>Repositories</h3>with a count line and the two-column<RepoRow>grid; it has no toolbar row and no CTA.Reference implementation (design language)
Follow the repo's toolbar pattern: a section heading row with the primary CTA right-anchored and the count/metadata beside the heading — the same
flex items-center justify-betweentitle-row shape the org header already uses (Repos.jsx:394), withflex-wrap gap-2for mobile. The heading staystext-base font-semibold; the CTA keepsbtn primary px-3 py-1and its/new?owner=…href withencodeURIComponent.Architecture notes
canWrite()(mirrorsrequire_write; #395 follow-up rule that the button never promises what POST /api/v1/repos refuses); Edit profile still gated on servercan_edit; avatar actions stay self-only (#376). No data-fetch changes;me/profile/org caches untouched.pb-6 border-b, #403) stays; with the CTA gone the user-profile action row collapses to just "Edit profile" — keep the row (or drop the wrapper if the Show reduces to a single button; implementer's call, note it).flex-wrap), CTA full-width or wrapped per #273-#278 conventions.import into {owner()}link (line ~460) may belong with the same toolbar as a secondary action if the implementer prefers; not required.Acceptance criteria
canWrite()and linking to/new?owner=<owner>(pre-filled owner preserved)scrollWidth === clientWidth)Fixed by PR #414 (#414): New repository CTA moves from both header spots into a shared Repositories toolbar — layout only, all gates/fetch/cache unchanged, D-WEB-11 recorded.
Review of PR #414 (fix/issue-413, commit
50e311a) — verified in scratch worktree /tmp/pr414 (removed afterward); main worktree left untouched (still clean on main, only pre-existing untracked .opencode/).Acceptance criteria (all 5 check out):
Tests (scratch worktree, node_modules symlinked from main):
Nits (non-blocking, not fixed to avoid churn): Repos.jsx:391 org '
' open tag sits at 6-space indent vs 8-space '
' at :399 — cosmetic, matches the file's loose JSX indentation; no formatter covers web/.No fixes pushed — nothing functional to fix. MERGE RECOMMENDATION: ready to merge.
Fixed by PR #414 (review clean — all 8 checks pass, single instance, gates byte-identical), merged. Closing.