v0.3.3: highlight folders by name (weak yellow)#56
Merged
Conversation
Extends the cross-panel match-highlight from v0.3.2 to dir entries: a folder whose name appears in the OTHER panel's current view is tinted weak yellow. Why name-only (and not name + recursive size + mtime): - dir mtime is non-recursive — it changes only when entries are added / removed in that exact directory, NOT when a file inside it is edited. Two out-of-sync folders can share an mtime; two in-sync folders can have different mtimes after a touch. Useless as a sync signal. - recursive size requires an fs walk per dir, which we already have via POST /api/browse/stats but auto-firing it for every visible folder thrashes HDD seeks. Out of scope for the cheap auto-highlight path. Implementation: replaced the file-only fileMatch index with a typed pair (files + dirs) sharing one rebuild pass. matchClass now branches on entry type — files keep the green/yellow rule from v0.3.2, dirs return yellow on name match, null otherwise. CSS unchanged: reuses .match-mtime-diff. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Extends the v0.3.2 cross-panel match highlight to directories: a folder whose name appears in the OTHER panel's current view is tinted weak yellow. Files keep the v0.3.2 rules (green for name+size+mtime, yellow for name+size only).
Why name-only for dirs
mtimeof a directory is non-recursive — it changes only when entries are added / removed in that exact directory, NOT when a file inside is edited. Two out-of-sync folders can share the same mtime; two in-sync folders can have different mtimes after atouch. Useless as a sync signal./api/browse/stats); auto-firing it for every visible folder thrashes HDD seeks. Out of scope for the cheap auto-highlight.So name-match is the strongest cheap signal we can offer for dirs. User opens both folders if they want to compare contents.
Implementation
fileMatchindex with a typed pair{files, dirs}sharing one rebuild pass per panelmatchClass(side, e)branches on entry type — files keep v0.3.2 rules, dirs return yellow on name match.match-mtime-diffSingle-file change, JS only.
Test plan
🤖 Generated with Claude Code