From 207be3c771d281baae6e5fa0fb74be9a056e97a2 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Tue, 1 Sep 2026 15:48:22 +0300 Subject: refactor: render the shell in the client (#3487) * feat: add opt-in client-rendered shell * feat: add client-owned shell mouse controls * feat: complete client-owned shell chrome * feat: add client-owned shell settings and notifications * feat: run client shell custom commands * feat: render popup terminals in client shell * feat: add client-owned scrollback and copy mode * fix: preserve client worktree trust defaults * feat: render startup diagnostics in client shell * feat: render onboarding in client shell * feat: render product announcements in client shell * feat: render release notes in client shell * feat: render mobile switcher in client shell * feat: render kitty graphics in client shell * fix: preserve client shell lifecycle coherence * refactor: route client shell commands through endpoint connections * refactor: make the client-rendered shell the default * refactor: remove monolithic launch mode * refactor: complete client-rendered shell cutover * perf: retain client pane surface updates * perf: scale retained pane surface updates * perf: remove remote pane input latency * test: make client shell checks platform-independent * fix: prevent client timer starvation * test: fix client shell platform gates * test: accept retained surfaces in cross-area checks * test: make client mode assertions platform-neutral * fix: badge only outdated integrations --- src/terminal/runtime.rs | 59 +++++++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 36 deletions(-) (limited to 'src/terminal/runtime.rs') diff --git a/src/terminal/runtime.rs b/src/terminal/runtime.rs index 5051a46b..025983a3 100644 --- a/src/terminal/runtime.rs +++ b/src/terminal/runtime.rs @@ -245,11 +245,6 @@ impl TerminalRuntime { self.0.agent_detection_reset_notify_for_test() } - #[cfg(test)] - pub(crate) fn agent_detection_enabled_for_test(&self) -> bool { - self.0.agent_detection_enabled_for_test() - } - pub fn set_full_lifecycle_authority_active(&self, active: bool) { self.0.set_full_lifecycle_authority_active(active); } @@ -283,23 +278,20 @@ impl TerminalRuntime { self.0.scroll_metrics() } - pub(crate) fn search_text_matches( + pub(crate) fn search_text_window( &self, query: &str, case_sensitive: bool, - ) -> Vec { - self.0.search_text_matches(query, case_sensitive) - } - - pub(crate) fn text_match_is_current(&self, text_match: crate::pane::TerminalTextMatch) -> bool { - self.0.text_match_is_current(text_match) - } - - pub(crate) fn text_matches_are_current( - &self, - text_matches: &[crate::pane::TerminalTextMatch], - ) -> Vec { - self.0.text_matches_are_current(text_matches) + direction: crate::pane::TerminalSearchDirection, + cursor: crate::pane::TerminalTextPoint, + previous: Option<( + crate::pane::TerminalTextPoint, + crate::pane::TerminalTextPoint, + )>, + limit: usize, + ) -> crate::pane::TerminalSearchWindow { + self.0 + .search_text_window(query, case_sensitive, direction, cursor, previous, limit) } pub(crate) fn word_motion_target( @@ -311,17 +303,16 @@ impl TerminalRuntime { self.0.word_motion_target(row, col, motion) } - /// Collects the complete terminal input-mode snapshot. - /// - /// This performs multiple terminal queries. Keep it out of render/layout - /// and pane-scaled loops; add a narrow accessor when one fact is needed. - #[cfg(test)] - pub fn input_state(&self) -> Option { - self.0.input_state() + pub(crate) fn terminal_dimensions(&self) -> Option<(u16, u16)> { + self.0.terminal_dimensions() } - pub fn keyboard_report_all_requested(&self) -> bool { - self.0.keyboard_report_all_requested() + pub(crate) fn paragraph_motion_target( + &self, + row: u32, + direction: i8, + ) -> Option { + self.0.paragraph_motion_target(row, direction) } pub fn bracketed_paste_enabled(&self) -> bool { @@ -446,12 +437,12 @@ impl TerminalRuntime { self.0.keyboard_protocol() } - pub fn encode_terminal_key(&self, key: crate::input::TerminalKey) -> Vec { - self.0.encode_terminal_key(key) + pub fn modify_other_keys_level(&self) -> u8 { + self.0.modify_other_keys_level() } - pub async fn send_bytes(&self, bytes: Bytes) -> Result<(), mpsc::error::SendError> { - self.0.send_bytes(bytes).await + pub fn encode_terminal_key(&self, key: crate::input::TerminalKey) -> Vec { + self.0.encode_terminal_key(key) } pub fn try_send_bytes(&self, bytes: Bytes) -> Result<(), mpsc::error::TrySendError> { @@ -462,10 +453,6 @@ impl TerminalRuntime { self.0.send_bytes_after(bytes, delay); } - pub async fn send_paste(&self, text: String) -> Result<(), mpsc::error::SendError> { - self.0.send_paste(text).await - } - pub fn try_send_paste(&self, text: String) -> Result<(), mpsc::error::TrySendError> { self.0.try_send_paste(text) } -- cgit v1.2.3