feat(queries): show result_id in queries list table#126
Conversation
- queries list now shows RESULT_ID column alongside query ID, replacing DURATION_MS (still visible in queries get detail view) - SQL truncation reduced from 60 to 40 chars to fit the wider table - QueryRun struct gains database_id field (serde default) so the detail view will surface it automatically once the API starts returning it
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| } else { | ||
| let has_rows = body.results.iter().any(|r| r.row_count.is_some()); | ||
| let has_query_run = body.results.iter().any(|r| r.query_run_id.is_some()); | ||
| let has_expires = body.results.iter().any(|r| r.expires_at.is_some()); |
There was a problem hiding this comment.
nit: this results list enhancement (conditional ROWS/QUERY_RUN_ID/EXPIRES columns, status coloring, three new fields) isn't mentioned in the PR title or description, which are entirely about queries list. The code looks correct — header/row column counts stay in sync across all conditional branches — but consider either documenting these results.rs changes in the description or splitting them into a separate PR for a cleaner history. (not blocking)
There was a problem hiding this comment.
Approving — only non-blocking nits inline. RESULT_ID column wiring in queries.rs is correct (header/row counts match), database_id degrades gracefully via #[serde(default)], and JSON/YAML output is unaffected. The full-vs-8-char-prefix point is already covered by the existing inline thread.
There was a problem hiding this comment.
Reviewed. Prior feedback addressed: color_status consolidated into src/util.rs, PR description now matches the full RESULT_ID column and documents the results list changes. Conditional column logic in results.rs keeps headers and rows in sync. No blocking issues.
Summary
queries listnow shows fullRESULT_IDandMS(execution time in ms) columns;DURATION_MSwas renamed toMSfor compactness; SQL truncated to 40 charsqueries getdetail view now showsdatabase id:when the API returns it — field added toQueryRunstruct with `#[serde(default)]` so it surfaces automatically once the backend adds itresults listnow colors status (green = ready, yellow = pending/processing, red = failed, grey = expired) and will automatically showROWS,QUERY_RUN_ID, andEXPIREScolumns once the API returns those fieldsTest plan
hotdata queries list— RESULT_ID column shows full ID for completed runs,-for in-flight; MS column shows execution timehotdata queries get <id>— detail view renders correctly;database id:line will appear when API adds the fieldhotdata queries list --output json— fullresult_idanddatabase_idfields present in JSON outputhotdata results list— status is colored (ready = green); table shows ID, STATUS, CREATED cleanly; extra columns will appear when API returns themhotdata results list --output json—row_count,query_run_id,expires_atfields present in JSON output once API returns them