file manager
git clone https://git.lucas.co/cce-files.git
docs: nine test modules; install delegates to ccebuild; fonts are not hardcoded
Three corrections, the last of which cost real time before.
Tests are not confined to "fs and browse": nine modules carry them (browse.rs
has 20, then space.rs, trash.rs, scan.rs, main.rs, row_list.rs, network.rs,
util.rs, fs.rs).
`make install` runs `ccebuild install --no-build cce-files`, not a copy into
~/.local/bin.
The font path is NOT hardcoded. `cce_ui::fonts_dir()` reads `$CCE_FONTS_DIR`
and only falls back to `$HOME/Dropbox/Fonts` — its own comment says the point
was to drop a hardcoded username, which this file then reintroduced as
`/home/lsgalante/Dropbox/Fonts`. The override is the part worth knowing: a
shadow session's HOME cannot see the real ~/Dropbox/Fonts, so without
CCE_FONTS_DIR its screenshots silently render in a fallback sans — a doc that
says "hardcoded" tells you no override exists, which is how that gets
diagnosed as a rendering bug instead of a missing variable.
Co-Authored-By: Claude Opus 5 <[email protected]>
CLAUDE.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 3023fe1..a4f3b62 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -10,9 +10,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
```sh
make build # cargo build --release
-make install # build + install binary to ~/.local/bin/cce-files
+make install # release build, then `ccebuild install --no-build cce-files`
make run # cargo run (needs a live Wayland compositor)
-cargo test # run unit tests (fs and browse modules have them)
+cargo test # run unit tests (nine modules have them; browse.rs has the most)
cargo test test_is_project_dir_detection # run a single test by name
```
@@ -67,4 +67,4 @@ Two things to know when touching it:
- **Chooser modes**: launched with `--select`, `--select-dir`, or `--save`, the app becomes a file picker for other CCE apps — it shows a bottom action bar, prints the chosen path to stdout, and `std::process::exit(0)` on selection (or exit code 1 on cancel). This is why `SelectOpen`/`SelectCancel` call `process::exit` directly.
- **Persistence**: the last-visited directory is saved to `~/.config/cce/cce-files/cce-files-last-dir.txt` and restored on launch.
- **Double-click**: opening is temporal — `last_click_time` / `last_clicked_idx` in `update()` detect a double-click within 500ms rather than relying on a windowing double-click event.
-- **Fonts**: `cce_ui::create_font_system()` loads fonts from `/home/lsgalante/Dropbox/Fonts` (hardcoded in cce-ui). Set `CCE_LOAD_SYSTEM_FONTS` to also load system fonts.
+- **Fonts**: `cce_ui::create_font_system()` loads bundled fonts from `cce_ui::fonts_dir()` — `$CCE_FONTS_DIR`, else `$HOME/Dropbox/Fonts`. It is resolved, not hardcoded, and the override is what a shadow session needs: a shadow HOME cannot see the real `~/Dropbox/Fonts`, so without `CCE_FONTS_DIR` its screenshots render in a fallback sans. Set `CCE_LOAD_SYSTEM_FONTS` to also load system fonts.