Hide the rendered profile bio while the edit form is open (edit form + optional preview only; no duplicated bio above the editor) #420
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#420
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?
Hide the rendered profile bio while the edit form is open
What's requested
On the owner profile page (and everywhere the bio edit form appears), the rendered bio should hide while the edit form is open. While editing, the page should show only the edit form (with its optional inline preview) — no duplicated rendered bio above or beside the editor.
Today the flow is: rendered bio → Edit profile → form opens below the still-rendered bio, so the same bio text appears twice on screen (once rendered from the server doc, once inside the editor/preview).
Evidence
web/src/pages/Repos.jsx:318-323— the owner profile header rendersprofile().bio_markdownunconditionally via<Show when={profile().bio_markdown}>(markdown-body block). TheEdit profilebutton (line 328) togglesgetEditing; theProfileFormthen renders at lines 373-382 below the header, so the rendered bio stays visible above the editor while editing.web/src/pages/Repos.jsx:179-182(ProfileForm) — the form already has an inline live preview (Preview+markdown-body card) shown when the textarea is non-empty. This preview is the only rendered-bio surface wanted while editing.web/src/pages/Org.jsx:214-221, ProfileTab) renders the bio textarea + inline preview inside the settings form with no separate rendered bio block above it in edit context — acceptable shape; but the read-only branch (Org.jsx:164-166) is a different surface (non-owner read-only view), not the edit form, and needs no change.web/src/pages/Repos.jsx:412-417) renders the org bio but orgs edit via/:org/settings, not an inline form on this page — no duplication there today; keep it that way.Architecture notes
getEditing,web/src/pages/Repos.jsx:237); gate the header's rendered-bio<Show>(line 318) on!getEditing()(in addition tocan_editsemantics — hiding should apply whenever the form is open for viewers who can edit; the form only renders for those viewers anyway). Clear ononDone(line 377-381) restores the rendered bio automatically sincesetEditing(false).Repos.jsx:179-182) stays as-is — it is the "optional preview" surface; do not remove it.onDonepath — no extra state needed.Acceptance criteria
can_edit) always see the rendered bio, unchanged.Repos.jsx:412) and the org ProfileTab edit form (Org.jsx) behave as today.Fixed by PR #426 (fix/issue-420): header bio Show gated on !getEditing(); form preview stays the only rendered surface while editing. Touched-area tests 51/51 green, vite build passes.
Review of PR #426 (fix/issue-420, commit
5862448) — verified in scratch worktree, main worktree untouched.GATE (Repos.jsx:343):
<Show when={profile().bio_markdown && !getEditing()}>— correct. Bio hidden iff the edit form is open (empty bio renders nothing either way). onDone restores via existingsetEditing(false)(lines 398-403; save path also invalidatesprofile:${owner()}). Form inline preview (getBio(), lines 200-203) untouched — the only rendered surface while editing. Non-editors never set editing, so their view is unchanged. No duplicated-bio path remains on the user header.ORG SURFACES (all untouched, verified by grep + read): org landing header bio (Repos.jsx:433-438, gated only on
getOrg()?.bio_markdown, no getEditing); Org.jsx read-only branch (lines 159-182, incl.renderBody(o().bio_markdown)at 179) unchanged; Org.jsx settings-form preview (renderBody(getBio())at 247) unchanged; nogetEditingsignal in Org.jsx at all.PIN UPDATE (profile-header-403.test.js:99): legitimate — the single changed gate updated to the new spelling with a
#420comment; all other pinned gates byte-identical. Not weakened: the new pin asserts the stricter condition.SCOPE: 3 web/ files only (Repos.jsx + 1 new test + 1 pin). No backend change, no package.json/lock change, no new deps (laws 1/8 hold; law 12: no doc amendment needed — no wire/bucket/API impact).
TESTS (with web/node_modules symlinked into the worktree — see env note): touched-area suites 14/14 pass. Full suite on PR branch: 873 tests, 871 pass, 2 fail — both failures are smoke.test.js live-server probes (SPA shell + hashed assets), identical on pristine origin/main in the same conditions (867 tests, 865 pass, same 2 smoke failures; delta is exactly the 6 new passing tests). Vite build + esbuild SDK bundle both pass (chunk-size notice is pre-existing/informational).
ENV NOTE: the fix agent's 755 pass / 15 fail (14 file-level markdown/refs-autolink failures) reproduces exactly when web/node_modules is missing (
markedunresolvable) — with the symlink all 14 vanish on both branches. Pre-existing env issue, not PR-caused.No browser drive (node tests + source reasoning; no browser-facing serving/auth change beyond a client Show gate). No fixes pushed — none needed.
RECOMMENDATION: ready to merge.
Fixed by PR #426 (review clean; gate correct, org surfaces untouched, 14 reported failures proven to be a missing-symlink env error — real state 871/873), merged. Closing.