Conversation
src/pieces/_vendor/pieces_os_client/wrapper/basic_identifier/user.py
Outdated
Show resolved
Hide resolved
376abd6 to
92cd89c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to fix authentication commands in the PiecesOS CLI by improving login/logout functionality and adding comprehensive test coverage. The changes refactor thread handling from the API's async_req mechanism to Python's standard Threading module and add cloud status checking to the login flow.
Key Changes:
- Added comprehensive test suite for login and logout commands with 459 lines of tests
- Enhanced login command to check and display cloud connection status, automatically connecting if disconnected
- Refactored async request handling from API client's pool-based approach to Python's standard Thread class
- Added null check for current_asset in assets_command decorator
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/auth_commands_test.py | New comprehensive test suite covering login/logout commands with various scenarios including edge cases |
| src/pieces/command_interface/auth_commands.py | Enhanced login command to check cloud status and auto-connect; improved user feedback with status display |
| src/pieces/_vendor/pieces_os_client/wrapper/basic_identifier/user.py | Refactored login/connect methods to use Python's Thread class instead of async_req; changed from async to sync connect behavior |
| src/pieces/_vendor/pieces_os_client/wrapper/client.py | Removed unused pool method that was previously used for async API calls |
| src/pieces/core/assets_command.py | Added additional null check for current_asset to prevent errors when no asset is selected |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/pieces/_vendor/pieces_os_client/wrapper/basic_identifier/user.py
Outdated
Show resolved
Hide resolved
92cd89c to
cf446d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.