R2R icon indicating copy to clipboard operation
R2R copied to clipboard

Collection User List View not showing user name

Open dwipper opened this issue 1 year ago • 1 comments

Describe the bug

To Reproduce image

Expected behavior The properties of the user should be displayed

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): NA

Smartphone (please complete the following information): NA

Additional context Add any other context about the problem here.

dwipper avatar Oct 02 '24 19:10 dwipper

Hey there, I'll add this to our roadmap to make it much more rich in the near future. On the dedicated users page there should be an icon that you can select to see more about a user.

Unfortunately, right now we have two separate models in the backend that need to be synchronized in such a way that what you're describing is easier to do.

The first is the UserOverviewResponse which you see:

class UserOverviewResponse(BaseModel):
    user_id: UUID
    num_files: int
    total_size_in_bytes: int
    document_ids: list[UUID]

The second is the UserResponse, which contains the information that you're looking for.

class UserResponse(BaseModel):
    id: UUID
    email: str
    is_active: bool = True
    is_superuser: bool = False
    created_at: datetime = datetime.now()
    updated_at: datetime = datetime.now()
    is_verified: bool = False
    collection_ids: list[UUID] = []

    # Optional fields (to update or set at creation)
    hashed_password: Optional[str] = None
    verification_code_expiry: Optional[datetime] = None
    name: Optional[str] = None
    bio: Optional[str] = None
    profile_picture: Optional[str] = None

If you (or anyone else!) wanted a fairly straightforward contribution, we'd definitely welcome a PR around this!

NolanTrem avatar Oct 02 '24 21:10 NolanTrem

With the release of our R2R 3.3.0 we've refactored and improved interacting with users. Going to close this out, thanks for raising it!

Screenshot 2024-12-07 at 9 14 37 AM Screenshot 2024-12-07 at 9 15 25 AM

NolanTrem avatar Dec 07 '24 17:12 NolanTrem