Hide the rendered profile bio while the edit form is open (edit form + optional preview only; no duplicated bio above the editor) #420

Closed
opened 2026-09-12 22:55:28 +00:00 by crueber · 3 comments
Owner

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 renders profile().bio_markdown unconditionally via <Show when={profile().bio_markdown}> (markdown-body block). The Edit profile button (line 328) toggles getEditing; the ProfileForm then 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.
  • Org profile edit (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.
  • The org landing header (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

  • Pure client-side Show-condition change; no API, cache, or ETag impact.
  • The edit signal lives in the Repos page (getEditing, web/src/pages/Repos.jsx:237); gate the header's rendered-bio <Show> (line 318) on !getEditing() (in addition to can_edit semantics — hiding should apply whenever the form is open for viewers who can edit; the form only renders for those viewers anyway). Clear on onDone (line 377-381) restores the rendered bio automatically since setEditing(false).
  • The form's own preview (Repos.jsx:179-182) stays as-is — it is the "optional preview" surface; do not remove it.
  • Cancel (form closes without save) and save (form closes, doc invalidated) both restore the rendered bio via the existing onDone path — no extra state needed.

Acceptance criteria

  • With a bio set, clicking "Edit profile" hides the rendered bio above the editor; the page shows the form (and its inline preview when the textarea is non-empty) only.
  • No duplicated bio: while the edit form is open, the rendered bio block does not appear anywhere on the page.
  • Saving or cancelling the form closes it and the rendered bio reappears (with updated content after save).
  • Non-editing viewers (no can_edit) always see the rendered bio, unchanged.
  • Org surfaces unchanged: org landing header bio (Repos.jsx:412) and the org ProfileTab edit form (Org.jsx) behave as today.
  • No changes to wire formats, cache keys, or ETag coverage.
# 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 renders `profile().bio_markdown` unconditionally via `<Show when={profile().bio_markdown}>` (markdown-body block). The `Edit profile` button (line 328) toggles `getEditing`; the `ProfileForm` then 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. - Org profile edit (`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. - The org landing header (`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 - Pure client-side Show-condition change; no API, cache, or ETag impact. - The edit signal lives in the Repos page (`getEditing`, `web/src/pages/Repos.jsx:237`); gate the header's rendered-bio `<Show>` (line 318) on `!getEditing()` (in addition to `can_edit` semantics — hiding should apply whenever the form is open for viewers who can edit; the form only renders for those viewers anyway). Clear on `onDone` (line 377-381) restores the rendered bio automatically since `setEditing(false)`. - The form's own preview (`Repos.jsx:179-182`) stays as-is — it is the "optional preview" surface; do not remove it. - Cancel (form closes without save) and save (form closes, doc invalidated) both restore the rendered bio via the existing `onDone` path — no extra state needed. ## Acceptance criteria - [ ] With a bio set, clicking "Edit profile" hides the rendered bio above the editor; the page shows the form (and its inline preview when the textarea is non-empty) only. - [ ] No duplicated bio: while the edit form is open, the rendered bio block does not appear anywhere on the page. - [ ] Saving or cancelling the form closes it and the rendered bio reappears (with updated content after save). - [ ] Non-editing viewers (no `can_edit`) always see the rendered bio, unchanged. - [ ] Org surfaces unchanged: org landing header bio (`Repos.jsx:412`) and the org ProfileTab edit form (`Org.jsx`) behave as today. - [ ] No changes to wire formats, cache keys, or ETag coverage.
crueber added this to the v1 milestone 2026-09-12 22:56:15 +00:00
crueber added
issues
and removed
fork
labels 2026-09-12 22:56:58 +00:00
Author
Owner

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.

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.
Author
Owner

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 existing setEditing(false) (lines 398-403; save path also invalidates profile:${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; no getEditing signal 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 #420 comment; 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 (marked unresolvable) — 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.

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 existing `setEditing(false)` (lines 398-403; save path also invalidates `profile:${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; no `getEditing` signal 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 `#420` comment; 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 (`marked` unresolvable) — 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.
Author
Owner

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.

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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crueber/walhub#420
No description provided.