Skip to content

fix(tui): default alternate screen to always - #18

Merged
echobt merged 2 commits into
mainfrom
cursor/tui-alternate-screen-always-2b5e
Sep 5, 2026
Merged

fix(tui): default alternate screen to always#18
echobt merged 2 commits into
mainfrom
cursor/tui-alternate-screen-always-2b5e

Conversation

@echobt

@echobt echobt commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Interactive TUI launch now enters the alternate screen by default (alternate_screen always), matching a Codex-style full viewport. The host terminal is taken over on start instead of remaining inline.

Welcome splash is unchanged from #17: Welcome to Cortex, the coding agent CLI plus the version / command legend. No fake > cortex prompt or cwd lines. Composer dual-hairline and caret-before-placeholder are unchanged.

Opt out to stay inline:

  • [tui] alternate_screen = false in config
  • cortex --no-alternate-screen on the CLI
  • --alternate-screen still forces the alternate buffer when config is false

Test plan

  • cargo fmt --all -- --check
  • ./scripts/clippy.sh (local: -p cortex-cli; workspace gate in CI)
  • cargo test -p cortex-cli --lib -- test_cli_alternate_screen plus engine alternate_screen tests
  • TUI / snapshot tests for every surface this PR touches (TUI checks job was already green; lock proof still asserts no fake > cortex)
  • cargo audit (or note a documented .cargo/audit.toml exception) — CI Security Audit was green on the previous run

Attestation (required)

I attest that:

  • Security reviewed — auth, exec/sandbox, path traversal, network egress, and secret handling in this diff were reviewed. No secrets, tokens, or keyring dumps are in the change.
  • Product-facing errors — user-visible failures use Cortex product copy. API-down paths say The coding service is temporarily unavailable. No raw provider, SDK, or transport names.
  • TUI verified — every TUI surface touched in this PR was exercised (build + headless snapshot / ratatui-style test). CI TUI checks were green.
  • Tests added — unit tests cover the new logic; TUI changes include a snapshot or buffer assertion. No mocks that report success.
  • No secrets — no API keys, WorkOS secrets, R2/AWS credentials, or .env files are included.

Risk

Low. Default TUI terminal mode only. No auth, exec policy, sandbox, or API-contract changes. Users who want the previous inline layout set [tui] alternate_screen = false or --no-alternate-screen.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 5, 2026 16:43
Interactive TUI launch enters the alternate screen (full viewport).
Opt out with --no-alternate-screen or [tui] alternate_screen = false.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
Cli does not implement Debug, so expect_err failed clippy and cargo test.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
@echobt
echobt marked this pull request as ready for review September 5, 2026 17:00
@echobt
echobt merged commit 312a08d into main Sep 5, 2026
10 checks passed
@echobt
echobt deleted the cursor/tui-alternate-screen-always-2b5e branch September 5, 2026 17:00
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.

2 participants