Repository navigation
Brainstorm new features for the project - #4
Merged
dariuszparys merged 5 commits intoNov 17, 2025
Merged
Conversation
Add directory size display to the interactive fuzzy finder, showing sizes alongside time and score metadata. This helps users quickly identify large directories taking up disk space. Changes: - Add `size: u64` field to TryDir model - Implement `calculate_dir_size()` in util.rs for recursive size calculation - Move `format_human_size()` to util.rs for reusability - Update TUI render to display size as "245.5M, 3d ago, 12.5" - Calculate sizes during directory loading in selector Example display: "2025-11-08-experiment 1.2G, 5d ago, 15.3"
Display only size and time metadata in the selector UI. The score is an internal ranking metric and doesn't provide useful information to users. Display format is now: "1.2G, 5d ago" instead of "1.2G, 5d ago, 15.3"
This change modifies the init script to correctly utilize cmd_status for capturing command execution status, addressing issues with the read-only status variable in zsh. A regression test has been added to ensure the correct usage of cmd_status in future updates.
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
This commit modifies the TryDir model to change the size field from u64 to Option<u64>, allowing for lazy size calculation. The TrySelector now caches sizes in a HashMap and calculates them only for visible items during rendering, improving performance. The TUI rendering logic has been updated to handle the new size representation, ensuring a seamless user experience.
This commit removes unnecessary whitespace in the main.rs and selector.rs files, enhancing code readability. Additionally, it refines the TUI rendering logic in tui.rs to improve clarity and maintainability, ensuring consistent formatting for size representation.
dariuszparys
deleted the
claude/brainstorm-feature-ideas-011CUze5rarfTrihbHUfKp5e
branch
November 17, 2025 06:09
There was a problem hiding this comment.
Bug: Ghost Directory Sizes Haunt New Paths
When a directory is deleted, all_tries is reset to None to force a reload, but size_cache is not cleared. This causes stale cached sizes to persist for deleted directory paths. If a new directory is later created at the same path, it will incorrectly display the old cached size until the cache entry is manually recalculated.
src/selector.rs#L213-L214
Lines 213 to 214 in 51e12b2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds directory size display to the interactive fuzzy finder, showing human-readable sizes (e.g., "1.2G", "45.5M") alongside the modification time for each directory. This helps users quickly identify large directories taking up disk space without needing to run separate
ducommands.The score metric has been removed from the display as it's an internal ranking value that doesn't provide actionable information to users. It's still used internally for sorting results.
User Impact: The selector now displays
1.2G, 5d agoinstead of5d ago(previously) or1.2G, 5d ago, 15.3(briefly).Changes
size: u64field toTryDirmodel to store directory sizescalculate_dir_size()inutil.rsfor recursive directory size calculationformat_human_size()fromselector.rstoutil.rsfor reusability across delete confirmation and displaysize, timeformat in selector (e.g., "1.2G, 5d ago")load_all()Screenshots / TUI Capture (optional)
Include images/GIF or terminal recordings for UI changes.
How to Test
Provide exact commands and expected results, for example:
Checklist
cargo test --all --lockedpasses locallycargo clippy --all-targets -- -D warningsis cleancargo fmt --allproduces no diffBreaking Changes
None
Note
Displays human-readable directory sizes in the selector with lazy cached computation, and hardens the shell init wrapper to use cmd_status and temp-file output capture (with tests).
size, time(remove score from display) intui::render.TryDir.size: Option<u64>and lazy size computation for visible items with asize_cacheinselector.calculate_dir_size()andformat_human_size(); reuse in delete confirmation and UI.$statusintocmd_statusbefore eval.cmd_status=$?; eval only if non-empty and success.cmd_status(notstatus) and references it correctly.Written by Cursor Bugbot for commit 51e12b2. This will update automatically on new commits. Configure here.