refactor(desktop): narrow terminal frame buffer text prelude export

This commit is contained in:
Kang
2026-07-26 13:18:57 +08:00
parent 188df40a8a
commit 8ddd68cc42
4 changed files with 18 additions and 9 deletions
@@ -54,12 +54,12 @@ pub(super) use crate::models::{
CloudSyncInputField, CredentialAutofillMatchEvent, CredentialAutofillMatchOutcome,
CredentialAutofillMatchPipeline, CredentialAutofillMatchRequest,
CredentialAutofillMatchRequestKey, NavItem, PanelSide, SessionLaunchConfig,
TERMINAL_UI_OUTPUT_TAIL_CAP, TerminalFrameActionLinks, TerminalFrameBufferTextEvent,
TerminalFrameEvent, TerminalFrameOutputEvent, TerminalFrameOutputSubmission,
TerminalFramePipeline, TerminalFrameSearchEvent, TerminalFrameSearchKey,
TerminalFrameSnapshotEvent, TerminalViewState, TransferJobEvent, TransferJobKind,
TransferJobOutput, TransferJobResult, TransferJobState, TransferJobStatus, is_multi_line_paste,
normalize_paste_newlines, panel_collapsed_from_persistence, terminal_action_link_matcher_key,
TERMINAL_UI_OUTPUT_TAIL_CAP, TerminalFrameActionLinks, TerminalFrameEvent,
TerminalFrameOutputEvent, TerminalFrameOutputSubmission, TerminalFramePipeline,
TerminalFrameSearchEvent, TerminalFrameSearchKey, TerminalFrameSnapshotEvent,
TerminalViewState, TransferJobEvent, TransferJobKind, TransferJobOutput, TransferJobResult,
TransferJobState, TransferJobStatus, is_multi_line_paste, normalize_paste_newlines,
panel_collapsed_from_persistence, terminal_action_link_matcher_key,
terminal_expensive_interactions_enabled, terminal_frame_search_result_is_current,
terminal_snapshot_matches_grid_geometry,
};
@@ -3,8 +3,8 @@ use std::fmt::Write as _;
use super::*;
use crate::models::{
MainMode, TerminalSearchMode, TerminalWindowNode, WorkspacePaneNode,
append_terminal_ui_output_tail, terminal_frame_scroll_window_extra_rows,
MainMode, TerminalFrameBufferTextEvent, TerminalSearchMode, TerminalWindowNode,
WorkspacePaneNode, append_terminal_ui_output_tail, terminal_frame_scroll_window_extra_rows,
};
const MAX_OSC52_REPLY_CHARS: usize = 1_048_576;
+5 -1
View File
@@ -13,7 +13,7 @@ Last updated from the working tree on 2026-07-26.
| `impl NyaTermApp` blocks | 236 | Spread across 233 files under `crates/nyaterm-desktop/src`. |
| `#[path = "..."]` declarations in desktop | 306 | Historical migration debt; do not add new occurrences. |
| `use super::*` imports in desktop | 354 | Includes indented test-module imports; historical migration debt, do not add new occurrences. |
| `features/prelude.rs` rough exported-token count | 243 | Still a broad shared prelude; two hundred two low-frequency transport/core/http/model exports are now explicit imports. |
| `features/prelude.rs` rough exported-token count | 242 | Still a broad shared prelude; two hundred three low-frequency transport/core/http/model exports are now explicit imports. |
| Entity Store structs | 13 | Includes store handles/runtime stores and domain stores. |
| Snapshot structs | 9 | Workspace, session, overlay, settings, connections, transfer, AI, cloud sync, remote ops. |
| `replace_snapshot` methods | 9 | Entity stores are still primarily snapshot projections. |
@@ -463,6 +463,10 @@ these as staged extraction candidates, not as formatting-only refactor targets.
selection runtime, and terminal surface tests. This is import plumbing only;
cell mapping, selection range construction, terminal parsing, snapshots, and
protocol behavior are unchanged.
- The low-frequency terminal frame buffer-text event model was moved out of
`features/prelude.rs` and imported explicitly by the terminal buffer runtime.
This is import plumbing only; frame event production, terminal parsing,
snapshots, and protocol behavior are unchanged.
- Two low-frequency session runtime model types were moved out of
`features/prelude.rs` and imported explicitly by app-state and session
runtime modules. This is import plumbing only; session event draining,
+5
View File
@@ -336,6 +336,11 @@ check_no_matches \
'(^|[,{[:space:]])(TerminalSelection)([},[:space:]]|$)' \
crates/nyaterm-desktop/src/features/prelude.rs
check_no_matches \
"low-frequency terminal frame buffer-text event model must stay out of features/prelude.rs" \
'(^|[,{[:space:]])(TerminalFrameBufferTextEvent)([},[:space:]]|$)' \
crates/nyaterm-desktop/src/features/prelude.rs
check_no_matches \
"low-frequency terminal search UI model must stay out of features/prelude.rs" \
'(^|[,{[:space:]])(TerminalSearchMode)([},[:space:]]|$)' \