Merge Forked improvements back in - #1
Conversation
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.
|
@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 |
There was a problem hiding this comment.
🟡 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.
| 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; | ||
| } | ||
| } |
| if (item.kind === 'query' || item.kind === 'history') { | ||
| void deps.onSaveQueryAsPreset(item.query).then((updated) => { | ||
| if (updated === undefined || settled) { | ||
| return; | ||
| } | ||
|
|
||
| presets = updated; | ||
| }); | ||
| return; | ||
| } |
| 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; | ||
| } |
| if (item.kind === 'preset' && item.presetName) { | ||
| void deps.onDeletePreset(item.presetName).then((updated) => { | ||
| if (settled) { | ||
| return; | ||
| } | ||
|
|
||
| presets = updated; | ||
| if (!quickPick.value.trim()) { | ||
| showEmptyQueryItems(); | ||
| } | ||
| }); | ||
| } |
|
Hello @RobertLD, of course you can take the changes, being the owner of the repo 😁 Greetings, |
No description provided.