Skip to content

FIX: proper handling of group memberships#8

Open
everettbu wants to merge 1 commit into
group-dm-user-addition-prefrom
group-dm-user-addition-post
Open

FIX: proper handling of group memberships#8
everettbu wants to merge 1 commit into
group-dm-user-addition-prefrom
group-dm-user-addition-post

Conversation

@everettbu

Copy link
Copy Markdown
Contributor

Test 8

@lizard-boy

Copy link
Copy Markdown

cursor review

@cursor cursor 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.

Bugbot free trial expires on August 11, 2025
Learn more in the Cursor dashboard.


findMembers: function() {
if (Em.isEmpty(this.get('name'))) { return Ember.RSVP.resolve([]); }
if (Em.isEmpty(this.get('name'))) { return ; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: findMembers() Fails on Empty Group Name

The findMembers() method now returns undefined when the group name is empty, breaking its promise contract. Previously, it returned a resolved promise (Ember.RSVP.resolve([])). This inconsistency causes "Cannot read property 'then' of undefined" errors for calling code that expects to chain .then() on the result.

Locations (1)
Fix in Cursor Fix in Web


return can_not_modify_automatic if group.automatic

group.users.delete(user_id)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Incorrect Parameter Usage and Type Mismatch

The remove_member method has two issues: it incorrectly uses params.require(:group_id) instead of params[:id] for the group ID, and it passes a user_id (integer) to group.users.delete, which expects a user model object.

Locations (1)
Fix in Cursor Fix in Web

controller.set('model', model);
controller.set('members', this.get('_members'));
controller.set("model", model);
model.findMembers();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Async Data Loading Issue in Routes

The setupController method in both group-members and admin_group routes calls model.findMembers() without awaiting its asynchronous completion. This causes the controller to be set up before member data is fully loaded, leading to an incorrect or incomplete initial UI state. The removed afterModel hook previously ensured this data was loaded before setupController.

Locations (2)
Fix in Cursor Fix in Web

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has been open for 60 days with no activity. To keep it open, remove the stale tag, push code, or add a comment. Otherwise, it will be closed in 14 days.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants