refactor(desktop): remove transfer path helper wildcard import

This commit is contained in:
Kang
2026-07-28 13:24:22 +08:00
parent dca0df90a6
commit 9352cf2997
3 changed files with 10 additions and 3 deletions
@@ -1,4 +1,6 @@
use super::*;
use gpui::Pixels;
use crate::models::TransferBrowserColumnWidths;
pub(in crate::features::pages::transfers) fn remote_file_name(path: &str) -> String {
path.trim_end_matches('/')
@@ -76,7 +78,7 @@ impl TransferPathPart {
pub(in crate::features::pages::transfers) fn transfer_browser_table_width(
widths: TransferBrowserColumnWidths,
) -> gpui::Pixels {
) -> Pixels {
widths.name + widths.modified + widths.size + widths.permissions + widths.owner + widths.group
}
+4 -1
View File
@@ -12,7 +12,7 @@ Last updated from the working tree on 2026-07-28.
| `NyaTermApp` fields | 261 | Counted from `features/app_state/mod.rs`; down from 585, still transitional. |
| `impl NyaTermApp` blocks | 240 | Spread across 235 files under `crates/nyaterm-desktop/src`. |
| `#[path = "..."]` declarations in desktop | 0 | Cleared. Every directory is a real module; the boundary script fails on any new occurrence. |
| `use super::*` imports in desktop | 349 | Includes indented test-module imports; historical migration debt, do not add new occurrences. |
| `use super::*` imports in desktop | 348 | Includes indented test-module imports; historical migration debt, do not add new occurrences. |
| `features/prelude.rs` rough exported-token count | 229 | Still a broad shared prelude; two hundred sixteen low-frequency transport/core/http/model/helper exports are now explicit imports. |
| Entity Store structs | 4 | `Runtime`, `WindowRuntime`, `StartupRestore`, `Overlay`. Each owns state the app does not. |
| Snapshot structs | 0 | Cleared. No store is a projection of `NyaTermApp` any more. |
@@ -320,6 +320,9 @@ these as staged extraction candidates, not as formatting-only refactor targets.
- `pages/transfers/helpers/editor.rs` no longer carries an unused helper
wildcard import; the editor preview/search/permission helpers are pure local
functions with no parent-module dependency.
- `pages/transfers/helpers/paths.rs` no longer depends on the transfer helper
wildcard import; remote path helpers now name their column-width model and
GPUI pixel type explicitly.
- `connection_runtime/helpers.rs` no longer depends on the connection runtime
wildcard import; its GPUI, app, model, and core dependencies are explicit.
- `connection_runtime/actions.rs` no longer depends on the connection runtime
+2
View File
@@ -515,6 +515,7 @@ declare -A SUPER_BASELINE=(
[crates/nyaterm-desktop/src/features/pages/tunnels/tunnel/row.rs]=0
[crates/nyaterm-desktop/src/features/pages/tunnels/tunnel/sections.rs]=0
[crates/nyaterm-desktop/src/features/pages/transfers/helpers/editor.rs]=0
[crates/nyaterm-desktop/src/features/pages/transfers/helpers/paths.rs]=0
[crates/nyaterm-desktop/src/features/shell/mod.rs]=0
[crates/nyaterm-desktop/src/features/shell/activity_bar_runtime.rs]=0
[crates/nyaterm-desktop/src/features/shell/appearance.rs]=0
@@ -557,6 +558,7 @@ done < <(rg -n --path-separator / '^[[:space:]]*use super::\*;' \
crates/nyaterm-desktop/src/features/pages/connections \
crates/nyaterm-desktop/src/features/pages/tunnels \
crates/nyaterm-desktop/src/features/pages/transfers/helpers/editor.rs \
crates/nyaterm-desktop/src/features/pages/transfers/helpers/paths.rs \
crates/nyaterm-desktop/src/features/shell/mod.rs \
crates/nyaterm-desktop/src/features/shell/activity_bar_runtime.rs \
crates/nyaterm-desktop/src/features/shell/appearance.rs \