Add active-pane terminal Find - #229
Conversation
Terminal users need Command-F to search the active pane's complete history, including output from before Ghosthub attached. A libghostty-only search cannot satisfy that contract for multiplexer sessions. Keep search and viewport ownership in each backend. Start with an identity-fenced tmux implementation and disable unsupported backends instead of presenting incomplete results. Use a Ghostty-style Find bar only for query entry and controls; no pane history crosses into Swift. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
tmux exposes exact match totals on newer releases, while copy mode and its viewport remain shared pane state. The Find design must reflect both contracts before implementation. Use the existing tmux 3.4 client guard, show totals only when tmux reports a complete count, and treat multi-client visibility as a native limitation. Require nested tmux argument encoding and fixed query-free errors so search text cannot become command syntax or a diagnostic. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
Find queries cross three tmux command parsers before they reach copy mode. Double-quoted or unquoted child commands can expand query text such as $HOME, so the design must require single-quoted encoding at every tmux depth. Use search_present as the stable no-match signal and treat count fields only as optional detail. This keeps navigation and result text consistent when tmux renders missing counts as either empty or zero. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
tmux 3.4 through 3.5a silently ignore a copy-mode search that uses the modern option terminator. A single command shape would make Find report false no-match results on supported releases. Define the 3.6 parser boundary and keep direction changes under tmux control. Reuse the existing single-quote helper at every parser depth so the design does not add a duplicate encoder. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
Active-pane Find crosses app shortcuts, per-surface state, libghostty callbacks, and exact-client tmux commands. The approved design needs reviewable steps that preserve backend-owned history and version-specific tmux behavior. Define test-driven implementation slices and final gates. Clarify the tmux 3.5 tier as a numeric comparison so future patch-letter releases use the legacy command form. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
Find must stay responsive while remote pane searches are still running. A per-surface controller now coalesces query edits, serializes backend work, and rejects results from stale searches. Add the Ghostty-compatible application shortcuts at the same shared boundary. Later tmux and libghostty integrations can use one state and reservation contract without intercepting ordinary terminal input. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
Pane history search needs the same exact-client protection as pane splitting. A shared guard now keeps later terminal operations tied to the attached server, session, client, and pane. Use one numeric tmux version model for capability decisions. Patch-letter releases now follow their major and minor feature boundary without duplicate parsing rules. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
Terminal users need to search complete pane history without Ghosthub copying or rebuilding backend-owned output. Add a Ghostty-style Find bar for ordinary libghostty surfaces and identity-fenced copy-mode search for POSIX tmux 3.4 and newer. Keep unsupported multiplexers unavailable instead of searching only the client buffer. Preserve tmux's version-specific command syntax, pane-wide copy-mode behavior, and match-count limits while keeping queries out of logs and diagnostics. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
New tmux clients can publish their exact TTY after the first identity probe, so keep the initial binding retry bounded until the attachment is ready. Make Find discoverable in the Command Palette and publish a deterministic guide capture for the documented workflow. Remove the local planning artifacts before the branch leaves the workspace. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
Find commands must continue to address the visible terminal after focus moves into the Find field or a log-viewer sheet. Delayed libghostty callbacks must not let an older search replace the latest result. The libghostty smoke test now waits until injected output is visible before it takes the search snapshot. This removes the CI-only timing dependency. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
A tmux client can move to another pane after Ghosthub installs its Find controller. Resolve the client's current pane before every Find operation, while the existing exact-pane guard still rejects a later race. Keep external libghostty search starts separate from registered app searches. The pinned runtime updates internal searches without a START_SEARCH callback. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
A presented log viewer owns terminal focus even when a borrowed session stays active behind it. Route Find to the log terminal so shortcuts affect the visible work. A new libghostty search must also replace any app-started callback wait. Move the controller to a new generation so only the replacement can publish results. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
Find must remain visible when its field owns focus, and delayed libghostty callbacks must not replace results for a newer query. Remote tmux failures must also retire an unusable pooled connection before the error is shown. Use libghostty's reset boundary to preserve callback ownership without changing the pinned library. Keep tmux failure status and diagnostics internal so the coordinator can invalidate the route without exposing query text. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
Standalone log terminals must reveal Find when the controller opens after SwiftUI builds the terminal view. Observe the controller at the shared overlay boundary so menu shortcuts update the visible bar. Wait for protected attachment establishment in the stateful removal test. A slow runner can otherwise start removal while the attachment still owns its mutation fence. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
An upstream Find action must replace any Ghosthub search still waiting for libghostty callbacks. Otherwise the reset boundary can promote the old token and leave the visible external search waiting forever. Keep the current token only for the in-flight reset pair, then route later results to the external operation. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
A blocked pane search must not delay a replacement query or keep Find open. Cancel superseded backend work and accept only the callback that completes the current operation. Keep native tmux surfaces out of libghostty search routing. Invalidate a lost remote connection only when it still belongs to the attachment that failed. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
Adds Ghostty-style Find for the active terminal pane without copying backend-owned history into Swift.
Closes #194