Use results history instead of results cache#84
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR shifts “show results” CodeLens behavior from a session-scoped client results cache to the persistent query results history, removing the results cache and updating related defaults/UX.
Changes:
- Removed the client-side
ResultsCache(and its unit tests) and rewired CodeLens “Results” to resolve viaHistoryManager. - Extended
HistoryManagerto persist aqueryHash(FNV-1a of server-minified query) and added query-to-history lookup APIs. - Tweaked results/chart UX (auto-open chart editor when no chart type is specified) and changed a configuration default.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Client/tests/unit/resultsCache.test.ts | Removed tests for the deleted results cache. |
| src/Client/tests/unit/historyManager.test.ts | Updated HistoryManager construction to accept a server (NullServer in tests). |
| src/Client/package.json | Changed chart display default from beside to main. |
| src/Client/features/resultsViewer.ts | Auto-opens chart editor when chart type wasn’t specified. |
| src/Client/features/resultsCache.ts | Removed results cache implementation. |
| src/Client/features/queryEditor.ts | Uses HistoryManager for “Results” CodeLens and result display command. |
| src/Client/features/historyPanel.ts | Added API to reveal a history entry from other components. |
| src/Client/features/historyManager.ts | Added query hashing + lookup methods and server dependency. |
| src/Client/extension.ts | Removed ResultsCache wiring; injected server into HistoryManager; updated QueryEditor construction. |
| TESTING.md | Updated testing scope list to reflect history query-hash lookup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Query code-lens accessing matching results is now tied to the most recent matching result in the persistent results history and not the session-based results cache.
Removed the results cache.
Changed some defaults