Skip to content

refactor(cli): harden TUI input and release verification - #1600

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/cli-tui-host-reliability
Jul 17, 2026
Merged

refactor(cli): harden TUI input and release verification#1600
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/cli-tui-host-reliability

Conversation

@limityan

@limityan limityan commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • centralize Startup and Chat terminal input normalization in one private stateful CLI reader
  • preserve short key, chord, and navigation semantics while bounding sustained reads and retaining large or cross-batch Windows paste text
  • route recognized paste through one bulk insert path, normalize platform newlines, and expand pasted tabs to four spaces
  • add a native PTY/ConPTY Startup lifecycle smoke for post-resize interaction, multiline input, idle Ctrl+C, and observable terminal cleanup
  • verify release archives after checksum generation by extracting and executing the packaged binary before upload
  • update CLI architecture status without claiming resize rendering, an active Chat turn, or terminal fault injection is complete

Scope boundaries

  • no TUI visual, command, keymap, shared runtime, or public contract changes
  • no extension/plugin work and no HarmonyOS implementation
  • no new CI platform matrix; Linux reuses the existing CLI job and Windows reuses the existing workspace job
  • active Chat turns, resize rendering correctness, initialization/abnormal-exit faults, real-model flows, and broader terminal fault injection remain follow-up work

Reliability and cost

Area Before After
burst collection could continue indefinitely while events remained ready at most 256 events and 50 ms after the first event; a cut text tail receives one bounded 50 ms continuation wait
normal key routing Startup and Chat used separate burst heuristics; some non-text events could be lost short keys, chords, and navigation remain events; paste follows the focused input owner and cannot write behind modal flows
large paste insertion clipboard paths copied and refreshed per character, with quadratic behavior recognized paste inserts once per batch with one command-menu refresh; the focused 64 KiB regression changed from over 60 s to 0.00 s test time
Windows terminal coverage compile-only ConPTY Startup smoke covers a 256-event multiline tail, idle Ctrl+C, and observable cleanup
release verification source-tree binary smoke before packaging SHA-256 check plus extracted archive --version / --help before upload

Validation

  • rustup run nightly cargo fmt --all -- --check
  • rustup run nightly cargo check -p bitfun-cli
  • rustup run nightly cargo test -p bitfun-cli
  • pnpm run check:github-config
  • pnpm run check:repo-hygiene
  • git diff --check gcwing/main...HEAD
  • local Windows ConPTY boundary smoke and archive extraction/execution smoke
  • range-diff verification after rebasing onto the latest gcwing/main

The local stable toolchain is Rust 1.94.1 while the current dependency graph requires Rust 1.95 or newer, so Rust validation used the installed nightly toolchain; CI resolves the repository's latest stable toolchain.

@limityan
limityan force-pushed the yanzhn/cli-tui-host-reliability branch from 04dfe5e to 05f1d14 Compare July 17, 2026 15:12
@limityan
limityan merged commit 6db862c into GCWing:main Jul 17, 2026
5 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.

1 participant