-
Notifications
You must be signed in to change notification settings - Fork 17
fix: write intelligent timing to query #2853
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
2 files reviewed, no comments
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
1 file reviewed, no comments
Raubzeug
approved these changes
Sep 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2845
Stand
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 85.41 MB | Main: 85.41 MB
Diff: 2.30 KB (-0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information
Updated On: 2025-09-09 14:53:27 UTC
This review covers only the changes made since the last review, not the entire PR. The latest changes implement "intelligent timing" for query execution duration display by refactoring timing logic from the
QueryExecutionStatuscomponent into a dedicateduseElapsedDurationcustom hook. The key improvement is adaptive refresh rates: queries under 10 seconds receive fast updates (100ms with jitter) for responsive user feedback, while longer queries use slower updates (1000ms) to optimize performance.The main component now uses this hook and displays millisecond precision (mm:ss.SSS format) for short queries, providing better visibility into quick operations. The implementation includes jitter to prevent synchronized timer updates across multiple queries, which could cause UI performance spikes. This change addresses issue #2845 by improving user experience for short-running queries while maintaining efficient resource usage for longer operations.
The refactoring follows good React patterns by separating timing concerns into a reusable hook, making the main component cleaner and the timing logic more testable. The hook properly handles cleanup with cancellation flags and timer clearing to prevent memory leaks.
Important Files Changed
Changed Files
useElapsedDurationhook and added millisecond precision formatting for short queriesConfidence score: 4/5