Skip to content

chore(tui): gate audited test-only helpers - #5666

Closed
wuisabel-gif wants to merge 1 commit into
Hmbown:mainfrom
wuisabel-gif:wuisabel/5587-test-only-dead-code
Closed

chore(tui): gate audited test-only helpers#5666
wuisabel-gif wants to merge 1 commit into
Hmbown:mainfrom
wuisabel-gif:wuisabel/5587-test-only-dead-code

Conversation

@wuisabel-gif

Copy link
Copy Markdown
Contributor

Summary

Addresses the approved bounded first slice of #5587.

This PR converts 13 audited test-only helper surfaces from #[allow(dead_code)] to #[cfg(test)] across TUI rendering/text fixtures:

  • whale gallery constants and text/ASCII render helpers;
  • focus-texture accounting assertion;
  • file-tree scroll test helper;
  • ambient frame-budget assertion constant;
  • history exploration/generic render convenience wrappers;
  • reasoning-summary test helper.

Where a gated helper had no existing direct consumer, a small property test now exercises the helper (FileTreeState::adjust_scroll, ExploringCell::lines_with_motion, and whale state priority). Production consumers were verified with cargo check -p codewhale-tui --lib; no runtime behavior or production code path changes are intended.

Stale production-use allowances, blanket conversions, and Tier C intent-check items remain out of scope.

Tests

Passed locally:

  • cargo fmt --all -- --check
  • git diff --check
  • affected module suites: whales (14), focus texture (9), file tree (8), history (41), ambient life (29)
  • RUST_MIN_STACK=16777216 cargo test -p codewhale-tui --lib --locked — 11,228 passed, 0 failed, 13 ignored
  • cargo check -p codewhale-tui --lib --locked

The default-stack full TUI test run is blocked by the known #5585 baseline stack overflow in runtime_api::tests::reload_config_preserves_profile_selected_named_custom_route; the documented 16 MiB stack setting passes the full suite.

Strict Clippy is currently blocked on the untouched runtime_threads.rs:2562 baseline function accumulate_runtime_cost_coverage (clippy::too_many_arguments, 9/7), which is outside this cleanup slice and already present on origin/main.

No provider credentials or network access are required.

No-Issue: This PR addresses the approved first #5587 test-only-marker slice without automatically closing the broader audit issue.

Convert the first audited test-only dead-code slice to cfg(test), covering rendering/text fixtures and helper surfaces while preserving runtime behavior. Add direct tests for scroll and exploration wrappers for Hmbown#5587.
@Hmbown

Hmbown commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Thank you, Isabel. I verified this patch is already on main through #5667 (6ef5f87d8182eb38a18cfff99e58bbf7ef01b20c). Original 8a27b8c57 and landed ab4c8a8e1 have the same stable patch ID, and the landed commit preserves Isabel Wu <231155141+wuisabel-gif@users.noreply.github.com> as author.

I’m closing this duplicate PR because the contribution is already shipped on main; merging this stale head again would duplicate the patch.

@Hmbown Hmbown closed this Aug 28, 2026
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