<#878 Improved distributed query visibility and co...
# osctrl
g
#878 Improved distributed query visibility and control across the query views Pull request opened by javuto Summary This PR improves distributed query visibility and control across the React query views, and tightens backend query lifecycle handling so query state and targets stay in sync. What changed Query list UX • Display the SQL text instead of the generated internal query name in the queries table • Add a dedicated status column so active, completed, expired, and deleted queries are obvious at a glance • Add a manual
Refresh
button to refetch the queries table on demand Query detail UX • Add a
Complete query
button for queries that are still in progress • Refresh query metadata and results after completing a query • Surface query target chips in the detail view, including full-environment targets Backend query lifecycle • Mark the parent distributed query as completed/inactive once all node query records leave the pending state • Persist query target records when a query is created • When a query targets the whole environment, store that environment target explicitly so the UI can display it correctly Why These changes fix a few operator-facing gaps: • queries could finish on all nodes but still appear active • query lists showed internal names instead of the SQL operators actually recognize • full-environment targets were not visible in the detail view • there was no quick way to manually complete or refresh query views Testing •
go test ./pkg/handlers ./pkg/queries
•
cd frontend && node node_modules/.ignored/vitest/vitest.mjs run src/features/queries/QueryDetailPage.test.tsx src/features/queries/QueriesListPage.test.tsx
•
cd frontend && node node_modules/.ignored/vitest/vitest.mjs run src/features/queries/QueriesListPage.test.tsx
•
cd frontend && node node_modules/.ignored/typescript/bin/tsc -p tsconfig.json --noEmit
Notes • The target persistence fix applies to newly created queries. Older queries created before target rows were stored will still have incomplete target metadata. jmpsec/osctrl