Skip to content

Conversation

@bishoy-at-pieces
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings December 11, 2025 16:31
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 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.

Copy link
Contributor

@tsavo-at-pieces tsavo-at-pieces left a comment

Choose a reason for hiding this comment

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

Good looks!

@bishoy-at-pieces bishoy-at-pieces merged commit 1a3f04d into main Dec 11, 2025
7 checks passed
@bishoy-at-pieces bishoy-at-pieces deleted the fix-auth-commands branch December 11, 2025 16:50
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.

3 participants