Skip to content

[codex] Modernize README demos and progress ergonomics#317

Draft
wolph wants to merge 2 commits into
developfrom
harden-issue-tests
Draft

[codex] Modernize README demos and progress ergonomics#317
wolph wants to merge 2 commits into
developfrom
harden-issue-tests

Conversation

@wolph

@wolph wolph commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • refresh the README with animated SVG demos and clearer usage examples for labels, totals, live output, and concurrent bars
  • place the exact demo code directly under each animated SVG so the rendered output and source stay paired
  • render README SVG colors from captured ANSI output so percentage/count colors match the library's real terminal gradient
  • show the multiple-bar demo with independently progressing bars instead of synchronized values
  • simplify the unknown-length demo to use a straightforward range loop
  • remove the extra ergonomics SVG section, generated asset, and obsolete GPG release-verification section
  • keep recent log lines visible in the hero SVG while the progress bar advances
  • use branch-relative README SVG links so the PR branch renders its own demo assets
  • add a repeatable README demo renderer plus tests so documented terminal output stays in sync
  • add CLI rate limiting, tighten unit/progress formatting behavior, and harden stream/logging cleanup around failed bars
  • isolate stream cleanup tests so stale redirected-output state does not leak between cases
  • purge docs/superpowers files from the PR branch history

Validation

  • python scripts/render_readme_demos.py --check
  • .tox/py313/bin/python -m pytest tests/test_readme_demos.py -q --no-cov
  • .tox/py313/bin/python -m pytest -q --no-cov
  • .tox/py313/bin/pyright
  • .tox/ruff/bin/ruff check scripts/render_readme_demos.py tests/test_readme_demos.py
  • .tox/ruff/bin/ruff format --check scripts/render_readme_demos.py tests/test_readme_demos.py
  • git diff --check

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request modernizes the progressbar2 library by introducing tqdm-style ergonomic options (such as desc, total, unit, unit_scale, and postfix), adding new Postfix and UnitProgress widgets, and improving print/log coexistence with a reversible logging stream wrapper. It also updates the CLI to support rate limiting and custom display flags, rewrites the README to be demo-led, and adds a script to generate SVG terminal demos. The review feedback identifies three key improvement opportunities: ensuring valid falsy values (like 0 or False) are not omitted in the Postfix widget, wrapping ProgressBarBase.finish in contextlib.suppress during error handling to prevent masking exceptions, and copying logger.handlers to a tuple during iteration to avoid concurrent modification errors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread progressbar/widgets.py
Comment thread progressbar/bar.py
Comment thread progressbar/utils.py Outdated
@wolph wolph force-pushed the harden-issue-tests branch from 5fa00aa to bd91a11 Compare June 23, 2026 01:41
@wolph wolph force-pushed the harden-issue-tests branch from 55e4e1a to aab0a08 Compare June 23, 2026 13:17
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.

1 participant