Skip to content

Clear TUI input when starting new session#370

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-new-session-clear-input
Open

Clear TUI input when starting new session#370
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-new-session-clear-input

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • clear the TUI input widget when AppState::new_session() starts a fresh session
  • extend the new-session action test to cover stale draft text being removed

Fixes PlatformNetwork/bounty-challenge#43779

Tests

  • rustfmt --edition 2024 --check src/cortex-tui/src/app/methods.rs src/cortex-tui/src/runner/handlers/tests.rs
  • cargo test --package cortex-tui runner::handlers::tests::test_handle_new_session -- --nocapture
  • cargo test --package cortex-tui runner::handlers::tests -- --nocapture
  • cargo check --package cortex-tui --lib
  • git diff --check

Note: cargo fmt --package cortex-tui --check is blocked by an existing unrelated formatting diff in src/cortex-tui/src/question.rs, so I checked the touched files directly with rustfmt.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG] [v0.0.7] new_session() Does Not Clear the Input Text Field — Old Typed Text Survives Into the New Session

1 participant