Fix #146: stale-key guards on reactions/comments #147
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!147
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-146"
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?
Follow-up noted in the #145 review: reaction add/remove tails (
react,toggleReactionincl. the remove-404 fallback add) and comment/close tails (comment,commentAndClose,close, reopenpatch) inweb/src/pages/Issue.jsxshared the stale-key-across-navigation shape fixed for label/milestone paths in #143. Same treatment: pinnum()/key()synchronously pre-await, run the mutation + optimistic paint against the pinned key, reconcile withreload()when still on the issue elseinvalidate()the pinned key, and reset the per-(seq,content) reaction busy set in thenum()navigation effect. No behavior change on the no-nav path (same issue still takes thereload()branch). Appends the decision todocs/features/02_issues.mdin the same change.Worth noting: the two-step
commentAndClosewas worse than stale-reconcile — its close PATCH evaluatednum()after the comment POST resolved, so a mid-flight navigation closed the NEW issue instead; pinning once up front fixes that too.Verification:
node --test web/test/unit/*.test.js317/317 green;make web(vite+esbuild) builds clean. No new deps. Browser proof attempted in headless Chrome over CDP against a scratch server (forced mid-flight navigation via delayed reactions POST + client-side route change, both themes, console-error capture): the shared browser daemon stopped loading new documents mid-session (evaluates fine, new document loads hang browser-wide under shared load; one earlier tab did render the fixed page with 1 reaction row). Full browser proof therefore not completed — node tests + build + pattern-mirroring carry the verification. Deliberately out of scope:loadOlderhas a similar tail shape but was not named in #146.