LibreChat/packages
JOJO 8d5c298bdf
🔗 fix: Prevent duplicate share rows from clobbering pending role edits (dedupe adds by stable id) (#14655)
Follow-up to #14316 / #14317. The share dialog deduped picker adds by raw
idOnTheSource, but loaded ACL rows carry the external oid for OpenID/Entra
users while search results carry the local _id (searchPrincipals dropped the
selected idOnTheSource before transforming). Re-adding an already-listed user
therefore appended a duplicate row, and the stable-id de-dup in
computeShareChanges let the appended default-role row silently shadow a
pending role edit (no-op PUT with a success toast).

- Dedupe adds via a new dedupeNewShares helper keyed by principalKey, and
  skip marking the dialog dirty when nothing was added
- Propagate idOnTheSource through the user-search transform so picker
  results match ACL rows (also fixes excludeIds filtering)
- Add regression tests

Closes #14654

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
2026-08-06 12:41:01 -04:00
..
api 🌊 feat: Wire Adaptive Stream Smoothing Across Google, Bedrock, and Zero-Disable Semantics (#14660) 2026-08-06 12:39:12 -04:00
client 🎨 refactor: adopt the @librechat/client design system (semantic color tokens + component migration) (#13879) 2026-08-06 09:15:17 -04:00
data-provider 🔗 feat: Admin Panel Link in Settings for Admins (#14662) 2026-08-06 12:40:44 -04:00
data-schemas 🔗 fix: Prevent duplicate share rows from clobbering pending role edits (dedupe adds by stable id) (#14655) 2026-08-06 12:41:01 -04:00