Skip to content

feat: add version history viewer for managed queries#165

Merged
MathiasVDA merged 5 commits into
mainfrom
copilot/add-history-retrieval-for-managed-queries
May 11, 2026
Merged

feat: add version history viewer for managed queries#165
MathiasVDA merged 5 commits into
mainfrom
copilot/add-history-retrieval-for-managed-queries

Conversation

Copilot AI commented May 11, 2026

Copy link
Copy Markdown

The Query Browser's right-click menu had no way to access a managed query's version history. Users had no in-app path to inspect or restore previous query versions.

Changes

New QueryHistoryModal

  • Right-clicking any managed query in the Query Browser now shows a History menu item
  • Opens a split-panel dialog: left panel lists all versions newest-first (date, author, save message); right panel shows a read-only preview of the selected version's SPARQL text
  • Open in tab creates a new tab with the historical query text, fully linked to the managed query (ManagedTabMetadata with the historical lastSavedVersionRef and lastSavedTextHash) — the user can edit and re-save to create a new version from it

QueryBrowser.ts

  • Imports QueryHistoryModal and lazily initializes one instance (consistent with existing folderPickerModal pattern)
  • Adds the History item between Copy URI and Rename in openQueryContextMenu

QueryHistoryModal.scss

  • Responsive split-panel dialog using the existing CSS custom-property design tokens

docs/user-guide.md

  • Documents the new history workflow under Managed queries

Copilot AI linked an issue May 11, 2026 that may be closed by this pull request
Copilot AI added 3 commits May 11, 2026 11:53
- Add QueryHistoryModal.ts: modal to list versions, preview text, and open historical version in a new linked tab
- Add QueryHistoryModal.scss: responsive split-panel styles for the history dialog
- QueryBrowser.ts: import modal, add private field, wire 'History' item in openQueryContextMenu
- docs/user-guide.md: document 'View version history of a managed query' feature

Agent-Logs-Url: https://github.com/Matdata-eu/Yasgui/sessions/aec69354-f6b3-4b13-8808-88827fb8970c
- Move document keydown listener to show()/close() to avoid memory leak
- Fix invalid date detection using isNaN(d.getTime()) instead of try/catch

Agent-Logs-Url: https://github.com/Matdata-eu/Yasgui/sessions/aec69354-f6b3-4b13-8808-88827fb8970c
Copilot AI changed the title [WIP] Add history retrieval for managed queries feat: add version history viewer for managed queries May 11, 2026
Copilot AI requested a review from MathiasVDA May 11, 2026 11:58
@MathiasVDA MathiasVDA marked this pull request as ready for review May 11, 2026 11:59
@MathiasVDA MathiasVDA merged commit 1dc64b3 into main May 11, 2026
2 checks passed
@MathiasVDA MathiasVDA deleted the copilot/add-history-retrieval-for-managed-queries branch May 11, 2026 11:59
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.

Add history retrieval for managed queries

2 participants