Thread card collapse/expand label goes stale when the card is flash-expanded (click or jump) #580
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#580
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?
What's requested
The thread card's collapse/expand toggle shows the wrong label when the card is force-expanded by a flash (card-body click or jump-to-comments pill). Fix the label to track the card's actual expansion state.
Evidence
web/src/pages/Pull.jsx:766— effective open state:const open = () => getOpen() || flashed();web/src/pages/Pull.jsx:812-814— the toggle label reads onlygetOpen():props.flashTid?.() === t().tid, line 765) is expanded viaopen()but the label still says "expand" — stale the moment the card flash-expands. Two triggers:Architecture notes
getOpen()) and flash (flashed()). The label and the<Show when={open()}>body (line 816) read different signals — that divergence is the bug.getOpen(). Implementer's call on the label signal: deriving the label fromopen()is the minimal fix, but check the post-click behavior on a flashed-and-collapsed card so a click labeled "collapse" never lands the card still open (the clearFlash + setOpen flip must compose so the resultingopen()matches the label the user clicked).web/test/unit/card-click-flash-575.test.js,web/test/unit/thread-flash-clear-573.test.js— extend or add a sibling covering the label.Acceptance criteria
Fixed by #582 (merged): ThreadCard toggle label now derives from open() — the same effective signal as the body — so flash-expanded cards read collapse; two-click label/body agreement pinned incl. the #573 clear path; unflashed behavior unchanged. Verified: 1440 unit tests green (smoke excluded, pre-existing), vite/esbuild green, independent review APPROVE.