Conversation
* build(deps-dev): Bump esbuild from 0.27.0 to 0.28.1 Bumps [esbuild](https://github.com/evanw/esbuild) from 0.27.0 to 0.28.1. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2025.md) - [Commits](evanw/esbuild@v0.27.0...v0.28.1) --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.28.1 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps-dev): sync pnpm.overrides esbuild to 0.28.1 Dependabot only bumped apps/web/package.json but not the root pnpm.overrides which pinned esbuild to 0.27.0. This caused ERR_PNPM_LOCKFILE_CONFIG_MISMATCH on CI. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ruslan Konviser <ever@ever.co>
…d from #945) (#961) * feat(items): bump sparkline + flicker-free rollback on upvote The Statistics card's optimistic vote sync already updates `totals.votes` on develop. This adds two refinements (rebased slice of #945): - Today's sparkline bar now moves on the same frame as the vote button, not just the total — the chart and the number stay visually in sync. - onError restores a snapshot of the activity cache instead of invalidating (refetching), which removes the brief refetch flicker on rollback when a vote fails (offline / 5xx). - Exports a shared `ITEM_ACTIVITY_QUERY_KEY` constant and `ItemActivityPayload` type from `item-stats-section.tsx` so mutators target the same cache key without restating the literal. Co-authored-by: joel-kalema <joel-kalema@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(items): cancel activity refetch + derive vote delta from snapshot Addresses Augment review on #961: - cancelQueries now covers both ['item-votes', id] and the activity query key in vote/unvote onMutate, so an in-flight activity refetch cannot clobber the optimistic update we are about to write. - Derives the signed delta inside setQueryData(old) instead of from the captured snapshot, then reuses the applied delta when patching the activity cache so the item-votes update and Statistics sparkline stay consistent under concurrent refetches. - docs/log.md entry under 2026-06-17 per spec-037 DoD. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: joel-kalema <joel-kalema@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🤖 Augment PR SummarySummary: Cascades the latest Changes:
Technical Notes: Activity mutations now cancel in-flight queries, derive a signed delta from the same snapshot used for vote cache updates, and restore prior cached activity payloads on error. 🤖 Was this summary useful? React with 👍 or 👎 |
| { queryKey: [ITEM_ACTIVITY_QUERY_KEY, itemId] }, | ||
| (old) => { | ||
| if (!old) return old; | ||
| const lastIdx = old.series.length - 1; |
There was a problem hiding this comment.
patchActivityForVoteDelta always applies the vote delta to the last series entry, which assumes the server’s time-series attribution matches “today”. If a user is removing/changing a vote that was created on a prior day, the /api/items/[slug]/activity series (grouped by votes.createdAt) may shift a different day’s point after invalidateQueries, causing a noticeable jump.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| * re-plots the sparkline below from `/api/items/[slug]/activity`. Rating | ||
| * and Listed rows are static. | ||
| * | ||
| * Data lives in the shared React Query cache under |
There was a problem hiding this comment.
This is a user-visible behavior change (optimistic Upvotes total + sparkline updates and rollback semantics); if it’s not already covered, it likely needs a Playwright spec per (Rule: AGENTS.md). A targeted e2e that asserts “instant bump” and “no flicker on failed vote” would help prevent regressions.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Cascades latest
developtostage. Picks up the work that landed after the previous develop→stage cascade (#959).Included since #959:
build(deps-dev): Bump esbuild from 0.27.0 to 0.28.1(Dependabot; root pnpm.overrides synced to match).feat(items): bump sparkline + flicker-free rollback on upvote (rebased from #945). Cherry-picked the still-relevant slice of feat(items): Statistics card updates instantly on upvote #945 (closed as superseded by perf(items): stream similar-items to fix blank first paint on /items/[slug] (+ Data Cache persistence) #940). Augment review findings addressed (cancelQueries on activity key, snapshot-consistent signedDelta, docs/log.md entry).Release branches preserved.