Skip to content

refactor(neotree): reuse native husk standard library#152

Merged
fcoury merged 1 commit into
masterfrom
fcoury/neotree-native-core
Jul 25, 2026
Merged

refactor(neotree): reuse native husk standard library#152
fcoury merged 1 commit into
masterfrom
fcoury/neotree-native-core

Conversation

@fcoury-oai

Copy link
Copy Markdown
Collaborator

Why

Neo-tree still performs path normalization, Git-status decoration, and tree-row construction through compatibility helpers even though Husk now has a native standard library. Moving the pure presentation work into a native package makes it typed and directly testable while keeping permissioned filesystem actions and confirmations in the existing shell.

What Changed

  • add the embedded, multi-file plugins/neotree_core package for normalized paths, typed status presentation, selection and clipboard markers, icons, and bounded tree rendering
  • convert the host status index into sorted typed entries once at the bridge and use bounded lookup during rendering
  • simplify plugins/neotree.hk while preserving workspace confinement, destructive-action confirmations, directory truncation, and the 200-row instruction-budget guard
  • add native-core and embedded-bridge coverage, wire the Neo-tree suites into plugin CI, and document the new package

How to Test

Run the focused native and runtime regressions:

cargo run --all-features --locked -p husk-cli -- test --locked plugins/neotree_core
cargo test --all-features --locked -p red --lib plugin::runtime::tests::neotree_
cargo test --all-features --locked -p red --lib plugin::runtime::tests::embedded_neotree_core_

All tests should pass, including filesystem-root repositories, create/delete flows, large Git-status listings, and pathological directory listings capped at 200 rows.

Verify the bundled runtime and lint gate:

cargo fmt --all -- --check
cargo clippy --all-targets --all-features --locked -- -D warnings
cargo run --all-features --locked -- --self-check

The self-check should report plugin neotree: active and finish successfully.

@fcoury
fcoury merged commit 73db294 into master Jul 25, 2026
18 checks passed
@fcoury
fcoury deleted the fcoury/neotree-native-core branch July 25, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants