diff --git a/static/app/components/charts/releaseSeries.tsx b/static/app/components/charts/releaseSeries.tsx
index 10aeadc54cb4..16fe3333cd5f 100644
--- a/static/app/components/charts/releaseSeries.tsx
+++ b/static/app/components/charts/releaseSeries.tsx
@@ -36,7 +36,6 @@ type ReleaseConditions = {
environment: readonly string[];
project: readonly number[];
start: DateString;
- cursor?: string;
query?: string;
statsPeriod?: string | null;
};
diff --git a/static/app/components/core/form/field/meta.tsx b/static/app/components/core/form/field/meta.tsx
index 39d8c7ea050c..b29ac09b7bca 100644
--- a/static/app/components/core/form/field/meta.tsx
+++ b/static/app/components/core/form/field/meta.tsx
@@ -68,14 +68,12 @@ function Label(props: {
);
}
-function FieldStatus({disabled, error}: {disabled?: boolean | string; error?: string}) {
+function FieldStatus({disabled}: {disabled?: boolean | string}) {
const field = useFieldContext();
- const errorMessage =
- error ??
- (field.state.meta.isValid
- ? undefined
- : field.state.meta.errors.map((e: Error | undefined) => e?.message).join(','));
+ const errorMessage = field.state.meta.isValid
+ ? undefined
+ : field.state.meta.errors.map((e: Error | undefined) => e?.message).join(',');
if (errorMessage) {
return (
diff --git a/static/app/components/core/pagination/pagination.spec.tsx b/static/app/components/core/pagination/pagination.spec.tsx
index 07ec1f0ce346..b31ae1daef3f 100644
--- a/static/app/components/core/pagination/pagination.spec.tsx
+++ b/static/app/components/core/pagination/pagination.spec.tsx
@@ -95,17 +95,6 @@ describe('Pagination', () => {
expect(router.location.query).toEqual({foo: 'bar', cursor: '0:25:0'});
});
- it('uses the to prop to override the default pathname', async () => {
- const {router} = render(, {
- initialRouterConfig: {location: {pathname: '/items/'}},
- });
-
- await userEvent.click(screen.getByRole('button', {name: 'Next'}));
-
- expect(router.location.pathname).toBe('/other/');
- expect(router.location.query.cursor).toBe('0:25:0');
- });
-
it('calls custom onCursor with (cursor, path, query, delta)', async () => {
const onCursor = jest.fn();
render(, {
diff --git a/static/app/components/core/pagination/pagination.tsx b/static/app/components/core/pagination/pagination.tsx
index 63ebafe39c92..5894c483bac9 100644
--- a/static/app/components/core/pagination/pagination.tsx
+++ b/static/app/components/core/pagination/pagination.tsx
@@ -36,11 +36,9 @@ type Props = {
pageLinks?: string | null;
paginationAnalyticsEvent?: (direction: string) => void;
size?: ButtonProps['size'];
- to?: string;
};
export function Pagination({
- to,
className,
onCursor,
paginationAnalyticsEvent,
@@ -61,7 +59,7 @@ export function Pagination({
return null;
}
- const path = to ?? location.pathname;
+ const path = location.pathname;
const query = location.query;
const links = parseLinkHeader(pageLinks);
const previousDisabled = disabled || links.previous?.results === false;
diff --git a/static/app/components/issueDiff/index.spec.tsx b/static/app/components/issueDiff/index.spec.tsx
index f76bbf67c4fa..2077c922140b 100644
--- a/static/app/components/issueDiff/index.spec.tsx
+++ b/static/app/components/issueDiff/index.spec.tsx
@@ -50,7 +50,6 @@ describe('IssueDiff', () => {
);
diff --git a/static/app/components/issueDiff/index.tsx b/static/app/components/issueDiff/index.tsx
index 175ef63be4d6..8fae2a60f473 100644
--- a/static/app/components/issueDiff/index.tsx
+++ b/static/app/components/issueDiff/index.tsx
@@ -22,10 +22,7 @@ const SKELETON_ROW_COUNT = 8;
interface IssueDiffProps {
baseIssueId: string;
targetIssueId: string;
- baseEventId?: string;
hasSimilarityEmbeddingsProjectFeature?: boolean;
- shouldBeGrouped?: string;
- targetEventId?: string;
}
function getCombinedStacktrace({
@@ -57,10 +54,7 @@ function getCombinedStacktrace({
export function IssueDiff({
baseIssueId,
targetIssueId,
- baseEventId = 'latest',
- targetEventId = 'latest',
hasSimilarityEmbeddingsProjectFeature,
- shouldBeGrouped,
}: IssueDiffProps) {
const organization = useOrganization();
const location = useLocation();
@@ -77,28 +71,22 @@ export function IssueDiff({
apiOptions.as<{eventID: string}>()(
'/organizations/$organizationIdOrSlug/issues/$issueId/events/$eventId/',
{
- path:
- baseEventId === 'latest'
- ? {
- organizationIdOrSlug: organization.slug,
- issueId: baseIssueId,
- eventId: 'latest',
- }
- : skipToken,
+ path: {
+ organizationIdOrSlug: organization.slug,
+ issueId: baseIssueId,
+ eventId: 'latest',
+ },
staleTime: 60_000,
}
),
apiOptions.as<{eventID: string}>()(
'/organizations/$organizationIdOrSlug/issues/$issueId/events/$eventId/',
{
- path:
- targetEventId === 'latest'
- ? {
- organizationIdOrSlug: organization.slug,
- issueId: targetIssueId,
- eventId: 'latest',
- }
- : skipToken,
+ path: {
+ organizationIdOrSlug: organization.slug,
+ issueId: targetIssueId,
+ eventId: 'latest',
+ },
staleTime: 60_000,
}
),
@@ -106,10 +94,8 @@ export function IssueDiff({
});
// Derive resolved IDs reactively from the query results
- const resolvedBaseEventId =
- baseEventId === 'latest' ? baseLatestQuery.data?.eventID : baseEventId;
- const resolvedTargetEventId =
- targetEventId === 'latest' ? targetLatestQuery.data?.eventID : targetEventId;
+ const resolvedBaseEventId = baseLatestQuery.data?.eventID;
+ const resolvedTargetEventId = targetLatestQuery.data?.eventID;
// Fetch actual event data once IDs are resolved
const {
@@ -187,13 +173,11 @@ export function IssueDiff({
project_id: baseEventData?.projectID,
group_id: baseEventData?.groupID,
parent_group_id: targetEventData?.groupID,
- shouldBeGrouped,
});
}, [
baseEventData,
hasSimilarityEmbeddingsFeature,
organization,
- shouldBeGrouped,
targetEventData,
]);
@@ -215,7 +199,6 @@ export function IssueDiff({
LazyComponent={SplitDiffLazy}
base={combinedBase}
target={combinedTarget}
- type="lines"
loadingFallback={}
/>
diff --git a/static/app/components/splitDiff.tsx b/static/app/components/splitDiff.tsx
index c424a327645c..0d521f4111d3 100644
--- a/static/app/components/splitDiff.tsx
+++ b/static/app/components/splitDiff.tsx
@@ -1,12 +1,10 @@
import {useMemo} from 'react';
import styled from '@emotion/styled';
import type {Change} from 'diff';
-import {diffChars, diffLines, diffWords} from 'diff';
+import {diffLines, diffWords} from 'diff';
import {Container} from '@sentry/scraps/layout';
-import {unreachable} from 'sentry/utils/unreachable';
-
// @TODO(jonasbadalic): This used to be defined on the theme, but is component specific and lacks dark mode.
export const DIFF_COLORS = {
removedRow: 'hsl(358deg 89% 65% / 15%)',
@@ -19,7 +17,6 @@ type Props = {
base: string;
target: string;
className?: string;
- type?: 'lines' | 'words' | 'chars';
};
// this function splits the lines from diffLines into words that are diffed
@@ -48,25 +45,10 @@ function getDisplayData(
return diffWords(leftText, rightText);
}
-function SplitDiff({className, type = 'lines', base, target}: Props) {
+function SplitDiff({className, base, target}: Props) {
// split one change that includes multiple lines into one change per line (for formatting)
const groupedChanges = useMemo((): Change[][] => {
- let diffResults: Change[] | undefined;
- switch (type) {
- case 'lines':
- diffResults = diffLines(base, target, {newlineIsToken: true});
- break;
- case 'words':
- diffResults = diffWords(base, target);
- break;
- case 'chars':
- diffResults = diffChars(base, target);
- break;
- default:
- unreachable(type);
- break;
- }
- const results = diffResults ?? [];
+ const results = diffLines(base, target, {newlineIsToken: true});
let currentLine: Change[] = [];
const processedLines: Change[][] = [];