Skip to content

feat(ourlogs): add 'View in table' option to pinned logs - #127765

Open
JoshuaKGoldberg wants to merge 5 commits into
masterfrom
joshgoldberg/logs-891-view-in-table
Open

JoshuaKGoldberg wants to merge 5 commits into
masterfrom
joshgoldberg/logs-891-view-in-table

Conversation

@JoshuaKGoldberg

@JoshuaKGoldberg JoshuaKGoldberg commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Adds a View in table option to the pinned logs menu. If the log isn't loaded, the logs query anchors on the log's precise timestamp (LOGS-1006) and loads the rows on both sides of it, instead of paging until it turns up. The anchor is padded by 256ns because browsers round 19-digit nanosecond timestamps when parsing JSON.

Supersedes #118457.

Pinned log menu:

Explore › Logs, pinned log menu open

Choosing it for a log from 30 minutes ago centers it in the table among its neighbors:

Explore › Logs, after View in table

Closes LOGS-891.

Pinned rows get a "View in table" menu option. If the log is already
loaded, the table scrolls to it. Otherwise the logs query anchors on the
log's precise timestamp, loading the rows on both sides of it, and then
centers it.

Refs LOGS-891
@linear-code

linear-code Bot commented Oct 16, 2026

Copy link
Copy Markdown

LOGS-891

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 16, 2026
};
}

const JSON_NUMBER_NANOSECOND_ROUNDING = 256n;

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.

todo for next week:

The anchor is padded by 256ns because browsers round 19-digit nanosecond timestamps when parsing JSON.

look into whether the server giving them as strings, not numbers, would fix things

@JoshuaKGoldberg JoshuaKGoldberg Oct 19, 2026 •

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.

Ok yes I think I'm going to keep proposing this as-is. To recap, it's because the server sends timestamp_precise as a numeric value, not string - which JSON rounds sometimes. In theory we could:

  1. Add a new string version as an alias at the RPC layer
  2. Have it more smartly handle ints at high number values
  3. Pipe it up to be used instead here

...but that would be net a lot more code, and one more API field to know about. This PR's rounding logic isn't that much and isn't a huge problem IMO.

@JoshuaKGoldberg JoshuaKGoldberg changed the title feat(logs): add View in table option to pinned logs feat(ourlogs): add 'View in table' option to pinned logs Oct 16, 2026
@JoshuaKGoldberg
JoshuaKGoldberg marked this pull request as ready for review October 19, 2026 13:55
@JoshuaKGoldberg
JoshuaKGoldberg requested review from a team as code owners October 19, 2026 13:55
@JoshuaKGoldberg
JoshuaKGoldberg marked this pull request as draft October 19, 2026 13:55
@JoshuaKGoldberg

Copy link
Copy Markdown
Member Author

@cursor review

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e66ed5e. Configure here.

@JoshuaKGoldberg
JoshuaKGoldberg marked this pull request as ready for review October 19, 2026 14:14
@JoshuaKGoldberg
JoshuaKGoldberg requested a review from a team October 19, 2026 14:14
@JoshuaKGoldberg
JoshuaKGoldberg added this pull request to stack #128044 October 19, 2026 15:55
Comment thread static/app/views/explore/logs/useLogsQuery.tsx
Comment thread static/app/views/explore/logs/useLogsApiOptions.tsx Outdated
};
}, []);

const scrollToAnchor = useEffectEvent((anchorId: string) => {

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.

💅

@sentry

sentry Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 754 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

scripts/lint.ts ran root and package lint scripts through pnpm run, which joins every path into one shell string. A change to a widely imported file makes CI lint thousands of impacted files, and pnpm crashes before linting starts. Running each script's command through pnpm exec keeps the paths as separate arguments.
@JoshuaKGoldberg
JoshuaKGoldberg requested a review from a team as a code owner October 21, 2026 15:42

This branch was successfully deployed

1 active deployment
Preview — fb7ad01f Deployed Oct 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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