-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(events): auto load new events checkbox issue #25039
Conversation
Will fix the cypress tests after discussing and finalising on the desired behaviour. |
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.
Looks good to me @abhi12299! But not sure why CI's red, definitely worth getting to green
@Twixes working on it! |
@Twixes only the visual regression tests fail. I don't think I have access to the artifacts uploaded by the tests to see what the difference is. |
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.
Looks good, thank you!
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
Problem
When the
Automatically load new events
checkbox is unchecked and the user cancels the ongoing query, the error message displayed is "The query was cancelled" - which is correct.However, after this, when the checkbox is checked, the error is about
AbortSignal
and it does not trigger a refetch immediately.When you cancel the ongoing query when the
Automatically load new events
checkbox is checked, you will see theAbortSignal
error.Here's the bug:
bug-autoload.mov
Changes
loadNewData
prioritises new response if the existing response is null.posthog/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts
Lines 238 to 264 in dfbd23b
Lines 258-262 here show that the object returned from the loader will only have
results
key ifvalues.response
is nullresponseError
reducer also reacts toloadNewData...
actions; this helps to get rid of the error state when new data is loaded.When you cancel the ongoing query when the
Automatically load new events
checkbox is checked, you will not see any error state in the table - this is because the auto load functionality will trigger a refetch in 30s anyways, so it is not a good UX to show an error state only for it to be replaced with the table after 30s.Here's the fix:
fix.mov