Skip to content

chore(release): cascade develop -> stage - #962

Merged
evereq merged 2 commits into
stagefrom
develop
Jun 17, 2026
Merged

chore(release): cascade develop -> stage#962
evereq merged 2 commits into
stagefrom
develop

Conversation

@evereq

@evereq evereq commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Cascades latest develop to stage. Picks up the work that landed after the previous develop→stage cascade (#959).

Included since #959:

Release branches preserved.

dependabot Bot and others added 2 commits June 17, 2026 10:55
* 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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
directory-web-template-demo Building Building Preview, Comment Jun 17, 2026 9:19am
directory-web-template-docs Building Building Preview, Comment Jun 17, 2026 9:19am

@evereq
evereq merged commit 7d10223 into stage Jun 17, 2026
8 of 10 checks passed
@augmentcode

augmentcode Bot commented Jun 17, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Cascades the latest develop branch changes into stage for the next release.

Changes:

  • Extracted and exported a shared React Query key (ITEM_ACTIVITY_QUERY_KEY) and payload type for item activity.
  • Updated ItemStatsSection to use the shared activity query key ([ITEM_ACTIVITY_QUERY_KEY, itemSlug, days]).
  • Enhanced useItemVote optimistic updates to patch both vote totals and the activity sparkline in the same render frame.
  • Added snapshot-based rollback for activity cache on mutation errors to avoid refetch flicker.
  • Invalidates activity queries on success to reconcile with authoritative server state.
  • Bumped esbuild to 0.28.1 (app + root overrides) and recorded the change in docs/log.md.

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 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

{ queryKey: [ITEM_ACTIVITY_QUERY_KEY, itemId] },
(old) => {
if (!old) return old;
const lastIdx = old.series.length - 1;

@augmentcode augmentcode Bot Jun 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Fix This in Augment

🤖 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

@augmentcode augmentcode Bot Jun 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant