Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a TTY-only animated braille spinner (_spinner context manager) to cli.py that shows activity during operations that can take seconds to minutes to complete. Spinner is active during: - verify_connection -> 'Connecting to slskd...' - scan_library -> 'Scanning library...' - network_search -> 'Searching Soulseek for <query>...' - user_browse x2 -> 'Browsing <user>...' Modelled on the identical pattern in trimarr. No-ops silently when stderr is not a TTY (CI, Docker, piped output). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The spinner thread writes \r-based frames to stderr while loguru's console sink writes to stdout. On a TTY both streams share the same terminal so log lines appeared on the same line as the spinner. - Add module-level _terminal_lock (threading.Lock) and _spinner_active (threading.Event) in cli.py to coordinate terminal writes - Spinner thread acquires _terminal_lock for each frame write and for the final erase; uses \r\033[K (clear-to-EOL) instead of width math - _spinner_active is set before the thread starts and cleared only after thread.join(), so the race window is eliminated - New _make_console_sink() returns a loguru sink that acquires the lock and erases the spinner line before printing the log message - create_logger() gains an optional console_sink parameter so callers can supply the spinner-aware sink without coupling logger.py to cli.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
binhex
added a commit
that referenced
this pull request
Apr 19, 2026
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.