Skip to content

Conversation

Zylphrex
Copy link
Member

@Zylphrex Zylphrex commented Oct 7, 2025

No description provided.

@Zylphrex Zylphrex requested a review from a team as a code owner October 7, 2025 21:48
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 7, 2025
});

act(() => setSortBys([{field: 'max(span.duration)', kind: 'desc'}]));
act(() => setAggregateSortBys([{field: 'max(span.duration)', kind: 'desc'}]));
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Aggregate Tests Use Incorrect Sort Method

Several aggregate mode tests incorrectly use setSortBys to update sort parameters. After recent changes, setSortBys now controls sample sorts, so these tests should instead call setAggregateSortBys to update the correct state.

Additional Locations (3)

Fix in Cursor Fix in Web

: writableQueryParams.sortBys?.map(
sort => `${sort.kind === 'desc' ? '-' : ''}${sort.field}`
)
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Query Parameters Handle Nulls and Undefines Differently

The sortBys and aggregateSortBys query parameter updates might handle null and undefined inputs inconsistently. While null inputs explicitly result in null, undefined inputs would pass through optional chaining (?.map()) and yield undefined for updateNullableLocation, potentially causing unexpected behavior.

Additional Locations (1)

Fix in Cursor Fix in Web

const [sorts, setSorts] =
mode === Mode.SAMPLES
? [sampleSortBys, setSampleSortBys]
: [aggregateSortBys, setAggregateSortBys];
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Stale State in Conditional Variable Assignment

The conditional assignment of sorts and setSorts based on mode means these variables don't update when mode changes. This can lead to incorrect sorting behavior or stale state being used in the component.

Fix in Cursor Fix in Web

@Zylphrex Zylphrex merged commit 470ac44 into master Oct 8, 2025
47 checks passed
@Zylphrex Zylphrex deleted the txiao/chore/migrate-explore-traces-to-use-query-params-for-sorts branch October 8, 2025 14:02
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