Skip to content

Conversation

@AncD8972
Copy link

@AncD8972 AncD8972 commented Jan 7, 2026

Mirrored from ai-code-review-evaluation#5.

Test 5

armenzg and others added 30 commits June 20, 2025 12:49
…o 'low' (#93927)"

This reverts commit 8d04522.

Co-authored-by: roaga <[email protected]>
Missed in the initial commit, leading to some relevant logs being
unannotated.
We have had a few tasks get killed at 10% rollout.
Also add a test, so that this doesn't happen again
Fixes DE-129 and DE-156

---------

Co-authored-by: Cursor Agent <[email protected]>
These transitions should be matching
…` (#93946)

Use `project_id` on the replay record instead of the URL (where it does
not always exist).

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Also fixed `replay.view_html` -> `replay.view-html`

---------

Co-authored-by: Michelle Zhang <[email protected]>
…948)

gets `npx @typescript/native-preview` passing again
The conditions associated with a DCG can change over time, and it's good
if we can be completely confident that they're consistent within a given
task execution.
This is unused and most regex experiments have required broader changes
to ensure that regexes are evaluated in a specific order (ex:
traceparent). Removing this for now to simplify the code and very
slightly improve runtime performance.
From some testing (on feedback lists of all different lengths), this
prompt seems to work better. It doesn't write overly long sentences and
also does a better job at "summarizing" versus just mentioning a few
specific topics and leaving out others.
Just remove a couple custom Flex* classes in favor of the Flex primitive
This has been killed a few times.

Refs SENTRY-42M7
…n table (#93892)

<!-- Describe your PR here. -->

[ticket](https://linear.app/getsentry/issue/ID-156/grouping-info-remove-type-field-from-ui)
The Type field in the Grouping Info section of the issue details page
was redundant.
This removes the Type row from all variant types while keeping the
underlying data structure intact.

before
![Screenshot 2025-06-20 at 12 00
54 PM](https://github.com/user-attachments/assets/97ca72da-0a52-4446-9825-cd4fcb505adf)

after
![Screenshot 2025-06-20 at 11 59
29 AM](https://github.com/user-attachments/assets/a4284d2b-c9f5-442f-b010-7fe72a598e39)
### Changes
Related to this PR: getsentry/sentry#93810. This
is part 1 of the change, which is pulling out the new component and just
adding it to the repo. Also includes some simplification of the logic in
the base component.

Part 2 will be replacing tables in widgets.

### Before/After

There is no UI change as the table is not being used yet. There is a new
story page for the component.
…93943)

to prevent this issue from becoming too noisy, add a noise config
Unfortunately, 'event_data' went from being the variable for current
event context to being the complete parsed data from Redis, and we
continued logging it per group.
That's more data than we should be logging even arguably once, let alone
per group.
Adds some simple analytics to our endpoint so we can begin building a
dashboard in Amplitude.
Previously, explore supported multiple y axis per chart, so each
visualize supported multiple y axis. That functionality has since been
removed for simplicity so update the types here to match. Keep in mind
that saved queries still store them as an array so when
serializing/deserializing, we still need to treat it as an array.
We'll need the `useGetTraceItemAttributeKeys` hook in other places so
refactoring it so that it can exported.
mrduncan and others added 2 commits June 20, 2025 13:20
When the max segment ID is null the process fails. We should exit early
since if there aren't any segments to delete there's nothing to do.
const columnKey = String(column.key);
if (!tableData?.meta) {
return dataRow[column.key];
}
Copy link
Author

Choose a reason for hiding this comment

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

🔴 HIGH | static_defect

Type casting from TabularColumn to GridColumnOrder without proper type checking. This could cause runtime errors if the types are not compatible.

💡 Suggestion: Add proper type checking or use type-safe casting to ensure GridColumnOrder interface compatibility.

Suggested change
}
renderHeadCell: renderDefaultHeadCell({renderTableHeadCell}) as (
column: TabularColumn<keyof TabularRow>,
columnIndex: number
) => React.ReactNode,

<CellWrapper align={align}>
<StyledTooltip title={column.name}>{column.name}</StyledTooltip>
</CellWrapper>
);
Copy link
Author

Choose a reason for hiding this comment

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

🔴 HIGH | static_defect

Invalid CSS syntax for styled component. The CSS object has malformed property syntax with extra closing brace.

💡 Suggestion: Fix the CSS object syntax to remove the extra closing brace.

Suggested change
);
${(p: {align: Alignments}) => (p.align ? `text-align: ${p.align};` : '')}
`;

Comment on lines 89 to 91
const visualize = Visualize.fromJSON({
yAxes: ['count(span.duration)'],
});
Copy link
Author

Choose a reason for hiding this comment

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

🟡 MEDIUM | logic_defect

Test expectation mismatch: fromJSON returns an array but test expects a single Visualize object. This indicates either the test is wrong or the implementation has changed.

💡 Suggestion: Update the test to match the actual implementation that returns an array, or fix the implementation to return a single object if that's the intended behavior.

Suggested change
const visualize = Visualize.fromJSON({
yAxes: ['count(span.duration)'],
});
expect(visualize).toEqual([
new Visualize('count(span.duration)'),
]);

Comment on lines +89 to +100
const organization = useOrganization();

// Fallback to extracting fields from the tableData if no columns are provided
const columnOrder: TabularColumn[] =
columns ??
Object.keys(tableData?.meta.fields).map((key: string) => ({
key,
name: key,
width: -1,
type: tableData?.meta.fields[key],
}));

Copy link
Author

Choose a reason for hiding this comment

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

🟡 MEDIUM | static_defect

Function signature mismatch in renderDefaultBodyCell call. The function expects specific parameters but is being called with an object containing these parameters.

💡 Suggestion: Call the function directly with the required parameters instead of wrapping them in an object.

Suggested change
const organization = useOrganization();
// Fallback to extracting fields from the tableData if no columns are provided
const columnOrder: TabularColumn[] =
columns ??
Object.keys(tableData?.meta.fields).map((key: string) => ({
key,
name: key,
width: -1,
type: tableData?.meta.fields[key],
}));
renderBodyCell: renderDefaultBodyCell(
tableData,
location,
organization,
theme,
renderTableBodyCell
),


try {
result = await api.requestPromise(
`/organizations/${organization.slug}/trace-items/attributes/`,
Copy link
Author

Choose a reason for hiding this comment

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

🟡 MEDIUM | static_defect

Type casting without validation: result is cast as Tag[] but the API might return different data structure.

💡 Suggestion: Add proper type validation or handle potential type mismatches from the API response.

Suggested change
`/organizations/${organization.slug}/trace-items/attributes/`,
result = await api.requestPromise<Tag[]>(
`/organizations/${organization.slug}/trace-items/attributes/`,
{
method: 'GET',
query: options,
}
);

Copy link
Author

@AncD8972 AncD8972 left a comment

Choose a reason for hiding this comment

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

🤖 DiffCOT AI Code Review

This PR introduces several new features including AI-powered feedback summaries, table widget visualizations for dashboards, detector owner management in the workflow engine, and refactoring of the explore visualization components. The changes appear well-structured with proper error handling and comprehensive test coverage.

Assessment Score
⚠️ REQUEST_CHANGES 7/10

✅ Positive Aspects

  • Excellent test coverage for detector owner management including edge cases for invalid owners and owners not in organization
  • Good separation of concerns with the new TableWidgetVisualization component
  • Proper error handling and loading states in the feedback summary hooks
  • Clean refactoring of the trace item attribute keys into a reusable hook
  • Consistent use of TypeScript throughout the new components
  • Appropriate use of feature flags to gradually roll out new functionality

💡 Suggestions for Improvement

  • Consider adding error boundaries around the new TableWidgetVisualization to handle any rendering errors gracefully
  • Add integration tests to verify the complete workflow of detector owner updates
  • Document the API changes in the explore visualization module for other developers
  • Consider adding a fallback loading state for the feedback summary component when it takes longer than expected

🔍 Issues Found: 3

  • 🔴 High: 1
  • 🟡 Medium: 1
  • 🟢 Low: 1

See inline comments below for details.


Generated by DiffCOT AI Code Review

Comment on lines +165 to +175
<TableWidgetVisualization
columns={[]}
tableData={{
data: [],
meta: {
fields: {},
units: {},
},
}}
/>
) : (
Copy link
Author

Choose a reason for hiding this comment

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

🔴 HIGH | logic_defect

The TableWidgetVisualization is rendered with empty data when the feature flag is enabled, showing only placeholder content. This appears to be incomplete implementation that would show users an empty table instead of the expected data.

💡 Suggestion: Either implement the proper data transformation from tableResults to TabularData format, or conditionally render the old component until the new visualization is fully implemented.

Suggested change
<TableWidgetVisualization
columns={[]}
tableData={{
data: [],
meta: {
fields: {},
units: {},
},
}}
/>
) : (
{organization.features.includes('use-table-widget-visualization') ? (
<TableWidgetVisualization
columns={columns}
tableData={{
data: result.data,
meta: result.meta,
units: result.meta?.units || {},
}}
/>
) : (


it('converts from JSON with chart type', function () {
const visualize = Visualize.fromJSON({
yAxes: ['count(span.duration)'],
Copy link
Author

Choose a reason for hiding this comment

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

🟡 MEDIUM | static_defect

Test expects Visualize.fromJSON to return a single instance, but based on the test setup and other similar tests, it appears to return an array. This could cause test failures if the implementation is incorrect.

💡 Suggestion: Verify the actual implementation of Visualize.fromJSON and adjust the test expectation accordingly. If it returns an array, the test should expect an array.

Suggested change
yAxes: ['count(span.duration)'],
expect(visualize).toEqual(new Visualize('count(span.duration)'));

const newVisualizes = [...visualizes, new Visualize([DEFAULT_VISUALIZATION])].map(
const newVisualizes = [...visualizes, new Visualize(DEFAULT_VISUALIZATION)].map(
visualize => visualize.toJSON()
);
Copy link
Author

Choose a reason for hiding this comment

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

🟢 LOW | style

The deleteOverlay function signature changed from (group: number, index: number) to (group: number), but the implementation doesn't account for multiple yAxes per group anymore. This is a significant API change that should be documented.

💡 Suggestion: Add a comment explaining the API change from handling multiple yAxes per group to a single yAxis per group.

Suggested change
);
/**
* Delete overlay at the specified group index.
* Note: This replaces the previous multi-yAxis-per-group model with a single-yAxis-per-group model.
*/
const deleteOverlay = useCallback(
(group: number) => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.