Preserve search results after directory changes#134
Open
shriram-svg wants to merge 1 commit into
Open
Conversation
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: #18
What are the changes and their implications?
This keeps per-view search state for the active query/folder. When a directory update arrives after a file operation, droppy now re-runs the active search instead of replacing the results with the full directory listing. Search results also restore the search input state, and opening a file preserves the active search so browser Back can return to the filtered result list.
The search response now echoes the query so the client can ignore stale results when a newer query is active.
Verification
git diff --checkyarn lint(passes; reports existing warnings)yarn biome check packages/client/lib/client.js packages/server/src/commands/search.ts(passes; reports existing unusednormalizewarning inclient.js)yarn workspace @droppyjs/server buildyarn testyarn buildwas attempted, but the existing resource build fails looking for workspace-local client dependency paths such asnode_modules/handlebars/dist/handlebars.runtime.min.jsunder the client package.Checklist