Skip to content

add spinner and progress - #3

Merged
resmo merged 2 commits into
mainfrom
feature/spinner-progress
Sep 13, 2026
Merged

resmo merged 2 commits into
mainfrom
feature/spinner-progress

Conversation

@resmo

@resmo resmo commented Sep 13, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Transfer label timing and focused callback tests remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds TTY-aware progress spinners for transfers while preserving stdout behavior for scripts.

Changes:

  • Adds and locks the yaspin dependency.
  • Integrates progress callbacks into uploads, downloads, and deletes.
  • Updates tests and documentation for spinner and compatibility behavior.
File summaries
File Summary Review notes
uv.lock Locks new dependencies.
tests/unit/test_progress.py Tests spinner behavior.
tests/integration/test_push.py Updates upload mocking.
tests/integration/test_entrypoint.py Tests TTY output separation.
src/gitftp/transfer.py Adds transfer completion callbacks. Nit (1 vote): Update the current-file label before transfer. Nit (2 votes): Add serial and parallel callback coverage.
src/gitftp/progress.py Implements spinner handling.
src/gitftp/mirror.py Adds download progress.
src/gitftp/deploy.py Adds upload/delete progress.
README.md Documents spinner behavior.
pyproject.toml Adds dependency and typing configuration.
COMPATIBILITY.md Documents compatibility behavior.
Review details

Suppressed comments (1)

src/gitftp/transfer.py:238

  • on_done is invoked only after fut.result() completes, so Progress.advance receives the last completed file rather than the file currently being transferred. During the next transfer (especially with parallel workers), the spinner therefore shows a stale label or no label, contrary to the documented current-file display. Add a separate start/progress callback, or otherwise update the label before invoking fn, while keeping completion counting in on_done.
                        if on_done is not None and not isinstance(result, _Skipped):
                            on_done(label(items[idx]))
  • Files reviewed: 11/12 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/gitftp/transfer.py
Comment on lines +155 to 156
on_done: Callable[[str], None] | None = None,
) -> list[R | TransferError | _Skipped]:
@resmo
resmo merged commit c84ca5b into main Sep 13, 2026
8 checks passed
@resmo
resmo deleted the feature/spinner-progress branch September 13, 2026 19:55
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.

2 participants