### Install build dependencies and run installer on Omarchy Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/README.md Installs required build tools and desktop libraries on Omarchy, then runs the installer script. Requires Rust 1.90 or newer. The installer adds the EchoFiles app launcher and installs echofiles and ef in ~/.local/bin. ```bash omarchy pkg add rust pkgconf fontconfig libxkbcommon wayland libx11 libxcursor libxi libxrandr vulkan-icd-loader bash scripts/install.sh ``` -------------------------------- ### Install EchoFiles package with pacman Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/README.md Verifies the downloaded package checksum and installs the EchoFiles package on Arch Linux or Omarchy. Requires the .pkg.tar.zst package and SHA256SUMS from GitHub Releases. Run from ~/Downloads. ```bash cd ~/Downloads sha256sum --check --ignore-missing SHA256SUMS sudo pacman -U ./echofiles-*-x86_64.pkg.tar.zst ``` -------------------------------- ### Clone EchoFiles repository Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/README.md Clones the EchoFiles source repository and changes into the cloned directory. First step for building from a clone. ```bash git clone https://github.com/adityavardhansharma/EchoFiles_Linux.git cd EchoFiles_Linux ``` -------------------------------- ### Build and install EchoConnect debug APK Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/android/README.md Sets up Android and Java environment variables, adds Rust Android targets, installs cargo-ndk, then builds and installs the debug APK via Gradle and adb. Requires Java 21, Rust with aarch64-linux-android and x86_64-linux-android targets, cargo-ndk, Android SDK platform android-37.0, build tools 36, and NDK 30.0.16248370. The app runs on API 29+ with target SDK 36; Java 27 is not supported. ```sh export ANDROID_HOME="$HOME/Android/Sdk" export JAVA_HOME="/path/to/jdk-21" rustup target add aarch64-linux-android x86_64-linux-android cargo install cargo-ndk --locked cd android ./gradlew assembleDebug lintDebug "$ANDROID_HOME/platform-tools/adb" install -r app/build/outputs/apk/debug/app-debug.apk ``` -------------------------------- ### ef find and related command examples Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/crates/ui/src/skill/SKILL.md Common ef commands for searching files, including filters, globs, regex, JSON output, recent files, why, related, map, mark/changed, and phone photos. Use -n N or --budget TOKENS on broad searches; ef prints absolute paths for find and fd-style relative paths for fd. Read stderr when nothing matches for suggestions. ```sh ef find report -n 20 # words, any order, ignoring case/accents; best match first ``` ```sh ef find 'invoice ext:pdf modified:<30d in:~/Documents' -n 20 # search-box filters ``` ```sh ef find '*.rs' --project # glob, only in the current project (also --here) ``` ```sh ef find 'v[0-9]+' --regex PATH # regex; -F literal text; -p match the whole path ``` ```sh ef find config -H # include dotfiles; -I files hidden by .gitignore; -u both ``` ```sh ef find '*' --project -t f --budget 2000 # fits ~2000 tokens; the rest summarised by folder/type ``` ```sh ef find main.rs --json --details # JSON with size, date, line count, tags (binary, lockfile…) ``` ```sh ef fd … # exactly fd's options, defaults and output format ``` ```sh ef recent --within 1h # what the user just touched, newest first ``` ```sh ef why path/to/file # why a file does or doesn't show up ``` ```sh ef related src/parser.rs # its tests, header/source pair, styles, docs ``` ```sh ef map # project shape: biggest folders, counts, sizes ``` ```sh ef mark → ef changed --since ID # exactly what a build/script added, removed, modified ``` ```sh ef phone photos today # copy today's photos from the paired phone; prints local paths ``` ```sh ef phone photos 5 # the newest 5 (also: yesterday, week, 3d, 2026-10-20, A..B) ``` ```sh ef phone photos today --screenshots # only screenshots (--camera, --chats); --videos adds videos ``` ```sh ef phone photos week --list # see what's there first, copy nothing ``` -------------------------------- ### ef phone usage examples Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/crates/ui/src/skill/reference.md Shows common invocations of the `ef phone` command for fetching photos and videos from a paired phone. Requires Settings → AI agents → Let ef fetch phone photos (off by default; exit 3 when off) and Settings → Phone → Files. Copying needs the EchoFiles app running and the phone on the same Wi-Fi. ```sh ef phone photos today # today's photos (local midnight onwards) ef phone photos yesterday # yesterday only ef phone photos today yesterday # several words widen the window: today and yesterday ef phone photos week # the last 7 calendar days (month: 30) ef phone photos 3d # today and the 2 days before; 2w = 14 days; 6h = rolling 6 hours ef phone photos 5 # the newest 5 (same as -n 5); combine: `today 3` ef phone photos 2026-10-20 # one day; 2026-10-18..2026-10-20 a range (A.. / ..B open) ef phone photos --since 2026-10-01 --until 2026-10-10 # any ef time (2d, @unix, RFC 3339) ef phone photos # no WHEN: the newest 10 ef phone videos today # videos only; ef phone media today photos and videos ef phone photos all --list # everything, listed, nothing copied ``` -------------------------------- ### ef find and status commands Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/README.md Commands for searching filenames and directories using the ef CLI. Use --in to search a folder directly, --ext to filter by extension, --count to count results, and --limit to cap output. If commands are disabled, enable the CLI option in EchoFiles → Settings → AI agents. ```bash # Find names containing “report” in the configured search index ef find report --limit 20 # Count indexed PDF filenames ef find '*' --ext pdf --count # Search a folder directly, including one outside the index ef find invoice --in ~/Downloads # Check indexed roots and index status ef status ``` -------------------------------- ### Run Rust and Android checks Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/android/README.md Runs the shared-core library tests, the echofiles binary tests, and Android assemble/lint checks. Use before committing or in CI. ```sh cargo test -p echofiles-phone -p echoconnect-core -p echofiles-index --lib --tests -- --test-threads=1 cargo test -p echofiles --bin echofiles cd android && ./gradlew assembleDebug lintDebug ``` -------------------------------- ### Validation Commands Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/FIXES.md Commands to run the automated checks for the project. They cover Rust tests, Clippy lints, installer shell syntax, and Android debug Kotlin compilation. The Android command skips the native cross-build and does not install an APK. ```sh cargo test --workspace --locked cargo clippy --workspace --all-targets --locked bash -n scripts/install.sh cd android ./gradlew :app:compileDebugKotlin -x cargoNdk ``` -------------------------------- ### Regenerate design assets with tokens.py and glyphs.py Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/android/README.md Runs the Python scripts to regenerate checked-in design assets after editing the source design. Execute from the project root. ```sh python android/tools/tokens.py python android/tools/glyphs.py ``` -------------------------------- ### Run additional audit probe with run_probe.py Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/architecture-performance/README.md Executes the audit probe from the repository root. The runner builds the snapshot's core, index, and config libraries with --locked, uses Cargo's JSON artifact output to select those libraries, compiles probe.rs, and runs it in a temporary directory. Set ECHOFILES_REVIEW_TARGET to use a different Cargo output directory. All probe data writes are temporary; the probe does not start a phone service or access real documents. ```bash python3 reviews/2026-10-03/architecture-performance/run_probe.py ``` -------------------------------- ### Run Android smoke test fixture Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/android/README.md Runs the interactive integration fixture with disposable pairing credentials. For an API 35 emulator, forward link port 18716 to 1716, then enter 'connect' and 'pair' and accept the code in EchoConnect. The fixture prints the matching laptop code. ```sh cargo run -p echofiles-phone --example android_smoke ``` -------------------------------- ### Reproduce benchmark and index build Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/design/docs/speed-architecture-and-agent-index.md Builds the indexer, crawls the home directory, times a find query, and runs the EchoFiles vs Nautilus UI benchmark. Requires a release build and the bench/compare.py script. ```sh cargo build --release -p echofiles-index ``` ```sh target/release/ef index ~ # crawl + save (~/.cache/echofiles/home.efidx) ``` ```sh EF_TIMING=1 target/release/ef find pdf --ext > /dev/null ``` ```sh python3 bench/compare.py # EchoFiles vs Nautilus UI benchmark ``` -------------------------------- ### CLI reproduction commands for ef with private config Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/REPRODUCE.md Run the current debug ef binary with a private XDG_CONFIG_HOME and XDG_CACHE_HOME, using a disposable tree with two roots: a parent containing other.txt and its skip child containing report.txt, configured with exclude_names = ["skip"]. The recorded outputs were 0, 0 and 1 for the three searches; the wildcard should not give zero for a nonempty matching scope, and the scoped search should find the file in the separately indexed child. ```text ef index ``` ```text ef find '*' --count ``` ```text ef find report --in --count ``` ```text ef find report --count ``` -------------------------------- ### Run tests and benchmarks for echofiles-index Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/design/docs/search-index.md Run the test suite and benchmarks for the echofiles-index crate. Benchmarks generate corpora in ~/.cache/echofiles-bench/index/, and the Python script compares find/fd on the same corpora, producing two tables. ```sh cargo test -p echofiles-index # 22 tests ``` ```sh cargo bench -p echofiles-index # generates corpora in ~/.cache/echofiles-bench/index/ ``` ```sh python3 bench/index_compare.py # find / fd on the same corpora (two tables) ``` -------------------------------- ### Run Flea field benchmark script Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/bench/FLEA.md Executes the benchmark script from the repository root, requiring a built EchoFiles release binary and a built Flea checkout. The script builds Flea's three GUI fixture shapes on btrfs, checks fixture counts, reuses completed fixtures, and defaults to three fresh launches per app and fixture. It saves raw runs to bench/flea-field-results.csv and a capability check to bench/flea-capability-results.json, and refuses to run while either app has a window open. ```shell python3 bench/flea_field.py --flea /path/to/flea/target/release/flea ``` -------------------------------- ### Run the reusable probe runner Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/REPRODUCE.md Run the combined probe runner from a disposable checkout of commit 9cd5e07. Requires the repository's Rust toolchain/dependencies, python, mkfifo, extended-attribute support in the temporary filesystem, and /dev/shm on a different filesystem from /tmp. The runner assumes Cargo's normal target/debug/deps location and runs the original tests first so standalone probes can link to current libraries. ```bash python reviews/2026-10-03/run_probes.py ``` -------------------------------- ### Run benchmark comparison scripts Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/design/docs/performance-report.html Commands to run the benchmark comparison scripts and the Rust index benchmark. The first two invoke Python scripts (compare.py and index_compare.py) and the third runs the cargo bench for the echofiles-index package. These are the commands used to generate the measured snapshots from September 2026. ```bash python3 bench/compare.py 3 python3 bench/index_compare.py cargo bench -p echofiles-index ``` -------------------------------- ### Run index tests with cargo test -p echofiles-index Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/design/docs/search-index.md Run the index test suite. Expect 22 tests to pass (6 fold unit tests + 16 integration tests), taking about 45 seconds in a debug build. ```bash cargo test -p echofiles-index ``` -------------------------------- ### EchoFiles engine architecture diagram Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/design/docs/performance-default-and-ai.md ASCII diagram showing the resident EchoFiles engine with three front doors (UI, ef CLI, MCP server) and its capabilities. The engine communicates over a unix socket with ~1 ms per request using JSON lines. ```text ┌──────────────── EchoFiles engine (resident) ────────────────┐ EchoFiles UI ───► │ listing cache · search index (MFT + btrfs) · drive map │ `ef` CLI ───────► │ Windows path translation · junk filter · copy/move/trash │ MCP server ─────► │ with journal + undo · change notifications │ └──────────────────────────────────────────────────────────────┘ unix socket, ~1 ms per request, JSON lines ``` -------------------------------- ### Run EchoFiles listing benchmark on scale fixture Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/bench/FLEA.md Runs EchoFiles' Divan listing benchmark with the ECHOFILES_BENCH_100K environment variable to target the exact scale folder instead of the older mixed-file corpus. In this run, EchoFiles' median was 23.89 ms for names, 38.23 ms for names and all metadata, and 3.17 ms for name sorting. ```shell ECHOFILES_BENCH_100K=$HOME/.cache/echofiles-bench/flea-field/scale \ cargo bench -p echofiles-core --bench listing -- d100k --sample-count 10 ``` -------------------------------- ### Run existing workspace tests with cargo test Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/architecture-performance/README.md Run from the repository root to reproduce the recorded test run. Uses CARGO_TARGET_DIR to keep build artifacts in the current directory and --locked to enforce the locked dependency versions. The recorded run passed 69 tests; phone tests use disposable identities and localhost connections, but Android runtime and end-to-end device behavior are not covered. ```bash CARGO_TARGET_DIR="$PWD/target" cargo test \ --manifest-path reviews/2026-10-03/architecture-performance/snapshot/Cargo.toml \ --workspace --locked ``` -------------------------------- ### Collapsible if in gpu.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/clippy.txt Clippy suggests collapsing nested `if` statements into a single condition using `&& let`. ```rust if unset("VK_LOADER_DRIVERS_SELECT") && !wants_high { if let Some(glob) = display_gpu_driver_glob() { std::env::set_var("VK_LOADER_DRIVERS_SELECT", glob); } } ``` ```rust if unset("VK_LOADER_DRIVERS_SELECT") && !wants_high && let Some(glob) = display_gpu_driver_glob() { std::env::set_var("VK_LOADER_DRIVERS_SELECT", glob); } ``` -------------------------------- ### ef find with search-box filters Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/crates/index/src/cli/help.txt Combines words with search-box filters (ext, modified, in) in a single ef find command. Filters are mixed with the words and follow the same syntax as the EchoFiles search field. ```bash ef find 'invoice ext:pdf modified:<30d in:~/Documents' ``` -------------------------------- ### Switch component usage with defaultChecked Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/design/system/project/components/Switch/preview.html Renders three Switch components with labels. The first and third are checked by default via the defaultChecked prop, while the second is unchecked. Uses React.createElement and mounts to the root element. ```javascript (function(){ var E = window.Echo, h = React.createElement; function App(){ return h("div", {className:"ef ef-stack", style:{maxWidth:360}}, h(E.Switch, {id:"sw1", defaultChecked:true}, "Show hidden files"), h(E.Switch, {id:"sw2"}, "Show Windows system files"), h(E.Switch, {id:"sw3", defaultChecked:true}, "Mount C: read-only")); } ReactDOM.createRoot(document.getElementById("root")).render(h(App)); })(); ``` -------------------------------- ### Field reassignment with Default in search.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/clippy.txt Clippy warns about assigning fields after creating a struct with `Default::default()`. Initialize the struct with the field set directly. ```rust let mut cfg = ef_index::config::SearchConfig::default(); ``` ```rust cfg.exclude_paths = vec![format!("{}/Private/", root.display()), "/elsewhere/x".into()]; ``` -------------------------------- ### Manual is_multiple_of check in fmt.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/clippy.txt Clippy warns about a manual modulo check for multiples of three. Replace `(s.len() - i) % 3 == 0` with `(s.len() - i).is_multiple_of(3)`. ```rust if i > 0 && (s.len() - i) % 3 == 0 { ``` -------------------------------- ### Items after test module in service.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning `clippy::items_after_test_module` at crates/phone/src/service.rs:1387. Items defined after the `mod tests` block should be moved before it. The warning lists several items: `Permit`, `connect_bounded`, `Deadline`, and `Startup`. ```rust mod tests { ``` ```rust struct Permit(Arc); ``` ```rust impl Permit { ``` ```rust impl Drop for Permit { fn drop(&mut self) { self.0.fetch_sub(1, Ordering::AcqRel); } } ``` ```rust fn connect_bounded(inner: &Arc, to: SocketAddr) { ``` ```rust struct Deadline { inner: S, until: Option } ``` ```rust impl Deadline { ``` ```rust impl Read for Deadline { fn read(&mut self, b: &mut [u8]) -> io::Result { self.check()?; self.inner.read(b) } } ``` ```rust impl Write for Deadline { ``` ```rust impl Sock for Deadline { fn timeout(&self, d: Option) -> io::Result<()> { self.inner.timeout(d) } } ``` ```rust struct Startup { inner: Arc, complete: bool } ``` ```rust impl Drop for Startup { fn drop(&mut self) { if !self.complete { self.inner.stopped.store(true, Ordering::Release); } } } ``` -------------------------------- ### Collapse nested if in base64 decode block (phone.rs:364) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning at crates/ui/src/phone.rs:364:180. The nested `if let` for base64 decoding and size check can be collapsed into a single condition using `&&`. The suggested fix combines the inner `if !bytes.is_empty() && bytes.len() <= 16*1024*1024` into the `if let` pattern. ```rust if let Ok(mut child) = command.spawn() { if let Some(out) = child.stdout.take() { use base64::Engine; for line in std::io::BufReader::new(out).lines().map_while(Result::ok) { if let Ok(bytes) = base64::engine::general_purpose::STANDARD.decode(line.trim()) { if !bytes.is_empty() && bytes.len() <= 16*1024*1024 { let _ = event_tx().unbounded_send(PhoneMsg::LocalImage(bytes)); } } } } } ``` ```rust if let Ok(mut child) = command.spawn() { if let Some(out) = child.stdout.take() { use base64::Engine; for line in std::io::BufReader::new(out).lines().map_while(Result::ok) { if let Ok(bytes) = base64::engine::general_purpose::STANDARD.decode(line.trim()) && !bytes.is_empty() && bytes.len() <= 16*1024*1024 { let _ = event_tx().unbounded_send(PhoneMsg::LocalImage(bytes)); } } } } ``` -------------------------------- ### Items after test module in connect.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning for items defined after a test module. The warning suggests moving these items before the test module. ```rust #[cfg(test)] mod tests { ``` ```rust pub fn clipboard_qr() -> Result<(Vec, String, String), String> { ``` ```rust fn adb(args: &[&str], input: Option<&str>) -> Result { ``` ```rust pub fn grant_clipboard_qr(name: &str, secret: &str, phone_ip: std::net::IpAddr) -> Result { ``` ```rust pub fn set_dnd(enabled: bool) { ``` ```rust pub fn dnd_state() -> Option { ``` -------------------------------- ### Collapsible if in connect.rs (file hash) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning for nested if statements that can be collapsed using let chains. The suggested fix combines the conditions with `&& let`. ```rust if original != path { if let Ok(mut file) = std::fs::File::open(&original) { let mut hash = Sha256::new(); loop { let n = file.read(&mut buf)?; if n == 0 { break; } hash.update(&buf[..n]); } // ... } } ``` ```rust if original != path && let Ok(mut file) = std::fs::File::open(&original) { let mut hash = Sha256::new(); loop { let n = file.read(&mut buf)?; if n == 0 { break; } hash.update(&buf[..n]); } if format!("{:x}", hash.finalize()) == digest { std::fs::remove_file(path)?; return Ok(original); } } ``` -------------------------------- ### Clippy chunks_exact_to_as_chunks warning and suggested fix Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warns that using chunks_exact with a constant chunk size can be replaced with as_chunks. The suggested fix is to use as_chunks::<2>().0.iter(). The warning is enabled by default. ```rust s.as_bytes().chunks_exact(2).map(|pair| u8::from_str_radix(std::str::from_utf8(pair).ok()?, 16).ok()).collect() ``` ```rust as_chunks::<2>().0.iter() ``` -------------------------------- ### Field reassignment after Default::default() in search.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/clippy_baseline.txt Clippy warning clippy::field_reassign_with_default at crates/index/tests/search.rs:498:5. The variable `cfg` is created with `SearchConfig::default()` and then `exclude_paths` is assigned. Clippy suggests initializing with the struct literal including `..Default::default()`. The warning is on by default. ```rust let mut cfg = ef_index::config::SearchConfig::default(); ``` ```rust cfg.exclude_paths = vec![format!("{}/Private/", root.display()), "/elsewhere/x".into()]; ``` ```rust ef_index::ef_config::SearchConfig { exclude_paths: vec![format!("{}/Private/", root.display()), "/elsewhere/x".into()], ..Default::default() } ``` -------------------------------- ### Collapsible if in phone.rs (photo-copy) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning for a nested if that can be collapsed using let chains. The suggested fix combines the conditions with `&& let`. ```rust if kind == "photo-copy" { if let Some((remaining, paths)) = &mut self.phone.copy_photos { paths.push(path.clone()); *remaining = remaining.saturating_sub(1); if *remaining == 0 { self.clip = Some(crate::actions::Clip { paths: paths.clone(), cut: false }); self.phone.copy_photos = None; } } } ``` ```rust if kind == "photo-copy" && let Some((remaining, paths)) = &mut self.phone.copy_photos { paths.push(path.clone()); *remaining = remaining.saturating_sub(1); if *remaining == 0 { self.clip = Some(crate::actions::Clip { paths: paths.clone(), cut: false }); self.phone.copy_photos = None; } } ``` -------------------------------- ### chunks_exact with constant size in identity.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning `clippy::chunks_exact_to_as_chunks` at crates/phone/src/identity.rs:42. Using `chunks_exact(2)` with a constant chunk size can be replaced with `as_chunks::<2>().0.iter()`. ```rust s.as_bytes().chunks_exact(2).map(|pair| u8::from_str_radix(std::str::from_utf8(pair).ok()?, 16).ok()).collect() ``` -------------------------------- ### Collapse nested if in photo_more request (phone.rs:1381) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning at crates/ui/src/phone.rs:1381:17. The nested `if` for photo_more can be collapsed using `&& let` in the condition. The suggested fix combines the two conditions into one `if` statement. ```rust if self.phone.photo_more { if let (Some(s), Some(id), Some((before, before_id))) = (service(), self.phone_id(), self.phone.photo_before) { s.send_packet(&id, "echofiles.photos.request", ef_phone::json!({"before":before,"beforeId":before_id})); } } ``` ```rust if self.phone.photo_more && let (Some(s), Some(id), Some((before, before_id))) = (service(), self.phone_id(), self.phone.photo_before) { s.send_packet(&id, "echofiles.photos.request", ef_phone::json!({"before":before,"beforeId":before_id})); } ``` -------------------------------- ### Collapsible if in connect.rs (stdin write) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning for a nested if that can be collapsed using let chains. The suggested fix combines the conditions with `&& let`. ```rust if let Some(text) = input { if let Some(mut stdin) = child.stdin.take() { writeln!(stdin, "{text}").map_err(|e| e.to_string())?; } } ``` ```rust if let Some(text) = input && let Some(mut stdin) = child.stdin.take() { writeln!(stdin, "{text}").map_err(|e| e.to_string())?; } ``` -------------------------------- ### Collapsible if in connect.rs (read marker) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning for nested if statements that can be collapsed using let chains. The suggested fix combines the conditions with `&&`. ```rust if let Ok(name) = std::fs::read_to_string(&marker) { if Path::new(&name).file_name().is_some_and(|n| n == name.as_str()) { let original = dir.join(&name); if original != path { // ... } } } ``` ```rust if let Ok(name) = std::fs::read_to_string(&marker) && Path::new(&name).file_name().is_some_and(|n| n == name.as_str()) { let original = dir.join(&name); // ... } ``` -------------------------------- ### Collapse nested if in phone.rs:1771 (OTP clipboard copy) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning collapsible_if at crates/ui/src/phone.rs:1771. The suggested fix combines the outer `if` and inner `if let` into a single condition using `&&`. The code checks the OTP setting, extracts a code from a notification, copies it to the clipboard, and shows a toast. ```rust if self.settings.phone.otp { if let Some(code) = crate::connect::otp(&format!("{} {}", n.title, n.text)) { std::thread::spawn(move || set_clipboard(&code)); self.push_toast(Tone::Accent, "One-time code copied".into(), None, None); } } ``` ```rust if self.settings.phone.otp && let Some(code) = crate::connect::otp(&format!("{} {}", n.title, n.text)) { std::thread::spawn(move || set_clipboard(&code)); self.push_toast(Tone::Accent, "One-time code copied".into(), None, None); } ``` -------------------------------- ### Too many arguments in transfer_entry Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning `clippy::too_many_arguments` at crates/core/src/ops.rs:468. The function `transfer_entry` has 9 arguments, exceeding the default limit of 7. ```rust fn transfer_entry(kind: Kind, src: &Path, dst: &Path, choice: Resolution, fixes: &HashMap<&Path, &str>, progress: &Progress, out: &mut Outcome, links: &mut HashMap<(u64, u64), PathBuf>, recovery_parent: &Path) -> io::Result<()> { ``` -------------------------------- ### Clippy type_complexity warning for read_volumes return type in crates/ui/src/drives.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warns about the complex return type `Result<(Vec, Vec>, Option), String>` for the `read_volumes` function at line 447. The suggestion is to factor parts into `type` definitions. This is a warning, not an error. ```rust pub(crate) fn read_volumes() -> Result<(Vec, Vec>, Option), String> { ``` -------------------------------- ### Collapse nested if in echoconnect check (phone.rs:853) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning at crates/ui/src/phone.rs:853:9. The nested `if` for device echoconnect check can be collapsed using `&&` in the `if let` condition. The suggested fix combines the two conditions into one `if let ... && ...`. ```rust if let (Some(s), Some(id)) = (service(), self.phone_id()) { if self.phone.devices.get(&id).is_some_and(|d| d.echoconnect()) { self.phone.photos_loading = true; s.send_packet(&id, "echofiles.photos.request", ef_phone::json!({})); return Task::none(); } } ``` ```rust if let (Some(s), Some(id)) = (service(), self.phone_id()) && self.phone.devices.get(&id).is_some_and(|d| d.echoconnect()) { self.phone.photos_loading = true; s.send_packet(&id, "echofiles.photos.request", ef_phone::json!({})); return Task::none(); } ``` -------------------------------- ### Clippy Suggestion: Box Large Enum Variant Field Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/clippy.txt Clippy warns that the `Entry` enum in `crates/ui/src/overlay.rs` has a large size difference between variants, with the largest variant `Item(MenuItem)` being at least 528 bytes. The suggestion is to box the large field to reduce the enum's total size. The diff shows replacing `Item(MenuItem)` with `Item(Box)`. ```diff 51 - Item(MenuItem), 51 + Item(Box), ``` -------------------------------- ### Collapse nested if in phone.rs:1912 (decode remote image) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning collapsible_if at crates/ui/src/phone.rs:1912. The suggested fix combines the size check and base64 decode into one condition using `&&`. The code decodes data up to 65536 bytes, converts to a normal image, and sends a PhoneMsg::RemoteImage event. ```rust if data.len() <= 65536 { if let Ok(bytes) = base64::engine::general_purpose::STANDARD.decode(data) { std::thread::spawn(move || { if let Some(png) = normal_image(&bytes) { let _ = event_tx().unbounded_send(PhoneMsg::RemoteImage(png)); } }); } } ``` ```rust if data.len() <= 65536 && let Ok(bytes) = base64::engine::general_purpose::STANDARD.decode(data) { std::thread::spawn(move || { if let Some(png) = normal_image(&bytes) { let _ = event_tx().unbounded_send(PhoneMsg::RemoteImage(png)); } }); } ``` -------------------------------- ### Collapse nested if in dnd_sync send (phone.rs:1079) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning at crates/ui/src/phone.rs:1079:21. The nested `if` for dnd_sync can be collapsed using `&& let` in the condition. The suggested fix combines the two conditions into one `if` statement. ```rust if self.settings.phone.dnd_sync { if let (Some(s), Some(id)) = (service(), self.phone_id()) { s.send_packet(&id, "echofiles.dnd", ef_phone::json!({"enabled":enabled})); } } ``` ```rust if self.settings.phone.dnd_sync && let (Some(s), Some(id)) = (service(), self.phone_id()) { s.send_packet(&id, "echofiles.dnd", ef_phone::json!({"enabled":enabled})); } ``` -------------------------------- ### Clippy cloned_ref_to_slice_refs warning and suggested fix Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warns that cloning a reference to create a slice is unnecessary. The suggested fix is to use std::slice::from_ref instead. The warning is enabled by default. ```rust assert!(ops::plan(Kind::Copy, &[src.clone()], &inner_alias, &Progress::default()).is_err()); ``` ```rust std::slice::from_ref(&src) ``` -------------------------------- ### Clippy type_complexity warning for Volumes variant in crates/ui/src/drives.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warns about the complex type `Result<(Vec, Vec>, Option), String>` used for the `Volumes` variant at line 36. The suggestion is to factor parts into `type` definitions. This is a warning, not an error. ```rust Volumes(Result<(Vec, Vec>, Option), String>), ``` -------------------------------- ### Collapse nested if in phone.rs:1719 (remove state and unmount) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning collapsible_if at crates/ui/src/phone.rs:1719. The suggested fix replaces the nested `if let` with a single `if let ... && let ...` condition. The original code removes a phone state and spawns a thread to unmount a GVFS mount. ```rust if let Some(state) = self.phone.states.remove(&id) { if let Some((m, _)) = state.mount { std::thread::spawn(move || { let _ = gvfs::unmount(&m, true); }); } } ``` ```rust if let Some(state) = self.phone.states.remove(&id) && let Some((m, _)) = state.mount { std::thread::spawn(move || { let _ = gvfs::unmount(&m, true); }); } ``` -------------------------------- ### Inline JavaScript for search chart rendering Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/design/docs/performance-report.html Inline script embedded in the HTML page that defines measurement data for flat and tree corpora, and renders a bar chart comparing indexed, live, fd, and find search times. It updates the chart and summary text when the corpus or query selection changes. The script is part of the performance report page and uses the measurements object to display results. ```javascript const measurements={flat:{report:[1.49,35.8,95.4,152.5],none:[.04,30.4,92,123.8],many:[3.16,44.7,86.8,155.9]},tree:{report:[1.34,15.1,53.3,88.7],none:[.04,9.3,36,73.5],many:[3.02,22.9,57.3,99.6]}};function render(){const v=measurements[document.getElementById('corpus').value][document.getElementById('query').value];const labels=['Indexed · in app','Live · in app','fd · process','find · process'];const colors=['#a4ed99','#c8a2ff','#81b9ff','#ffc78b'];const max=Math.max(...v);document.getElementById('searchChart').innerHTML='

