Skip to content

[LOCKLITE-84] Be able to edit members about a vault#139

Merged
vbetsch merged 109 commits intodevelopfrom
ui/feat/161-edit-vault-members
Aug 21, 2025
Merged

[LOCKLITE-84] Be able to edit members about a vault#139
vbetsch merged 109 commits intodevelopfrom
ui/feat/161-edit-vault-members

Conversation

@vbetsch
Copy link
Owner

@vbetsch vbetsch commented Aug 20, 2025

No description provided.

@vbetsch vbetsch requested a review from Copilot August 20, 2025 06:49
@vbetsch vbetsch self-assigned this Aug 20, 2025
@vbetsch vbetsch added enhancement New feature or request ui About templating and styling release:add New features (for the release changelog) labels Aug 20, 2025
@vercel
Copy link

vercel bot commented Aug 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
locklite Ready Ready Preview Comment Aug 21, 2025 9:44pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements functionality to allow editing of vault members, adding comprehensive UI components and improving test coverage. The changes introduce member management capabilities through a new sharing modal interface.

Key changes:

  • Added vault member editing functionality with a ShareVaultModal component
  • Implemented extensive test coverage for Logger and API modules with updated error handling patterns
  • Reorganized file structure by migrating DTOs and types to module-specific locations

Reviewed Changes

Copilot reviewed 97 out of 126 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/projects/ui/modules/vaults/components/modals/ShareVaultModal.tsx New modal for editing vault member permissions
src/projects/ui/modules/vaults/components/core/atoms/AvatarMultiSelect.tsx Multi-select component for choosing vault members
tests/units/projects/shared/logs/logger.test.ts Comprehensive test coverage for Logger class with new error handling
tests/units/projects/api/modules/users/infra/users.repository.test.ts Complete test suite for UsersRepository
src/projects/shared/logs/logger.ts Updated error handling to use structured error objects

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

);

const onChange = (members: VaultMemberModelDto[]): void => {
setSelectedMembers([...members]);
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The selectedMembers state is initialized but never used in the component logic. This appears to be dead code that should be removed to improve maintainability.

Suggested change
setSelectedMembers([...members]);
const onChange = (members: VaultMemberModelDto[]): void => {

Copilot uses AI. Check for mistakes.
Logger.critical({ message: 'test', error: mockError });

const timesThree: number = 3;
expect(consoleLogSpy).toHaveBeenCalledTimes(timesThree);
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

[nitpick] Using magic numbers with descriptive variable names like timesThree and timesTwo makes the code less readable. Consider using the literal numbers directly or using more descriptive names that explain the business logic behind these counts.

Suggested change
expect(consoleLogSpy).toHaveBeenCalledTimes(timesThree);
expect(consoleLogSpy).toHaveBeenCalledTimes(3);

Copilot uses AI. Check for mistakes.
);

const onChange = (members: VaultMemberModelDto[]): void => {
setSelectedMembers([...members]);
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The internal onChange function updates unused state selectedMembers and then calls props.onChange. The state update serves no purpose and should be removed.

Suggested change
setSelectedMembers([...members]);
const onChange = (members: VaultMemberModelDto[]): void => {

Copilot uses AI. Check for mistakes.
# Conflicts:
#	package.json
#	src/projects/api/app/adapters/vault.adapter.ts
#	src/projects/api/modules/auth/domain/usecases/register.usecase.ts
#	src/projects/api/modules/auth/domain/usecases/signin.usecase.ts
#	src/projects/api/modules/seed/domain/upsert-user-with-vaults.usecase.ts
#	src/projects/api/modules/users/app/user.adapter.ts
#	src/projects/api/modules/users/domain/current-user.service.ts
#	src/projects/api/modules/vaults/domain/usecases/create-vault.usecase.ts
#	src/projects/api/modules/vaults/domain/usecases/get-my-vaults.usecase.ts
#	tests/units/projects/api/modules/auth/domain/usecases/signin.usecase.test.ts
@vbetsch vbetsch merged commit e8eb5cc into develop Aug 21, 2025
6 checks passed
@vbetsch vbetsch deleted the ui/feat/161-edit-vault-members branch August 21, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request release:add New features (for the release changelog) ui About templating and styling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants