Skip to content

Merge Forked improvements back in - #1

Open
RobertLD wants to merge 7 commits into
RobertLD:mainfrom
JonatanTorino:main
Open

Merge Forked improvements back in#1
RobertLD wants to merge 7 commits into
RobertLD:mainfrom
JonatanTorino:main

Conversation

@RobertLD

Copy link
Copy Markdown
Owner

No description provided.

JonatanTorino and others added 7 commits August 17, 2026 21:13
Reloading the window kept the files.exclude filter active but the
status bar indicator stayed hidden, leaving the user with no visible
way to clear it. The active query is now saved in workspaceState and
restored on activation.
Save the current query as a named preset from the star button on the
filter prompt's query row, apply it later like a history entry, and
delete it from a trash button on its row. Presets are listed above
recent queries when the prompt opens with an empty input, persisted
per workspace the same way query history is.
…y rows

The preset save prompt now pre-fills with the typed filter query instead
of the workspace folder name, and history rows gain star/trash buttons
to save an entry as a preset or remove it directly.
@RobertLD

Copy link
Copy Markdown
Owner Author

@JonatanTorino hope you don't mind if I merge your improvements back into the repository? I'm just happy someone is using my tiny extension lol

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The QuickPick controller currently has a confirmed UX/logic gap (saved preset from history not refreshing the empty-query list) and lacks defensive error handling for thrown searches and rejected async callbacks.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR brings forked UX and reliability improvements into the extension’s filtering flow by replacing the input-box prompt with a QuickPick-based picker that can preview matches, manage recent queries, and support named presets, while also bounding preview searches for responsiveness.

Changes:

  • Add a QuickPick-based filter prompt with live preview, recent-query history, and preset save/delete actions.
  • Introduce bounded directory searching (findMatchingDirsLimited) for previews (match cap + visited-directory budget + cooperative cancellation).
  • Persist/restore the active query for status bar restoration across window reloads; update docs/changelog and bump version to 0.3.0.
File summaries
File Description
test/queryHistory.test.ts Adds unit tests for query-history normalization/add/remove behavior.
test/presets.test.ts Adds unit tests for preset normalization/save/remove behavior.
test/filterPicker.test.ts Adds unit tests for QuickPick item building and picker interaction flow.
test/filter.test.ts Adds coverage for the new bounded directory search API and behavior.
src/queryHistory.ts Introduces pure helpers for normalizing and updating persisted query history.
src/presets.ts Introduces pure helpers for normalizing and managing persisted named presets.
src/filterPicker.ts Implements the QuickPick controller + item builders for preview/history/presets.
src/filter.ts Adds findMatchingDirsLimited with truncation/cancellation metadata and bounds.
src/extension.ts Wires QuickPick flow into commands, persists active query/history/presets, restores status bar.
README.md Documents the new filter prompt behavior, bounds, and preset UX.
package.json Bumps extension version to 0.3.0.
package-lock.json Updates lockfile version fields to 0.3.0.
CHANGELOG.md Adds entries for 0.2.x and 0.3.0 features/fixes.
.gitignore Ignores .atl/.
Review details
  • Files reviewed: 12/14 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/filterPicker.ts
Comment on lines +217 to +232
try {
const result = deps.search(trimmedQuery, () => token.cancelled);
if (token.cancelled || settled) {
return;
}

quickPick.items = buildPreviewItems(trimmedQuery, result, deps.saveButton);
} finally {
if (runningSearch === token) {
runningSearch = undefined;
}

if (!settled) {
quickPick.busy = false;
}
}
Comment thread src/filterPicker.ts
Comment on lines +277 to +286
if (item.kind === 'query' || item.kind === 'history') {
void deps.onSaveQueryAsPreset(item.query).then((updated) => {
if (updated === undefined || settled) {
return;
}

presets = updated;
});
return;
}
Comment thread src/filterPicker.ts
Comment on lines +263 to +275
if (item.kind === 'history' && button === deps.removeHistoryButton) {
void deps.onRemoveHistoryEntry(item.query).then((updated) => {
if (settled) {
return;
}

history = updated;
if (!quickPick.value.trim()) {
showEmptyQueryItems();
}
});
return;
}
Comment thread src/filterPicker.ts
Comment on lines +288 to +299
if (item.kind === 'preset' && item.presetName) {
void deps.onDeletePreset(item.presetName).then((updated) => {
if (settled) {
return;
}

presets = updated;
if (!quickPick.value.trim()) {
showEmptyQueryItems();
}
});
}
@JonatanTorino

Copy link
Copy Markdown

Hello @RobertLD, of course you can take the changes, being the owner of the repo 😁
The simplicity of the extension is appreciated.

Greetings,
Jonatan

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.

3 participants