multica/apps/web
Naiyuan Qing 060afc848c refactor(web): migrate reaction optimistic updates from cache to UI pattern
Replace cache-level optimistic updates (onMutate with temp IDs) with
TQ v5's UI-level pattern (useMutationState + render-time derivation)
for both issue-level and comment-level reaction toggles.

The cache-level approach caused a race condition: temp IDs in the cache
couldn't be deduplicated against real IDs from WS events, causing
reaction counts to briefly flash incorrect values (e.g. 0→1→2→1).

The UI pattern keeps the cache clean (always server-confirmed data) and
derives optimistic state at render time from pending mutation variables.
WS events safely update the cache without conflicting with temp data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:35:52 +08:00
..
app Revert "feat(issues): add structured ticket search" 2026-04-08 15:15:08 +08:00
components feat(core): migrate workspace + runtimes to TanStack Query (Phase 3+4) 2026-04-07 17:19:52 +08:00
core refactor(web): migrate reaction optimistic updates from cache to UI pattern 2026-04-08 15:35:52 +08:00
features refactor(web): migrate reaction optimistic updates from cache to UI pattern 2026-04-08 15:35:52 +08:00
hooks fix(upload): harden upload flow — sanitize filenames, refresh CF cookies, deduplicate handlers 2026-03-31 15:52:40 +08:00
lib refactor(web): self-contained shadcn UI with base-nova style and design tokens 2026-03-24 18:19:26 +08:00
public feat(web): add about, changelog pages and fix landing header for light backgrounds 2026-04-01 05:16:24 +08:00
shared Revert "feat(issues): add structured ticket search" 2026-04-08 15:15:08 +08:00
test Merge remote-tracking branch 'origin/main' into feat/tanstack-query-migration 2026-04-08 10:35:28 +08:00
components.json chore(ui): switch shadcn menuColor from inverted-translucent to default 2026-03-31 11:01:54 +08:00
next-env.d.ts chore(web): update next-env.d.ts routes path 2026-04-01 05:51:28 +08:00
next.config.ts feat: wire allowedDevOrigins from CORS_ALLOWED_ORIGINS for non-localhost dev access (#355) 2026-04-08 14:39:01 +08:00
package.json feat(web): add TanStack Query infrastructure (Phase 0) 2026-04-07 14:43:51 +08:00
postcss.config.mjs refactor(web): self-contained shadcn UI with base-nova style and design tokens 2026-03-24 18:19:26 +08:00
proxy.ts feat(web): redirect logged-in users from / to /issues via server-side proxy 2026-04-01 18:20:57 +08:00
tsconfig.json feat(web): add TanStack Query infrastructure (Phase 0) 2026-04-07 14:43:51 +08:00
vitest.config.ts feat(web): add TanStack Query infrastructure (Phase 0) 2026-04-07 14:43:51 +08:00