feat(cli): show per-file in-flight status in bucket migrate progress - #216
Conversation
Greptile SummaryThe PR replaces percentage-based bucket-migration progress with a terminal-height-aware list of in-flight objects.
Confidence Score: 4/5The inaccurate per-object queue timing and longest-queued ordering should be corrected before merging; display-width handling is also worth hardening. Every successful object receives its timestamp only after the slowest scheduling request in its batch finishes, so the displayed durations and ordering do not reliably represent when individual objects entered the queue. Wide object names can also wrap despite length-based truncation and desynchronize sticky redraws. Files Needing Attention: packages/cli/src/lib/buckets/migrate.ts Important Files Changed
Reviews (1): Last reviewed commit: "feat(cli): show per-file in-flight statu..." | Re-trigger Greptile |
b26ba98 to
746b3cb
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 746b3cb. Configure here.
746b3cb to
a24422d
Compare
Replace the file/byte percentage bars with a live list of in-flight objects (name, size, time queued), sorted longest-queued first and capped to fit the terminal. The gateway exposes no per-object transfer progress, so a percentage against total bytes made a large in-flight file look like a stalled run; showing each queued file's actual wait time instead reflects what the CLI genuinely knows. Assisted-by: Opus 4.8 via Claude Code
a24422d to
a6a23af
Compare

Summary
buckets migrateprogress with a live, per-object in-flight list (name, size, time queued), sorted longest-queued first and capped to fit the terminal (+ N moreoverflow when the list is large).Test plan
pnpm --filter @tigrisdata/cli exec vitest run test/lib/buckets/migrate.test.ts— 20/20 passing (6 new tests for the display helpers, existing throttle/drain tests untouched)pnpm --filter @tigrisdata/cli test— full CLI suite passingpnpm --filter @tigrisdata/cli exec tsc --noEmitbiome check(pre-commit hook)No changeset yet — holding off per request while this iterates.
Note
Low Risk
CLI-only progress UX and display helpers; migration scheduling/drain behavior is unchanged aside from more accurate
scheduledAtstamping.Overview
buckets migrateprogress no longer shows file/byte percentage bars or a single “migrating …” line. The sticky TTY block now reports files done / failed, confirmed vs in-flight bytes, and a live in-flight list (key, size, queued duration).In-flight rows are sorted longest-queued first (stable by name), capped by terminal height and
MAX_INFLIGHT_ROWS, with+ N morewhen the list is large so cursor-up redraw stays within the screen.scheduledAtis recorded when eachscheduleMigrationcall resolves (not once per batch), so per-object queued times stay accurate under concurrent scheduling.flushScheduleBatchis exported for tests.Adds a changeset and vitest coverage for display helpers, overflow edge cases, and per-item timestamps.
Reviewed by Cursor Bugbot for commit a6a23af. Bugbot is set up for automated code reviews on this repo. Configure here.