-
Notifications
You must be signed in to change notification settings - Fork 7k
feat(tui2): add inline transcript find #8470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
joshka-oai
wants to merge
6
commits into
main
Choose a base branch
from
joshka/tui2-transcript-find
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+4,467
−1,008
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Improve clipboard output for transcript selections, even when content is wrapped. - Preserve meaningful indentation for code blocks. - Treat soft-wrapped prose as a single logical line via wrap joiners. - Emit Markdown source markers when copying (inline backticks, code fences). - Extract selection/copy reconstruction into `transcript_copy`. - Thread joiner metadata through history rendering and wrapping helpers. - Update docs and add focused test coverage.
Support double/triple/quad click selection (word/line/paragraph) using transcript/viewport coordinates rather than terminal buffer positions. Multi-click expansion rebuilds the wrapped transcript view from HistoryCell::display_lines(width) so boundaries match on-screen wrapping during scroll/resize/streaming reflow. Drag selection resets the click tracker to avoid accidental multi-click accumulation. Tests cover click expansion, resets (time, movement, line change, drag), and paragraph detection across spacer lines between history cells.
Collaborator
Author
Multi-click selection was flaky because we reset the click tracker on any mouse drag event. Some terminals emit Drag events for very small cursor motion while the button is held down (trackpad jitter), which breaks double/quad click sequences. Treat small drags as jitter: only reset the click tracker once the cursor moves to another wrapped line or far enough horizontally from the anchor. Also loosen click grouping as the sequence progresses and slightly increase the inter-click timeout so quad-clicks are practical. Add tests covering drag jitter and relaxed quad-click grouping.
Add a 5+ click gesture to select the entire history cell in the transcript. Implementation notes: - Selection is computed in transcript/viewport coordinates (wrapped visual line indices + content columns), not terminal buffer coordinates. - We rebuild the wrapped transcript view and carry forward a mapping from each wrapped line to its originating HistoryCell index. - Quint-click expands to the contiguous wrapped-line range for that cell; if the click lands on a spacer line between cells, it selects the cell above (falling back to the next cell below). Tests cover selecting the full cell (including blank lines inside the cell) and quint-click behavior on spacer lines.
The SGR writer tests intentionally construct truecolor (RGB) and indexed colors so the emitted escape sequences are deterministic. Replace the blanket allow on the whole test with statement-level `#[expect(clippy::disallowed_methods)]` on the specific constructors (`Color::Rgb`/`Color::Indexed`), with inline rationale.
Add an in-viewport find experience for the TUI2 transcript (the scrollable region above the composer), without introducing a persistent search bar or scroll indicator. UX: - Ctrl-F opens a 1-row "/ " prompt above the composer and updates highlights live as you type - Ctrl-G jumps to the next match without closing the prompt, and keeps working after the prompt closes while the query is still active - Esc closes the prompt but keeps the active query/highlights; Esc again clears the search - Enter closes the prompt and jumps to the selected match Implementation: - Add a dedicated transcript_find module to own query/edit state, smart-case matching over flattened transcript lines, stable jump anchoring (cell + line-in-cell), and per-line highlight rendering - Keep app.rs integration additive via small delegation calls from the key handler and render loop - Plumb find visibility to the footer so shortcuts show Ctrl-G next match only while the find prompt is visible Docs/tests: - Add tui2/docs/transcript_find.md documenting current behavior vs the ideal/perfect end state and explicitly calling out deferred work - Stabilize VT100-based rendering tests by forcing color output and emitting crossterm fg/bg colors directly in insert-history output
700a059 to
97c5463
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Add an in-viewport find experience for the TUI2 transcript (the scrollable region above the composer), without introducing a persistent search bar or scroll indicator.
UX:
Implementation:
Docs/tests: