Repository navigation
fix: keep the picker's progress line inside the terminal - #99
Merged
Merged
Conversation
While prodex ui waited for an answer, renderProgressBar never fitted its line to the terminal, and the label was cut at 60 UTF-16 units instead of columns. At 80 columns the frame for "prompt sent, waiting for answer (budget 5m)" was 102 columns wide; it wrapped, and the redraw (ESC[2K\r) cleared only the wrapped row, leaving a new row every 250 ms. Found 2026-11-09 driving the picker in a pty. renderProgressBar takes the terminal's columns and, when the line does not fit, cuts the label by display width (truncateToWidth) so that the bar, elapsed time, budget and "ctrl-c to stop" stay whole; a terminal too narrow even for those gets the line cut. The picker passes process.stdout.columns and no longer slices the label itself. Not changed: the bar still fills against a fixed 20-minute budget while the send reports its own budget in the label. Verified: the new tests/tui.test.ts case fails against main (102 > 79) and passes here; npx tsc --noEmit; full suite 1894 passed, 3 skipped. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
What this touches
4 file(s), 62 line(s) changed. Tests changed. This is an automated first pass, not a review. CI is the gate; a person decides. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
youdie006
added a commit
that referenced
this pull request
Nov 10, 2026
…minal) to the container image Same change as main PR #99 (merge 52f76d6), released in 0.40.51, applied to src, tests and docs without changes. The CHANGELOG lines are main's with the PR noted. Verified on the 12 ports together (35bb83b..this commit): tsc clean; full suite 2247 passed, 3 skipped; release:verify ok. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
youdie006
added a commit
that referenced
this pull request
Nov 10, 2026
0.40.51 (#88-#99) published and installed on WSL, M3 and the Mac mini; M4 was unreachable. The publish run's first attempt failed on macOS Intel (the suite's 15 minute budget) and Windows (a fixed 200 ms wait in a test); the failed jobs passed on rerun, and both causes were fixed in #100. Both browser containers now run 88a8d96. M3's colima VM had been stopped since M3 restarted and was started for the swap. Includes the live check of #96's stdio limit on the WSL container. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
While
prodex uiwaited for an answer, its progress line was wider than the terminal. Found 2026-11-09 driving the picker in a pty.ESC[2K\r) cleared only the wrapped row, so a new row was left behind every 250 ms.Change
renderProgressBartakescolumns. When the line does not fit, it cuts the label by display width (truncateToWidth). The bar, elapsed time, budget and "ctrl-c to stop" stay whole.process.stdout.columnsand no longer slices the label itself.Verification
tests/tui.test.ts: 80 columns with the real label, a 40-column Korean label, and a 30-column terminal. It fails against main (102 > 79) and passes here.npx tsc --noEmitpasses. Full suite: 1894 passed, 3 skipped.