Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: turn streaming on by default #2028

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

feat: turn streaming on by default #2028

wants to merge 2 commits into from

Conversation

astandrik
Copy link
Collaborator

@astandrik astandrik commented Mar 20, 2025

Closes #2024

CI Results

Test Status: ✅ PASSED

📊 Full Report

Total Passed Failed Flaky Skipped
278 277 0 0 1
Test Changes Summary ⏭️1

⏭️ Skipped Tests (1)

  1. Streaming query shows some results and banner when stop button is clicked (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: ✅

Current: 83.22 MB | Main: 83.22 MB
Diff: +3.62 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enables query streaming by default and refactors the UI for query timeout settings.

  • Introduces a new QuerySettingsTimeout component to handle timeout inputs.
  • Updates the QuerySettingsDialog to replace inline timeout control with the new component and changes the docs link from ExternalLink to Button.
  • Adjusts default streaming settings and the capability version check for streaming.

Reviewed Changes

Copilot reviewed 5 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsTimeout.tsx New component to encapsulate timeout settings in the query dialog.
src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx Integrates the new timeout component and updates the docs link.
src/utils/query.ts Updates the timeout field validation schema by removing the default value catch.
src/services/settings.ts Changes default query streaming setting to true.
src/store/reducers/capabilities/hooks.ts Updates the minimum version requirement for streaming availability.
Files not reviewed (4)
  • src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss: Language not supported
  • src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsTimeout.scss: Language not supported
  • src/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json: Language not supported
  • src/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json: Language not supported
Comments suppressed due to low confidence (1)

src/utils/query.ts:332

  • Removing the default catch for the timeout value might lead to issues when processing empty or invalid inputs. If a default value is desired, consider handling it explicitly.
z.coerce.number().positive().optional()

onChange={field.onChange}
isEnabled={Boolean(field.value)}
onToggle={(enabled) =>
field.onChange(enabled ? DEFAULT_QUERY_SETTINGS.timeout : '')
Copy link
Preview

Copilot AI Mar 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing an empty string when toggling off may lead to unexpected behavior since the expected type is number or undefined. Consider using undefined instead of ''.

Suggested change
field.onChange(enabled ? DEFAULT_QUERY_SETTINGS.timeout : '')
field.onChange(enabled ? DEFAULT_QUERY_SETTINGS.timeout : undefined)

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@astandrik astandrik removed the request for review from artemmufazalov March 20, 2025 09:18
@astandrik astandrik closed this Mar 20, 2025
@astandrik astandrik reopened this Mar 20, 2025
@astandrik astandrik marked this pull request as draft March 20, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

turn streaming on by default
1 participant