Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
👁️🗨️ Review this pull request with grouped, summarized diffs at: raw result💭 analyzed by {
"headSha": "234632b71166cf0470fe6212dbbe8dde57180a18",
"result": {
"overallSummary": "Adds a \"copy with context\" action to the Data Inspector's result viewer: a successful query's result is now captured together with the exact source, query, filters and receipt time that produced it, exportable as Markdown (with staleness notices and documented truncation limits) alongside the existing JSON copy. Both copy actions now wait for clipboard success and fall back to a manual-copy dialog on failure, and switching sources clears the retained result and discards late responses from the old source.",
"groups": [
{
"key": "core-observation",
"label": "Query observation logic",
"summary": "Introduces a `QueryObservation` that pins the result to the query, filters, source and receipt time at the moment of success, renders it as Markdown with explicit data limits, and clears/guards it on source switches and late (stale) responses.",
"category": "core",
"filePaths": [
"plugins/data-inspector/app/composables/query-observation.ts",
"plugins/data-inspector/app/composables/workbench.ts"
],
"critical": true,
"lineNotes": [
{
"path": "plugins/data-inspector/app/composables/workbench.ts",
"side": "additions",
"line": 298,
"text": "Request (source/query/filters) is captured before the await so a later edit or source switch can't change what gets attributed to this response."
}
]
},
{
"key": "ui-copy-actions",
"label": "Copy result UI",
"summary": "Adds a second copy action (Markdown with context) beside the existing JSON copy, surfaces staleness notices, and adds a manual-copy fallback modal when the clipboard write fails for either action.",
"category": "ui",
"filePaths": [
"plugins/data-inspector/app/components/ResultViewer.vue",
"plugins/data-inspector/app/App.vue"
],
"lineNotes": [
{
"path": "plugins/data-inspector/app/components/ResultViewer.vue",
"side": "additions",
"line": 90,
"text": "Result is serialized synchronously at click time from `props.observation`, not from `props.result`, so a refresh landing mid-copy can't change the copied text."
}
]
},
{
"key": "tests",
"label": "Tests",
"summary": "Unit tests for Markdown rendering edge cases (backtick fencing, truncation reporting) and workbench behavior around source switches, stale responses, and conditions-changed notices.",
"category": "tests",
"filePaths": [
"plugins/data-inspector/test/query-observation.test.ts",
"plugins/data-inspector/test/workbench-observation.test.ts"
],
"fileNotes": [
{
"path": "plugins/data-inspector/test/workbench-observation.test.ts",
"text": "Covers the race conditions between source switches and in-flight queries (old-source and old-filter responses must be dropped)."
}
]
}
],
"schemaVersion": 1,
"source": "llm",
"generatedAt": "2026-11-05T07:38:32.834Z",
"model": "vercel-ai-gateway/anthropic/claude-sonnet-5",
"locale": "en"
}
} |
Sharing a query result requires its source and executed conditions to make sense of the observation. Capture them with the successful response and copy the result, receipt time and data limits as Markdown. Preserve result-only JSON copying. Explain retained results, clear them on source changes, reject late responses and provide complete manual text when clipboard writes fail.
SaKaNa-Y
force-pushed
the
feat/data-inspector-query-context
branch
from
November 5, 2026 07:37
d561c8a to
234632b
Compare
Contributor
Author
|
This PR focus on copying a query result with its context as Markdown. I also have some other ideas, but they still need more thought. I plan to discuss them after this PR merges. |
This branch was previously deployed
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.
Closes #473
Summary
Sharing a Data Inspector result currently requires copying the JSON and separately recording its source, query, filters and time. A shared query link runs against current data, so a teammate can miss the original observation if that data changes.
Add a document icon beside JSON copy that copies one successful result with its context as Markdown. Capture the query conditions with the request and show when the retained result predates edits, a pending query or a failure. Include the browser receipt time and known conversion and truncation limits.
Switching sources clears the previous result and rejects late responses from the old source. Both copy actions wait for clipboard success and offer the complete text for manual copying if the write fails.
Evidence
After: Markdown includes the matching source, query, filters, receipt time, result and limits; JSON copy remains available.
pnpm lint,pnpm knip,pnpm typecheckandpnpm buildpassed.pnpm test --run: 1,857 passed, 14 skipped.Merge Danger
Door: Two-way. No storage migration or RPC contract changes.
Blast Radius: Data Inspector. Source-switch clearing and reliable clipboard feedback apply to the existing JSON action as well as the new Markdown action.