Time to search 100,000 files

Milliseconds · linear scale · lower is better

'+v.map((n,i)=>'
'+labels[i]+'
'+n+' ms
').join('');document.getElementById('searchSummary').textContent='In this case: indexed search is '+(v[2]/v[0]).toFixed(1)+'× faster than fd; live search is '+(v[2]/v[1]).toFixed(1)+'× faster. Indexed time excludes building the index.';}document.getElementById('corpus').addEventListener('change',render);document.getElementById('query').addEventListener('change',render);render(); ``` -------------------------------- ### Items after test module in system.rs:309 Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning about items defined after a test module. The warning suggests moving the items before the test module. ```rust mod review_tests { ``` ```rust fn private_runtime(socket: &Path) -> bool { ``` ```rust pub fn remove_own_socket() { ``` -------------------------------- ### Large enum variant in network.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/clippy.txt Clippy warns about a large enum variant. Consider boxing the large field to reduce the enum's total size. ```rust pub enum NetMsg { Mounts(Result, String>), Protocols(Result, String>), /// Some app connected or disconnected a place. Connected { op: u64, address: Address, save: bool, result: Result }, Shares { op: u64, address: Address, result: Result, ef_net::Error> }, Answer(usize), } ``` ```rust Connected { op: u64, address: Address, save: bool, result: Box> }, ``` -------------------------------- ### Collapsible if in system.rs:325 Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning about a nested if that can be collapsed. The suggested fix uses a let chain with &&. ```rust if let Some((path, dev, ino)) = OWN_SOCKET.get() { if std::fs::symlink_metadata(path).is_ok_and(|m| m.dev() == *dev && m.ino() == *ino) { let _ = std::fs::remove_file(path); } } ``` ```rust if let Some((path, dev, ino)) = OWN_SOCKET.get() && std::fs::symlink_metadata(path).is_ok_and(|m| m.dev() == *dev && m.ino() == *ino) { let _ = std::fs::remove_file(path); } ``` -------------------------------- ### Collapsible if in system.rs:285 Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning about a nested if that can be collapsed. The suggested fix uses a let chain with &&. ```rust if bytes[i] == b'%' && i + 2 < bytes.len() { if let Some(n) = std::str::from_utf8(&bytes[i+1..i+3]).ok().and_then(|s| u8::from_str_radix(s, 16).ok()) { out.push(n); i += 3; continue; } } ``` ```rust if bytes[i] == b'%' && i + 2 < bytes.len() && let Some(n) = std::str::from_utf8(&bytes[i+1..i+3]).ok().and_then(|s| u8::from_str_radix(s, 16).ok()) { out.push(n); i += 3; continue; } ``` -------------------------------- ### Collapsible if in ops.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning `clippy::collapsible_if` at crates/core/src/ops.rs:548. The nested `if` can be collapsed into a single condition using `&& let`. The suggested fix is shown. ```rust if replaced { if let Err(restore) = rename_noreplace(&backup, &dst) { let recovery = stage.keep(); return Err(io::Error::other(format!("{e}; original retained in {} ({restore})", recovery.display()))); } } ``` ```rust if replaced && let Err(restore) = rename_noreplace(&backup, &dst) { let recovery = stage.keep(); return Err(io::Error::other(format!("{e}; original retained in {} ({restore})", recovery.display()))); } ``` -------------------------------- ### Collapse nested if in phone.rs:1791 (OTP from message body) Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warning collapsible_if at crates/ui/src/phone.rs:1791. The suggested fix merges the inner `if let` into the existing `if` condition using `&&`. The code iterates over messages, checks for unread/outgoing and recency, extracts an OTP from the body, copies it, and shows a toast. ```rust if self.settings.phone.otp { for message in &messages { if !message.read && !message.outgoing && now_s()*1000 - message.date < 120000 { if let Some(code) = crate::connect::otp(&message.body) { std::thread::spawn(move || set_clipboard(&code)); self.push_toast(Tone::Accent, "One-time code copied".into(), None, None); break; } } } } ``` ```rust if self.settings.phone.otp { for message in &messages { if !message.read && !message.outgoing && now_s()*1000 - message.date < 120000 && let Some(code) = crate::connect::otp(&message.body) { std::thread::spawn(move || set_clipboard(&code)); self.push_toast(Tone::Accent, "One-time code copied".into(), None, None); break; } } } ``` -------------------------------- ### Clippy field_reassign_with_default warning and suggested fix Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warns that a field is assigned after creating a struct with Default::default(). The suggested fix is to initialize the struct with the field value directly using struct update syntax. The warning is enabled by default. ```rust cfg.exclude_paths = vec![format!("{}/Private/", root.display()), "/elsewhere/x".into()]; ``` ```rust let mut cfg = ef_index::config::SearchConfig::default(); ``` ```rust ef_index::ef_config::SearchConfig { exclude_paths: vec![format!("{}/Private/", root.display()), "/elsewhere/x".into()], ..Default::default() } ``` -------------------------------- ### Clippy type_complexity warning for progress field in crates/connect/src/lib.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warns about the complex type `Arc)>>>` used for the `progress` field at line 39. The warning suggests factoring parts into `type` definitions. This is a warning, not an error, and is enabled by default. ```rust progress: Arc)>>>, ``` -------------------------------- ### Clippy type_complexity warning for progress variable in crates/connect/src/lib.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warns about the same complex type used for a local variable `progress` at line 96. The suggestion is to factor parts into `type` definitions. This is a warning, not an error. ```rust let progress: Arc)>>> = Arc::new(Mutex::new(HashMap::new())); ``` -------------------------------- ### Large enum variant in network.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/clippy_baseline.txt Clippy warning clippy::large_enum_variant at crates/ui/src/network.rs:80:1. The `NetMsg` enum has a large variant `Connected` containing at least 409 bytes. Clippy suggests boxing the `Result` field to reduce the enum size. The warning is on by default. ```rust pub enum NetMsg { Mounts(Result, String>), Protocols(Result, String>), /// Some app connected or disconnected a place. ... Connected { op: u64, address: Address, save: bool, result: Result }, Shares { op: u64, address: Address, result: Result, ef_net::Error> }, ... Answer(usize), } ``` ```rust Connected { op: u64, address: Address, save: bool, result: Box> }, ``` -------------------------------- ### Clippy collapsible_if warning and suggested fix in crates/ui/src/app.rs Source: https://github.com/adityavardhansharma/echofiles_linux/blob/main/reviews/2026-10-03/repair-clippy.txt Clippy warns that an `if` statement can be collapsed at line 1126. The help shows the original nested `if` and the suggested collapsed version using `&& let`. The warning is enabled by default. ```rust for r in &mut roots { if r.map.is_none() { if let Some(old) = self.roots.iter().find(|old| old.root == r.root) { r.map = old.map.clone(); r.updated = old.updated; } } } ``` ```rust for r in &mut roots { if r.map.is_none() && let Some(old) = self.roots.iter().find(|old| old.root == r.root) { r.map = old.map.clone(); r.updated = old.updated; } } ```