-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 : '') |
There was a problem hiding this comment.
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 ''.
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.
Closes #2024
CI Results
Test Status: ✅ PASSED
📊 Full Report
Test Changes Summary ⏭️1
⏭️ Skipped Tests (1)
Bundle Size: ✅
Current: 83.22 MB | Main: 83.22 MB
Diff: +3.62 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information