Skip to content

refactor: Rename AttributeListener to ModifyIdentityListener#692

Merged
denischilik merged 3 commits intoworkstation/6.0-Releasefrom
feat/convert-attribute-listener-to-identity-listener
Apr 2, 2026
Merged

refactor: Rename AttributeListener to ModifyIdentityListener#692
denischilik merged 3 commits intoworkstation/6.0-Releasefrom
feat/convert-attribute-listener-to-identity-listener

Conversation

@denischilik
Copy link
Copy Markdown

@denischilik denischilik commented Apr 2, 2026

Background

The kit integration API mixed identity updates with a generic "attribute listener" abstraction. Identity-related callbacks are now expressed through a dedicated listener type so kit implementations and the SDK contract are clearer.

What Has Changed

  • Renamed AttributeListener to ModifyIdentityListener and aligned KitIntegration / KitManagerImpl wiring.
  • Removed BaseAttributeListener; user-attribute handling stays on UserAttributeListener.
  • Updated integration kits and tests (including test kits) for the new listener type and naming.

Screenshots/Video

N/A (SDK internals)

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

Targets branch workstation/6.0-Release (includes #691 bulk user-attribute sync).

AttributeListener now only declares identity APIs; kits implement
BaseAttributeListener alongside it for user attribute callbacks.
Update affected kits, AttributeListenerTestKit, and KitManagerImplTest mocks.

Made-with: Cursor
Replace KitIntegration.AttributeListener with ModifyIdentityListener for
set/remove user identity forwarding. Update KitManagerImpl, affected kits,
and rename AttributeListenerTestKit to ModifyIdentityListenerTestKit.
Clarify BaseAttributeListener Javadoc links and KitManagerImpl section comment.

Made-with: Cursor
Drop the deprecated BaseAttributeListener type and merge its callbacks into
UserAttributeListener. KitManagerImpl now forwards user attributes using
UserAttributeListener only; incrementUserAttribute calls both increment and
setUserAttribute on the same listener.

Kits that previously implemented BaseAttributeListener without the extended
callbacks now implement UserAttributeListener with no-op onIncrementUserAttribute,
onSetUserTag, and onConsentStateUpdated. Update ModifyIdentityListenerTestKit and
KitManagerImplTest accordingly.

Made-with: Cursor
@denischilik denischilik requested a review from a team as a code owner April 2, 2026 15:24
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 2, 2026

PR Summary

Medium Risk
Medium risk because it changes the kit integration interface surface and forwarding paths for identity and user-attribute callbacks across many kits, which could break compilation or alter callback ordering if any kit relied on the old contract.

Overview
Renames the kit identity-mutation contract from AttributeListener to ModifyIdentityListener, updates KitManagerImpl to sync/forward identities through the new interface, and updates affected kits/tests to implement the renamed listener.

Removes the deprecated shared BaseAttributeListener abstraction so user-attribute forwarding is now keyed solely off UserAttributeListener (with its full method set documented), and adjusts incrementUserAttribute forwarding to invoke both onIncrementUserAttribute and onSetUserAttribute for listeners.

Written by Cursor Bugbot for commit 39366c7. This will update automatically on new commits. Configure here.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
27.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@denischilik denischilik merged commit d225842 into workstation/6.0-Release Apr 2, 2026
57 of 61 checks passed
@denischilik denischilik deleted the feat/convert-attribute-listener-to-identity-listener branch April 2, 2026 20:10
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.

2 participants