Skip to content

feat(logs): switch needle-in-haystack auto-fetching from 5 tries to time-based#113219

Merged
JoshuaKGoldberg merged 5 commits into
masterfrom
infinite-logs-auto-fetching-time-based
Apr 20, 2026
Merged

feat(logs): switch needle-in-haystack auto-fetching from 5 tries to time-based#113219
JoshuaKGoldberg merged 5 commits into
masterfrom
infinite-logs-auto-fetching-time-based

Conversation

@JoshuaKGoldberg

@JoshuaKGoldberg JoshuaKGoldberg commented Apr 16, 2026

Copy link
Copy Markdown
Member

Continues #102286 -> #111946 by:

  1. Extracting the new logic out into a new useAutoFetchWindow hook
  2. Adding resetting of the deadline to the hook based on query key

Fixes LOGS-708.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 16, 2026
@linear-code

linear-code Bot commented Apr 16, 2026

Copy link
Copy Markdown

Comment thread static/app/views/explore/logs/useLogsQuery.tsx
@JoshuaKGoldberg
JoshuaKGoldberg marked this pull request as ready for review April 17, 2026 17:02
@JoshuaKGoldberg
JoshuaKGoldberg requested a review from a team as a code owner April 17, 2026 17:02
@JoshuaKGoldberg
JoshuaKGoldberg requested a review from k-fish April 17, 2026 17:02

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 654f9d4. Configure here.

Comment thread static/app/views/explore/logs/useLogsQuery.tsx
'explore.logs.flex_time_pages_before_data',
timesFetched.current,
{attributes: {status: 'fetching'}}
);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@k-fish do you have advice on what to do for these metrics logs? I'm thinking the out-of-time vs. fetching one matches the original PR's intent, roughly?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it'll be fine, it'll fire once for each page as fetching then one out_of_time at the end?

Comment thread static/app/views/explore/logs/constants.tsx

@k-fish k-fish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, were you planning on looking into the loading state making the rows unclickable in a future PR?

'explore.logs.flex_time_pages_before_data',
timesFetched.current,
{attributes: {status: 'fetching'}}
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it'll be fine, it'll fire once for each page as fetching then one out_of_time at the end?

Comment thread static/app/views/explore/logs/constants.tsx
@JoshuaKGoldberg JoshuaKGoldberg changed the title feat(logs): switch needle in haystack auto-fetching from 5 tries to time-based feat(logs): switch needle-in-haystack auto-fetching from 5 tries to time-based Apr 17, 2026
@JoshuaKGoldberg
JoshuaKGoldberg merged commit a87f542 into master Apr 20, 2026
66 checks passed
@JoshuaKGoldberg
JoshuaKGoldberg deleted the infinite-logs-auto-fetching-time-based branch April 20, 2026 12:05
@github-actions github-actions Bot locked and limited conversation to collaborators May 5, 2026
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.

2 participants