Skip to content

Conversation

@bk201-
Copy link
Contributor

@bk201- bk201- commented Apr 4, 2025

Fixes: #2619

This pull request includes significant changes to the QueryEditorTab and related components to introduce and manage a query history feature. The most important changes include adding new constants and types for query history, implementing the logic to update query history, and modifying the state management to handle query history updates.

Query History Feature:

  • src/panels/QueryEditorTab.ts: Introduced constants QUERY_HISTORY_SIZE and HISTORY_STORAGE_KEY, and a new type HistoryData to manage query history. Added a new method updateQueryHistory to update and store query history, and modified the class to call this method when needed. [1] [2] [3] [4]

State Management:

@bk201- bk201- requested a review from a team as a code owner April 4, 2025 12:37
@bk201- bk201- requested a review from Copilot April 4, 2025 12:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/webviews/cosmosdb/QueryEditor/state/QueryEditorState.tsx:39

  • [nitpick] Consider aligning the action type name with the command and event names (e.g. 'updateQueryHistory') to improve consistency and clarity between files.
type: 'updateHistory';

src/webviews/cosmosdb/QueryEditor/state/QueryEditorContextProvider.tsx:168

  • [nitpick] Consider using consistent naming between the channel event ('updateQueryHistory') and the reducer action ('updateHistory') to avoid potential confusion.
this.channel.on('updateQueryHistory', (queryHistory: string[]) => {

@bk201- bk201- merged commit c0d9965 into main Apr 11, 2025
2 checks passed
@bk201- bk201- deleted the dev/bk201-/persistant-history branch April 11, 2025 13:15
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.

NoSQL Query History is not persisted

3 participants