- Application entrypoint lives in
src/main.rs; shared types sit insrc/lib.rsand helpers such aslogger.rsandterminal_ui.rs. - Feature logic is isolated in
src/features/, with one module per capability (e.g.,find_feature.rs,open_feature.rs). Keep new features under this directory and register them viasrc/features/mod.rs. - Runtime resources are tracked at the repository root (
favorites.txt,err.txt,log.txt). Avoid committing local cache files undertarget/.
cargo runlaunches the TUI file manager from the repository root.cargo checkperforms a fast type and borrow check; run it after every change to catch regressions early.cargo fmtapplies Rustfmt conventions before submitting patches; pair withcargo fmt -- --checkin CI or pre-commit hooks.cargo clippy --all-targets --all-featuressurfaces lints that complementcargo check.
- Follow the default Rust 2024 edition style: 4-space indentation, snake_case for modules/files, PascalCase for types, and camelCase for local bindings.
- Keep feature modules cohesive: expose a single public
run()-style entry point and prefer small helper functions within the same file. - Use the
tracing-style logging helpers inlogger.rsconsistently when adding diagnostics.
- Add unit tests within the relevant module using
#[cfg(test)]submodules; name test functionstest_<behavior>(). - For broader workflows, create integration tests under
tests/and run them withcargo test. - Document manual verification steps for TUI interactions in
FLOW.mdupdates when automated coverage is not feasible.
- Write commit messages with an imperative, English summary in ~50 characters (e.g.,
Add ripgrep preview pane). - Reference related issues or RFCs in the body when context is needed; include short bullet points for notable side effects.
- PRs should describe the UI impact (screenshots or GIFs if visuals change), list manual test steps, and mention external tool requirements (
fd,ripgrep,code).
- Ensure
fd,ripgrep, and the VS Code CLI (code) are available in$PATH; they enable bundled features. - Favor cross-platform paths (
PathBuf) and guard OS-specific logic withcfgattributes to keep macOS/Linux behavior aligned.