Fix #567: staged inline review comments render in-thread until submit #570
No reviewers
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 milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!570
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-567"
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?
Implements Forgejo issue #567 per the proposed fix.
Problem: staging a keyed draft handed {anchor, body} to the page pending list and unmounted the composer — the row showed nothing until Finish review.
Fix (web/src/pages/Pull.jsx + CommentComposer.jsx):
Verification: new web/test/unit/staged-inline-567.test.js (21 tests) + #567-scoped update to one stale pull-event-text-521 pin (second legitimate plain-text site); full unit suite minus smoke 1373/1373 green; related suites (560/566/555/546/554) green; vite build + esbuild SDK green; go vet clean. Browser proof open per shared-daemon guard. Docs: FIXED (Forgejo #567) amendment in docs/go/12_web_ui.md, same commit (law 12).
Independent review — APPROVED (with 2 small defects fixed inline as
68cfbf2)Verified against the #567 acceptance list on branch fix/issue-567 (
a9bbeaa+ my review commit68cfbf2, pushed).Acceptance — all hold:
Forsits inside the rowFor, below the composer slot, above posted ThreadCards (pinned).ml-14 mt-1 rounded border…), author (stagedBy) + plain-text body (whitespace-pre-wrap, never markdown — FinishReview-consistent), canonicalchip chip-draftwith zero per-callsite bg overrides (compliant with the #545 F2 rule — the class itself is the amber token in ui.css; nothing hardcoded at the call site).staged-<i>id + emerald flash mirror thethread-<tid>idiom.editStaged/resolveStagedEdit(anchor-verified fast path + anchor+body slow path; vanished entries stage anew); unstage shares the one index-basedunstagewith the FinishReview modal.updatePendingmaps over the same signal — one pending-list source of truth feeding cards + form list + button count (all three wirings pinned).jumpToStagedscroll+flash; panel opens for staged-only reviews, header counts+ N staged.Forover collected{p, i}lists; drifted anchors fall back to a file-end card with no edit control.pulls.threads.createwith no staged state, so there is nothing to mirror. Acceptable per the issue's shared-seam-or-both clause.canComment !== false; anon pending is empty by construction so the index leaks nothing.renderBody, now explicitly pinning both plain-text sites instead of silently bumping a count. Not a weakening.go vetclean;vite buildgreen.Two small defects found and fixed in
68cfbf2(3 files, +23/-6):class="link"— invisible text, since.linkships zero CSS rules (the exact bug #566 just fixed two commits ago). Switched both to the #566 canonicalbtn ml-2 px-2 py-0.5 text-xs, with a new test pin forbidding.linkin StagedCard.if (props.initialValue) setBody(...)during setup, so editing staged entry B on a line while entry A's edit composer was still mounted kept A's text (same draft key, no remount). Prefill is now acreateEffectonprops.initialValue— re-prefills on target switches, never clobbers typing (typing never touches the prop), andcreateSignal("")is untouched so the #566 fresh-empty pin holds verbatim (first attempt broke it; corrected before push).Note:
make webfails in the /tmp/walhub-567 worktree for an environmental reason (pnpm refuses the symlinked node_modules pointing outside the worktree);vite buildrun directly succeeds. Smoke test failure is likewise environmental (needs a live server), identical pre-existing behavior.Verdict: APPROVED — ready to merge.