Repository navigation
YQ-4756 new streaming queries fields - #4472
kardymonds wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Visual snapshots are stale, and the new lifecycle behavior lacks focused coverage.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds lifecycle metadata and schema details to streaming-query diagnostics while preserving older backend compatibility.
Changes:
- Displays creation, modification, start, and stop metadata.
- Fetches optional lifecycle columns while excluding large plan fields.
- Integrates common schema-object information.
| File | Description |
|---|---|
tests/suites/tenant/diagnostics/tabs/info.test.ts |
Updates mocked query column names. |
src/store/reducers/streamingQuery/streamingQuery.ts |
Retrieves available streaming-query fields. |
StreamingQueryInfo.tsx |
Renders lifecycle and schema metadata. |
StreamingQueryInfo/i18n/en.json |
Adds lifecycle labels. |
SchemaObjectInfo.tsx |
Accepts custom creation content. |
prepareSchemaObjectInfo.tsx |
Uses custom creation metadata. |
Overview.tsx |
Integrates streaming-query schema information. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| {name: 'Status', type: 'Utf8?'}, | ||
| {name: 'Issues', type: 'Utf8?'}, |
| const lifecycleFields = [ | ||
| {name: i18n('field_started'), timestamp: 'StartedAt', user: 'StartedBy'}, | ||
| {name: i18n('field_modified'), timestamp: 'ModifiedAt', user: 'ModifiedBy'}, | ||
| {name: i18n('field_stopped'), timestamp: 'FinishedAt', user: 'StoppedBy'}, | ||
| ]; |
No flows tested, and faced 1 obstacle. Obstacles faced
To reduce obstacles, configure your TREX environment. |
| const milliseconds = typeof timestamp === 'string' ? Date.parse(timestamp) : NaN; | ||
| const dateMilliseconds = | ||
| Number.isFinite(milliseconds) && milliseconds > 0 ? milliseconds : Number(fallback); |
There was a problem hiding this comment.
If a query returns a numeric StartedAt, ModifiedAt, or FinishedAt, formatLifecycleValue skips the date and the page shows —. The query parser keeps numbers unchanged. Parse numeric timestamps before using the fallback.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.tsx
Line: 144-146
Comment:
**Numeric dates show as missing**
If a query returns a numeric `StartedAt`, `ModifiedAt`, or `FinishedAt`, `formatLifecycleValue` skips the date and the page shows `—`. The query parser keeps numbers unchanged. Parse numeric timestamps before using the fallback.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| rows: [['RUNNING', '{}', 'SELECT 1;']], | ||
| columns: [ | ||
| {name: 'State', type: 'Utf8?'}, | ||
| {name: 'Error', type: 'Utf8?'}, | ||
| {name: 'Status', type: 'Utf8?'}, | ||
| {name: 'Issues', type: 'Utf8?'}, | ||
| {name: 'Text', type: 'Utf8?'}, | ||
| ], |
There was a problem hiding this comment.
New lifecycle fields go untested
The updated test returns only Status, Issues, and Text. It never checks the new lifecycle rows or the created-date fallback, so a broken field name or date format can pass. Add a response and assertions for those fields.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/suites/tenant/diagnostics/tabs/info.test.ts
Line: 778-783
Comment:
**New lifecycle fields go untested**
The updated test returns only `Status`, `Issues`, and `Text`. It never checks the new lifecycle rows or the created-date fallback, so a broken field name or date format can pass. Add a response and assertions for those fields.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


The PR appears safe to merge, with two non-blocking fixes worth making.
Fix with agent prompt
Summary
The streaming-query Overview now brings schema details and query lifecycle times together, alongside the query state, errors, and text. It reads the query row’s available fields so it can show lifecycle details when the backend provides them.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR D["Describe response"] --> S["SchemaObjectInfo"] Q["Streaming query result"] --> L["Lifecycle fields"] Q --> E["State, issues, and text"] L --> SReviews (1) · Last reviewed commit: "added seconds"