[PR #7018] [MERGED] fix(client): prevent duplicate signal processing in atom listeners #15273

Closed
opened 2026-04-13 09:56:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7018
Author: @himself65
Created: 12/27/2025
Status: Merged
Merged: 12/29/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/12/27/visited


📝 Commits (2)

  • 68ee6c6 fix(client): prevent duplicate signal processing in atom listeners
  • 771bfa0 test: add coverage

📊 Changes

2 files changed (+72 additions, -0 deletions)

View changed files

packages/better-auth/src/client/proxy.test.ts (+65 -0)
📝 packages/better-auth/src/client/proxy.ts (+7 -0)

📄 Description

Upstream: https://github.com/better-auth/better-auth/pull/7013

Avoid duplicate value set


Summary by cubic

Prevent duplicate signal updates in client atom listeners when multiple match a route. We track visited signals to set each value once, reducing redundant updates and avoiding race conditions.

Written for commit 771bfa0d9b. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7018 **Author:** [@himself65](https://github.com/himself65) **Created:** 12/27/2025 **Status:** ✅ Merged **Merged:** 12/29/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/12/27/visited` --- ### 📝 Commits (2) - [`68ee6c6`](https://github.com/better-auth/better-auth/commit/68ee6c64f82d9528753219257345917531a53e0e) fix(client): prevent duplicate signal processing in atom listeners - [`771bfa0`](https://github.com/better-auth/better-auth/commit/771bfa0d9bf005e5e50eb7e46d6b04dfdcfe1d99) test: add coverage ### 📊 Changes **2 files changed** (+72 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `packages/better-auth/src/client/proxy.test.ts` (+65 -0) 📝 `packages/better-auth/src/client/proxy.ts` (+7 -0) </details> ### 📄 Description Upstream: https://github.com/better-auth/better-auth/pull/7013 Avoid duplicate value set <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Prevent duplicate signal updates in client atom listeners when multiple match a route. We track visited signals to set each value once, reducing redundant updates and avoiding race conditions. <sup>Written for commit 771bfa0d9bf005e5e50eb7e46d6b04dfdcfe1d99. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 09:56:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#15273