Skip to content

Conversation

@priscilawebdev
Copy link
Member

Problem
Users who have paginated a table (with tableCursor in the URL) may encounter an empty page when they change the project, environment, or date. This happens because the pagination cursor points to a page that may not exist in the new context, even though results are available.

Solution
We should follow the behaviour of Discover tables and reset pagination cursors whenever the project, environment, or date changes.

@priscilawebdev priscilawebdev requested a review from a team as a code owner October 15, 2025 09:00
@priscilawebdev priscilawebdev changed the title fix9ai): Cursor should be reset if env, proj or date changes fix(ai): Cursor should be reset if env, proj or date changes Oct 15, 2025
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 15, 2025
: agentRunsRequest.data?.length > 0;

const resetParamsOnChange = useMemo(
() => Object.keys(location.query).filter(key => key.toLowerCase().includes('cursor')),
Copy link
Member

Choose a reason for hiding this comment

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

I'm not a fan of this matching. Why don't we just use the same cursor name for all tables and reset that one?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not a fan of this matching. Why don't we just use the same cursor name for all tables and reset that one?

i agree with you but we have many different cursor names, like toolsCursor, tableCursor. to be honest, I am not sure why we did not call them all simple cursor. there isn't an enum for them too. they are many times defined a a plain text.

Copy link
Member Author

Choose a reason for hiding this comment

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

Would it make sense to fix the issue now and address improvements afterwards?

Copy link
Member

Choose a reason for hiding this comment

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

yeah, let's merge this. I will create a ticket

@priscilawebdev priscilawebdev merged commit 752a5cb into master Oct 15, 2025
48 checks passed
@priscilawebdev priscilawebdev deleted the priscila/fix/ai/cursor-should-be-reset-on-env-proj-time-change branch October 15, 2025 10:10
chromy pushed a commit that referenced this pull request Oct 17, 2025
**Problem**
Users who have paginated a table (with tableCursor in the URL) may
encounter an empty page when they change the project, environment, or
date. This happens because the pagination cursor points to a page that
may not exist in the new context, even though results are available.

**Solution**
We should follow the behaviour of Discover tables and reset pagination
cursors whenever the project, environment, or date changes.
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants