Skip to content

feat: progress counter and collapsed per-site lists - #9

Merged
MarcinDudekDev merged 2 commits into
mainfrom
feat/progress-indicators
Sep 13, 2026
Merged

MarcinDudekDev merged 2 commits into
mainfrom
feat/progress-indicators

Conversation

@MarcinDudekDev

Copy link
Copy Markdown
Owner

Fixes #8

Optimize now shows where it is, and stops dumping one line per site.

  • Feature loop: ui_step_pending "Applying <name>... [i/n]" (○, not a completed checkmark) while a feature runs. Result-line wording (applied / failed) unchanged — that is PR fix: clean up dry-run output in interactive mode #5.
  • HTTP/3 and Redis per-site lists collapse to one count line when >5 sites (Would configure HTTP/3 -> 33 sites). --verbose keeps the full list. 5 or fewer sites stay per-site.

Tests: new Section 21 in tests/run-tests.sh (fail on main). 114/114 on this branch. shellcheck --severity=warning clean.

Independent of PR #5 (dry-run wording) and PR #7 (JSON). Branched from main.

In-progress feature lines used ui_step, so a running feature looked
finished; there was no i/n counter; and HTTP/3/Redis printed one
ui_step_path line per site (30+ identical lines on big wp-test boxes).

apply_optimizations now collects the post-filter feature list first and
prints ui_step_pending "Applying <name>... [i/n]" while a feature runs
(result lines unchanged -- that wording is PR #5's scope).

New site_list_begin/step/flush helpers in lib/core/helpers.sh buffer
per-site lines: >5 sites collapses to one "<text> -> N sites" summary,
<=5 or --verbose keeps the full list. Wired into the HTTP/3 and Redis
apply paths.

Closes #8
get_nginx_sites_dir returned 1 when no sites-enabled existed. Under
set -e, sites_dir=$(get_nginx_sites_dir) killed optimize --dry-run
right after the DRY RUN banner on CI (no nginx), so the Would apply
assertion never saw a summary. Lookups now return 0 with empty stdout.
@MarcinDudekDev
MarcinDudekDev force-pushed the feat/progress-indicators branch from 4c69fd7 to 1426c28 Compare September 13, 2026 19:04
@MarcinDudekDev
MarcinDudekDev merged commit 2922e58 into main Sep 13, 2026
4 checks passed
@MarcinDudekDev
MarcinDudekDev deleted the feat/progress-indicators branch September 13, 2026 19:05
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.

Better progress indicators for optimize (counter + collapse per-site lists)

1 participant