Fix #573: collapsing a jumped-to thread card clears its flash #577
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!577
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-573"
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?
Root cause (web/src/pages/Pull.jsx): ThreadCard
open = () => getOpen() || flashed()force-expands while flashed; jumpToThread set flashTid with NOTHING ever clearing it — collapse looked dead, emerald outline stuck forever.Fix:
onCollapseprop → page-level targetedclearFlashTid(cur === tid ? null : cur), threaded through DiffFile to inline + file-end cards), so open() and the outline return to tracking getOpen().onCollapse/clearFlashTidshape; set paths (jumpToThread/jumpToStaged) unchanged. StagedCard has no collapse control in the current tree → no clear wiring; same clearFlash pattern applies when one lands.Closes #573.
Verification: new web/test/unit/thread-flash-clear-573.test.js 13/13; related (572/567/546/554/555/557/560/566) 117/117; full-minus-smoke 1406/1406 (smoke needs live server, pre-existing); vite build + esbuild SDK green (web/dist/.keep restored); go vet clean. No new deps; Tailwind-only, canonical classes; law-12 doc amendment in docs/go/12_web_ui.md same commit. 390px reasoned (behavior-only, no layout delta).
Independent review — APPROVED (no changes made, no fix commit; worktree clean).
Verified against the branch (
ea590da) and issue #573 acceptance, in /tmp/walhub-573:onClick={() => { props.onCollapse?.(t().tid); setOpen(!getOpen()); }}— onCollapse runs BEFORE the setOpen toggle, both synchronous Solid signals, so flash can never re-assert between them. Post-clear, open() and the outline fall back to tracking getOpen(): pill-jump then collapse → collapsed + outline gone. ✔setFlashTid((cur) => (cur === tid ? null : cur))— targeted, only the matching tid clears; collapsing an unflashed card is a no-op that never steals another card's flash. Single-flash model preserved; second jump overwrites via unchanged jumpToThread (moves flash). ✔onCollapse={props.onCollapse}, and the page wiresonCollapse={clearFlashTid}into DiffFile (Pull.jsx:1311). No other ThreadCard call sites exist in the file. ✔open = () => getOpen() || flashed()+ emerald outline both intact; the jump still force-reveals, only collapse clears. ✔