Copy-selection notice gained a "· highlight remains visible" suffix; 3 TUI tests still assert the old string
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Description
c7afd6620 / f4bc4db5f "Improve copy selection visibility" (2026-08-28) changed the copy-selection status notice to add a · highlight remains visible suffix. Three tests still assert the old exact string and now fail on master.
This is the first of the two failures blocking the Linux Build & Test job (run 35504384040), so everything after Run TUI library tests is skipped.
Root cause
crates/jcode-tui/src/tui/app/copy_selection.rs:414 now emits:
"Copied selection · highlight remains visible"
The code change looks intentional; the tests were not updated with it.
Failing tests
tui::app::tests::test_input_composer_drag_selects_and_copies_typed_text
crates/jcode-tui/src/tui/app/tests/input_copy_selection.rs:102
left: Some("Copied selection · highlight remains visible")
right: Some("Copied selection")
tui::app::tests::test_input_composer_drag_then_release_copies_via_full_mouse_path
crates/jcode-tui/src/tui/app/tests/input_copy_selection.rs:411
drag release over the composer must attempt a copy,
got Some("Copied selection · highlight remains visible")
tui::app::tests::test_changelog_overlay_mouse_drag_release_copies_text
crates/jcode-tui/src/tui/app/tests/scroll_copy_02/part_01.rs:1481
assertion failed: matches!(app.status_notice().as_deref(),
Some("Copied selection") | Some("Failed to copy selection") | Some("Selection is empty"))
Reproduction
At e589cbe5a (v0.86.0), Linux:
$ COLORTERM=truecolor cargo test -p jcode-tui --lib -- --test-threads=1 \
--skip test_prompt_entry_shimmer_color_moves_across_positions \
--skip right_fact_stack_uses_neutral_gray_except_for_context_usage
All three also fail when run individually in their own process, so this is not the shared-global-state flakiness tracked in #596.
Suggested fix
Update the three assertions to the current notice text. If the suffix is meant to be conditional, the tests should assert the prefix rather than the whole string.
Related: #1339, #1341, #1342, #596.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the current notice in crates/jcode-tui/src/tui/app/copy_selection.rs:414, then inspect the three failing assertions in crates/jcode-tui/src/tui/app/tests/input_copy_selection.rs and crates/jcode-tui/src/tui/app/tests/scroll_copy_02/part_01.rs. Run the provided cargo test command, update the assertions to match the intended notice behavior, and confirm all three tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100