Add support for reordering columns and persisting state#121
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds per-table column layout persistence (resize + reorder) by introducing a serializable table view state, wiring it through the data table provider, and saving it back into .kqr-backed result documents / singleton views while avoiding webview redraw flashes during page rebuilds.
Changes:
- Introduces
ResultTableViewand plumbs optionaltableViewsthroughResultData. - Extends
DataTableProvider/DataTableViewto accept initial view state, track column resize/reorder in the webview, and notify host listeners. - Persists updated layout back into
.kqrdocuments and suppresses certain webview messages during HTML rebuild to prevent visible flashes.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Client/tests/unit/dataTableProvider.test.ts | Adds unit coverage for initial view state embedding and host-side updates via setColumnView. |
| src/Client/features/server.ts | Adds ResultTableView and optional ResultData.tableViews schema for persisted per-table presentation state. |
| src/Client/features/resultsViewer.ts | Loads saved table view state into table views, listens for changes, and persists them back to .kqr documents; adds suppressMessages to avoid redraw flashes. |
| src/Client/features/plotlyChartProvider.ts | Clears cached chart HTML/payload to avoid stale chart replay after page rebuilds. |
| src/Client/features/dataTableProvider.ts | Implements column width persistence + drag/drop column reorder in the table webview and exposes view-state APIs to the host. |
| src/Client/features/compositeChartProvider.ts | Clears Plotly replay state when delegating rendering to TimePivot. |
💡 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.
No description provided.