Skip to content

test(tui): six terminal tests no longer follow the developer's terminal - #6979

Open
Lstarsky0 wants to merge 1 commit into
codewhale-hq:mainfrom
Lstarsky0:test/terminal-tests-ignore-ambient-markers
Open

Lstarsky0 wants to merge 1 commit into
codewhale-hq:mainfrom
Lstarsky0:test/terminal-tests-ignore-ambient-markers

Conversation

@Lstarsky0

Copy link
Copy Markdown
Contributor

What and why

Six tui tests read the terminal environment the suite runs in and fail in setups CI never has:

  • Inside tmux or GNU screen, or in Tilix or Terminator (TMUX, STY, TILIX_ID or TERMINATOR_UUID set), apply_env_overrides caps the redraw rate. The two Ghostty tests in settings and config_fancy_animations_keeps_ghostty_full_motion assert it is not capped. They already remove the SSH markers for the same reason, and the sibling no_animations_* / other_terminals_* tests already remove these four.
  • Over SSH (SSH_CLIENT, SSH_CONNECTION or SSH_TTY set) the clipboard export goes to the terminal client and says so, while command_clipboard_export_preserves_structure_and_redacts_secrets expects "local clipboard". The clipboard target is picked when App is built, so the export harness removes the three variables before it builds the app, not inside the test.
  • With NO_ANIMATIONS=1 exported, the two Ghostty tests, non_vscode_term_program_does_not_force_low_motion and tilix_and_terminator_cap_redraws_without_disabling_motion fail because motion is already off.

Each test now removes those variables for its own duration with EnvVarGuard, under the env lock it already holds. Production code is unchanged.

#6973 moves config_fancy_animations_keeps_ghostty_full_motion into config_main_host.rs. Whichever of the two lands second needs the four EnvVarGuard::remove lines carried over to the test's new place.

Issue

No-Issue: local test failures only, no issue filed for them

How I tested it

  • Ran the six tests with each variable above set on its own. Before: TMUX, STY, TILIX_ID or TERMINATOR_UUID fails the three Ghostty tests, any one of the SSH variables fails the export test, NO_ANIMATIONS=1 fails four. After: all six pass in every case, and also with tmux, iTerm, SSH and NO_COLOR set together.
  • cargo fmt --all -- --check, cargo clippy -p codewhale-tui --all-targets --all-features with CI's flags, and cargo check -p codewhale-tui --all-targets: clean. Clippy also on 1.99, plus cargo +1.89.0 check -p codewhale-tui.
  • cargo nextest run -p codewhale-tui --lib: 15289 passed, none failed.

No new tests; this changes six existing ones and the export test harness.

Checklist

  • One focused change, on 947f670; it merges cleanly into current main
  • cargo fmt --all passes, and tests cover new or changed behavior
  • If this adds or changes a user-facing feature, I updated its docs and its row in docs/features.toml (cargo test -p codewhale-tui --test feature_registry checks it) — n/a

These tests read the terminal environment the suite runs in, and fail in
common setups that CI never has:

- inside tmux or GNU screen, or in Tilix or Terminator (TMUX, STY,
  TILIX_ID or TERMINATOR_UUID set), apply_env_overrides caps the redraw
  rate. The two Ghostty tests in settings and
  config_fancy_animations_keeps_ghostty_full_motion assert it is not
  capped, so they fail there. They already remove the SSH markers for the
  same reason; the sibling tests no_animations_* and other_terminals_*
  already remove these four as well.
- over SSH (SSH_CLIENT, SSH_CONNECTION or SSH_TTY set) the clipboard export
  goes to the terminal client and says so, and
  command_clipboard_export_preserves_structure_and_redacts_secrets expects
  "local clipboard".
- with NO_ANIMATIONS=1 exported, the two Ghostty tests,
  non_vscode_term_program_does_not_force_low_motion and
  tilix_and_terminator_cap_redraws_without_disabling_motion fail because
  motion is switched off before they look at it.

Each test now removes those variables for its own duration with
EnvVarGuard, under the env lock it already holds. Production code is
unchanged.

Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com>
@Lstarsky0
Lstarsky0 requested a review from Hmbown as a code owner October 14, 2026 16:40

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm label Oct 14, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T16:43:20.982101Z 4689ff3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants