Skip to content

feat(logs): Add "Copy message" and "Copy as JSON" to log row actions#111729

Draft
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
JoshuaKGoldberg/feat/logs-copy-message-and-json-actions
Draft

feat(logs): Add "Copy message" and "Copy as JSON" to log row actions#111729
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
JoshuaKGoldberg/feat/logs-copy-message-and-json-actions

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Mar 27, 2026

Expand the log row ellipsis dropdown to offer two copy actions instead of the single "Copy to clipboard": Copy message (copies the cell value) and Copy as JSON (copies the full log payload as formatted JSON). The JSON option is always clickable — if the full log data hasn't loaded yet, it defers the copy until the data arrives.

Also adds a Copy message button alongside the existing Copy as JSON in the expanded row details view, so both copy options are available in both locations.

Each action shows a distinct success toast ("Copied message" / "Copied as JSON") so users know which copy succeeded.

I tried to switch from custom components and style overrides to mostly use the equivalent design system elements where possible.

Fixes LOGS-637

Made with Cursor

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 27, 2026
@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 27, 2026

Replace the single "Copy to clipboard" option in the log row ellipsis
dropdown with two distinct actions: "Copy message" (copies the cell
value) and "Copy as JSON" (copies the full log payload as formatted
JSON). The JSON option is always clickable and defers the copy until
data finishes loading if needed.

Also add a "Copy message" button alongside the existing "Copy as JSON"
button in the expanded row details view.

Refs LINEAR-LOGS-637
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>

Made-with: Cursor
@JoshuaKGoldberg JoshuaKGoldberg force-pushed the JoshuaKGoldberg/feat/logs-copy-message-and-json-actions branch from fe901d4 to ac1080c Compare March 27, 2026 19:19
}) {
const organization = useOrganization();
const {copy} = useCopyToClipboard();
const pendingCopyJsonRef = useRef(false);
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: this is... sus. I will take a deeper look on Monday.

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.

1 participant