Skip to content

[Push] Show selectable files-push progress with one lifecycle bar - #484

Merged
adamziel merged 1 commit into
trunkfrom
adamziel/files-push-stage-progress
Aug 7, 2026
Merged

[Push] Show selectable files-push progress with one lifecycle bar#484
adamziel merged 1 commit into
trunkfrom
adamziel/files-push-stage-progress

Conversation

@adamziel

@adamziel adamziel commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Interactive files-push now uses one lifecycle progress bar, and --progress can force terminal or JSONL output independently of TTY detection.

The same terminal line redraws in place:

━━━░░░░░░░░░░░░░░░░░  15% Indexing
━━━━━━━━░░░░░░░░░░░░  40% Pushing — 0 B / 112.0 MB
━━━━━━━━━━━━░░░░░░░░  60% Pushing — 14.0 MB / 112.0 MB
━━━━━━━━━━━━━━━━━━░░  90% Committing

Output can be selected explicitly:

# Keep the progress bar when output is captured.
reprint files-push "$URL" --state-dir="$STATE_DIR" --fs-root="$FS_ROOT" \
  --secret="$SECRET" --progress=tty

# Emit one JSON object per line in a terminal.
reprint files-push "$URL" --state-dir="$STATE_DIR" --fs-root="$FS_ROOT" \
  --secret="$SECRET" --progress=jsonl

This change

Indexing begins at 15%. The completed index diff reaches 40%, where local-path pushing begins. During that stage, the suffix reports target-confirmed file bytes against the file byte total collected by the single-pass plan. The remaining stages advance from target-confirmed path counts, target-confirmed deletion-list bytes, and phase milestones. The percentage describes lifecycle progress, not elapsed time or a completion-time estimate.

Progress has one data path. PushPlan exposes its internal phase and raw durable index byte counts. PushFilesSender::get_progress() combines those with target-confirmed upload counts. ImportClient reads that snapshot once after each sender step and maps it directly onto terminal labels and stage weights. The plan and sender do not calculate terminal percentages or expose a second terminal-progress snapshot.

--progress=auto keeps terminal output on a TTY and JSONL otherwise. tty forces the bar; jsonl forces the existing push_progress records and final result. The selector changes live progress presentation, not the result schema, so it follows BuildKit's --progress pattern rather than introducing a general --format option. Explicit tty and jsonl modes reject --verbose, preventing detailed log lines from corrupting the selected presentation.

Testing

Run files-push in a terminal against a tree with changed files and deletions. Check that one line advances through Indexing, Pushing, and Committing, with pushed bytes increasing after target responses. Capture --progress=tty and check that the bar remains; run --progress=jsonl in a terminal and check that every output line is JSON. Check that either explicit mode rejects --verbose before starting a sender.

@adamziel
adamziel force-pushed the adamziel/files-push-stage-progress branch 3 times, most recently from 9563224 to a23324e Compare August 6, 2026 15:20
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Pull pipeline performance — large-directory

Site: large-directory · 2,000+ plus targeted file-transfer scenarios files · 10,000 posts · 25,000 postmeta · PHP 8.5.9

Stage PR trunk Δ Status Details
playground-sqlite-db-pull 9.50 s 9.88 s ⚪ -384 ms (-3.9%) condition=db-pull in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=lexer
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=selected
trunk: condition=db-pull in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=lexer
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=selected
playground-sqlite-db-apply 3.60 s 3.72 s ⚪ -113 ms (-3.0%) condition=db-apply to SQLite in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=parser
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=verified
native_ast=WP_MySQL_Native_Parser_Node
sqlite_driver_parser=verified
trunk: condition=db-apply to SQLite in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=parser
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=verified
native_ast=WP_MySQL_Native_Parser_Node
sqlite_driver_parser=verified
Total 13.10 s 13.60 s ⚪ -497 ms (-3.7%)

Numbers carry runner noise; treat single-run deltas as directional, not authoritative.

📈 Trunk performance history — commit-by-commit timeline.

@adamziel
adamziel force-pushed the adamziel/files-push-stage-progress branch from a23324e to 8801ad9 Compare August 6, 2026 15:32
@adamziel adamziel changed the title [Push] Report files-push progress for each stage [Push] Show one progress bar throughout files-push Aug 6, 2026
@adamziel
adamziel force-pushed the adamziel/files-push-stage-progress branch 5 times, most recently from 92ffe37 to 3225679 Compare August 6, 2026 23:37
@adamziel
adamziel changed the base branch from trunk to adamziel/rename-reprint-server-client August 6, 2026 23:37
@adamziel
adamziel force-pushed the adamziel/files-push-stage-progress branch from 3225679 to a2c0f81 Compare August 6, 2026 23:52
@adamziel
adamziel changed the base branch from adamziel/rename-reprint-server-client to trunk August 6, 2026 23:52
@adamziel
adamziel force-pushed the adamziel/files-push-stage-progress branch 4 times, most recently from ee3ed24 to ec8fe82 Compare August 7, 2026 09:32
@adamziel adamziel changed the title [Push] Show one progress bar throughout files-push [Push] Show selectable files-push progress with one lifecycle bar Aug 7, 2026
@adamziel
adamziel force-pushed the adamziel/files-push-stage-progress branch from ec8fe82 to d74a03f Compare August 7, 2026 14:51
@adamziel
adamziel merged commit 092dcfd into trunk Aug 7, 2026
21 checks passed
@adamziel
adamziel deleted the adamziel/files-push-stage-progress branch August 7, 2026 15:03
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