Skip to content

Fix overlapping Chinese text in command panels - #410

Merged
Tryanks merged 1 commit into
mainfrom
fix/command-cjk-cell-width
Sep 11, 2026
Merged

Tryanks merged 1 commit into
mainfrom
fix/command-cjk-cell-width

Conversation

@Tryanks

@Tryanks Tryanks commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

Chinese text in expanded command panels overlapped because each Unicode scalar was placed in a single terminal column. Commands now use grapheme widths, reserve spacer cells for wide characters, and wrap or truncate without splitting a grapheme or moving the ellipsis beyond the four-row limit.

The existing command-panel layout remains the owner. unicode-segmentation keeps combining sequences together and unicode-width provides their display widths. The Chinese regression failed before the fix (中 was Narrow, expected Wide) and passes afterward. Regression tests cover Chinese cell positions through the shared grid layout, wide-character wrapping, combining sequences, emoji, and truncation. The gallery includes the reported command and the visual contract is updated.

Validation before rebasing onto current main:

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo build --workspace --locked
  • cargo test --workspace --locked: 1115 passed, 5 ignored
  • cargo machete
  • iOS simulator and Web checks with RUSTFLAGS='-D warnings'
  • Native light/dark rendering at 80 and 40 columns verified with the reported command; temporary visual probes removed.

Local Android validation could not run because this machine has no NDK. Final-commit cross-platform validation is provided by this PR's CI; merge waits for all checks.

After rebasing onto current main: formatting and cargo test -p tcode-ui --lib command_ --locked pass (11 tests).

@Tryanks
Tryanks merged commit cba07d3 into main Sep 11, 2026
6 checks passed
@Tryanks
Tryanks deleted the fix/command-cjk-cell-width branch September 11, 2026 06:58
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