Skip to content

fix(cli): follow terminal width instead of hardcoded table widths - #2012

Merged
Open-Squilla merged 5 commits into
TokenRhythm:mainfrom
mirzasnowy:fix/1987-terminal-table-width
Oct 29, 2026
Merged

Open-Squilla merged 5 commits into
TokenRhythm:mainfrom
mirzasnowy:fix/1987-terminal-table-width

Conversation

@mirzasnowy

@mirzasnowy mirzasnowy commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Scope boundary: CLI table rendering in src/opensquilla/cli (agents, channels, doctor, providers, search commands) plus CLI tests and deterministic checkpoint-retention test fixtures. Tables follow the terminal width and fold long values without truncating provider IDs, pairing codes, paths, recovery commands, or search URLs. No gateway, provider, or search logic changes.

Base branch: main

Target exception: none (targets main, the default branch)

Linked issue: Fixes #1987

Release note: CLI tables now adapt to narrow terminals while preserving complete field values through wrapping.

Tests: terminal-width regressions cover 40 and 80 columns, complete IDs/codes/commands/URLs, wide Unicode characters, and both modern and legacy Windows table borders. Checkpoint-retention tests pin the intended character-pressure estimator and separately exercise the conservative tokenizer fallback; all retention and budget assertions remain in place. A before/after run reproduced the truncation failures and the doctor context assertion failure, then passed after the fixes. Local validation: 226 focused CLI, telemetry, checkpoint-recovery, and usage-settlement tests passed; ruff check src tests passed; mypy src/opensquilla --show-error-codes passed (1643 source files). GitHub CI passed on 2914c0b (149 successful checks, 2 configured skips). Two failed groups passed on a targeted rerun: a Linux PowerShell/.NET crash and a Windows native-process cancellation timeout; no audit assertions or timeouts were relaxed. CI run: https://github.com/TokenRhythm/opensquilla/actions/runs/40858065593. Real macOS PTY probes at 40 and 80 columns passed without setting COLUMNS. Final combined-tree merge-queue CI passed on its first attempt for 7974829: https://github.com/TokenRhythm/opensquilla/actions/runs/40864273786.

Safety notes: presentation-only changes; JSON output and command behavior are unchanged. Rendering uses Rich's platform-neutral width and folding behavior; Linux and Windows are covered by the existing CI matrix. No new dependencies or startup hooks.

Maintainer live check: offline macOS PTY checks completed; no provider or channel credentials required.

Third-party origin: original terminal-width change by @mirzasnowy; maintainer follow-up preserves complete values and extends regression coverage.

I have reviewed every line of this diff.

@Open-Squilla
Open-Squilla added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
@github-actions

Copy link
Copy Markdown

Merge queue CI: failure — run 40860926581, attempt 1.
Tested queue candidate: 28e09a6547e2e8f46f04c33aca5b71aadc4db8b2. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

@Open-Squilla
Open-Squilla added this pull request to the merge queue Oct 29, 2026
@github-actions

Copy link
Copy Markdown

Merge queue CI: success — run 40864273786, attempt 1.
Tested queue candidate: 7974829a1eea26a9f243d343f7d315951246fccc. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

Merged via the queue into TokenRhythm:main with commit 7974829 Oct 29, 2026
301 of 304 checks passed
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.

[Bug]: providers list 在 80 列终端里被折成 200 列宽:CLI 把输出宽度写死在源码里,COLUMNS 和任何开关都改不动

2 participants