Fix #259: stale thread/label reads #266
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!266
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-259"
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?
Fixes #259 — kills the reaction flip-flop and the milestone/label id flash at the right layers.
Symptom 1 (reactions flip-flop): server cache class. The thread GET served
private, max-age=0, stale-while-revalidate=60, so a refresh could paint a pre-mutation body from the browser cache while revalidating in the background. Nowprivate, no-cachewith the same version-keyed ETag: every read revalidates, 304-when-unchanged keeps it cheap (one conditional GET either way — no new round trips, law 6). The events tail stays no-store; neither class serves stale, so summary and tail cannot disagree. Mutation-triggered refetches already bypassed the HTTP cache (withNoStore+ the #41 guardedinvalidate), verified — no client invalidation change needed.Symptom 2 (id flash): render gating, not denormalization. The thread carries ids; the 30s page-owned side-caches raced it. The sidebar chip (
milestoneDisplaypending state) and milestone timeline rows (honest generic “changed the milestone” interim inissueEventText) now wait onmilestones:{o}/{r}instead of flashing bare ids; deleted ids keep the bare-id self-heal. Label chips needed no gate — names ride the payload, only the color dot resolves late.Tests: thread-GET cache-class + stale-ETag→200/new-version + fresh-ETag→304 assertions (
TestGetIssueHTTP), events-tail no-store assertion;milestoneDisplay+ pending-interimnode --testcases (one existing test updated from bare-id-on-pending to the new interim contract). Gates:go test ./internal/issues/ -raceok, coverage 96.1% (≥95), fullnode --test web/test/unit/*.test.js527/527, vite + esbuild builds pass. Doc updates indocs/features/02_issues.md§7 + Decisions, same change (law 12). No new deps.