Skip to content

Use results history instead of results cache#84

Merged
mattwar merged 2 commits into
mainfrom
user/mattwar/ChangeSomeDefaults
Apr 16, 2026
Merged

Use results history instead of results cache#84
mattwar merged 2 commits into
mainfrom
user/mattwar/ChangeSomeDefaults

Conversation

@mattwar

@mattwar mattwar commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

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

Copilot AI review requested due to automatic review settings April 16, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 via HistoryManager.
  • Extended HistoryManager to persist a queryHash (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.

Comment thread src/Client/features/queryEditor.ts
Comment thread src/Client/features/queryEditor.ts
Comment thread src/Client/features/historyManager.ts
Comment thread src/Client/features/historyManager.ts
Comment thread src/Client/features/historyManager.ts
Comment thread src/Client/features/historyPanel.ts
@mattwar mattwar merged commit 1c9594e into main Apr 16, 2026
9 checks passed
@mattwar mattwar deleted the user/mattwar/ChangeSomeDefaults branch April 16, 2026 19:26
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.

2 participants