Repository navigation
feat(search): file-attribute columns and filters — Size / Modified / Created columns and size: / modified: / created: operators - #235
Merged
Conversation
This was referenced Nov 25, 2026
Open
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.
Closes #227
What does this PR do?
Implements file-attribute columns and field operators so "the dumps over 100 MB from this week" becomes a typeable query:
statinstead of filename regex:size(human-readable, binary 1024, e.g.12.4 MB),size_bytes(raw),modified/created(strftime via the column'stransform, default%Y-%m-%d %H:%M:%S), plus string-derivedpath(containing directory,.at root).-/+:size:>10mb,size:1kb..1mb,size:1048576,modified:>2026-11-01,modified:<7d(recent),modified:>30d(older),modified:today,created:mirrorsmodified:on birthtime. Durations use the GNU-find age reading (<7d= within the last 7 days;>7d= older) per discussion on the issue. Quoted phrases stay literal; unparseable values (size:abc) fall back to plain substring — filenames containingsize:are unaffected.collect_file_attrs, the only added stat path) and pass the A/B perf gate below.900 KBbefore10 MB); rows lacking attrs sort last in both directions.searchOperators.fixture.json, 70 cases) consumed by BOTH pytest and vitest so the Python and TypeScript grammars cannot drift; parity verified under two timezones.created:rows, and 7 command-palette presets (larger than 100 MB / smaller than 1 MB / modified today / last 7 days / more than 30 days ago / created today / created last week) that append to the current filter as implicit AND.createdcaveat, stat-cost notes.Type of change
Performance gate (issue's hard requirement)
A/B on this repository (ext=All, filter="", recursive, 3 runs per side, same interpreter, baseline from a worktree of the merge base 74be00c):
Opt-in costs measured (documented, not gated): operator query +52.7% duration (sequential collection-loop stat — inherent to filtering by size/mtime); template-default columns 17,432 files/s (worker-pool stat).
Testing
tsc --noEmitclean; fixture parity suite + tooltip/placeholder + palette preset tests.Design decisions worth review
modified:<7d= recent,>7d= older (GNU-find), per issue discussion — the issue body's parenthetical said the opposite; a follow-up comment on feat(search): file-attribute columns and filters — built-in Size / Modified columns and size: / modified: operators #227 will correct the spec text.pathkeyword = containing directory ("."at root), not the display path verbatim — the starter template's existingPathcolumn already means parent directory and theFilecolumn already shows the full path; the template's Path column now uses the keyword.createdon Linux falls back to inode-change time (st_ctime) — documented in code, tooltip, and docs.today= local day of evaluation; clocks are read at match time (injectablenowparameter — the shared fixture pinsnowper case, no wall-clock dependence in tests).attrs == nullkeeps operator-shaped tokens as plain substrings (2-arg parity withmatch_filter).Post-merge follow-ups (from final review, non-blocking)
Object.hasOwnfor the TSATTR_FIELDlookup (adversarialconstructor:-shaped queries).\p{Nd}+uin TS orre.ASCIIin Python) — pins a normative grammar choice.size_bytes:fixture case + OR-of-two-operators case.pathsemantics) + tests-tree sync commit + one stale AGENTS.md line.🤖 Generated with ZCode