fix: keep pieces run usable during login#445
fix: keep pieces run usable during login#445anthony-maio wants to merge 2 commits intopieces-app:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the CLI login flow so that, when running in loop mode (pieces run), login/reconnect operations don’t block the prompt and can complete in the background.
Changes:
- Add an async/background login option to
BasicUser.login()via anasync_reqflag. - Route loop-mode
pieces login(and loop-mode reconnect) through async login/connect paths and print a non-blocking sign-in message. - Add regression tests asserting loop-mode login uses async auth and that async login returns immediately with a live background thread.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/pieces/command_interface/auth_commands.py |
Uses async login/connect when Settings.run_in_loop is enabled to keep the prompt responsive. |
src/pieces/_vendor/pieces_os_client/wrapper/basic_identifier/user.py |
Adds async_req support to BasicUser.login() and refactors login completion into a helper. |
tests/auth_commands_test.py |
Adds tests for loop-mode async login and for BasicUser.login(async_req=True) returning a background thread. |
💡 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
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6c77fca5c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
BasicUser.login()for loop-mode auth flowspieces runlogin and reconnect calls through the non-blocking pathTesting