Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/lint-fix/references/fix-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Load this reference when fixing violations of a specific `@sentry/scraps` rule.

**Has autofix**: No.

**What the rule enforces**: Imports from `utils/theme/scraps` are only allowed in the designated theme directory.
**What the rule enforces**: Imports from `@sentry/scraps/tokens` (and its subpaths) are only allowed in the scraps theme and tokens directories.

**Manual fix**: Move the token usage to a component that accesses tokens via `theme.tokens.*` through `useTheme()` or styled-component theme callback, rather than importing raw token values directly.

Expand Down
1 change: 1 addition & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ const config = defineConfig({
'**/dist/**/*',
'tests/**/fixtures/**/*',
'!tests/js/**/*',
'static/oxlint/**/fixtures/**/*',
'**/vendor/**/*',
'build-utils/**/*',
'config/chartcuterie/config.js',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {IconClose} from '@sentry/icons/close';

import {useArithmeticBuilder} from 'sentry/components/arithmeticBuilder/context';
import type {Token} from 'sentry/components/arithmeticBuilder/token';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {defined} from 'sentry/utils/defined';

interface DeleteButtonProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type {FrameSourceMapDebuggerData} from 'sentry/components/events/interfac
import {SourceMapsDebuggerModal} from 'sentry/components/events/interfaces/sourceMapsDebuggerModal';
import {useStacktraceContext} from 'sentry/components/events/interfaces/stackTraceContext';
import {getThreadById} from 'sentry/components/events/interfaces/utils';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {StrictClick} from 'sentry/components/strictClick';
import {t, tn} from 'sentry/locale';
import type {Event, Frame} from 'sentry/types/event';
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/events/interfaces/nativeFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {Tooltip} from '@sentry/scraps/tooltip';

import {ErrorBoundary} from 'sentry/components/errorBoundary';
import {AnnotatedText} from 'sentry/components/events/meta/annotatedText';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {StrictClick} from 'sentry/components/strictClick';
import {SLOW_TOOLTIP_DELAY} from 'sentry/constants';
import {t, tn} from 'sentry/locale';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {IconChevron} from '@sentry/icons/chevron';

import {Flex, Stack} from '@sentry/scraps/layout';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {t} from 'sentry/locale';
import {useSyncedLocalStorageState} from 'sentry/utils/useSyncedLocalStorageState';

Expand Down
2 changes: 1 addition & 1 deletion static/app/components/feedback/list/feedbackListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Link} from '@sentry/scraps/link';
import {Tooltip} from '@sentry/scraps/tooltip';

import ProjectBadge from 'sentry/components/idBadge/projectBadge';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {TextOverflow} from 'sentry/components/textOverflow';
import {TimeSince} from 'sentry/components/timeSince';
import {UnreadIndicator} from 'sentry/components/unreadIndicator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {ExternalLink} from '@sentry/scraps/link';
import {Text} from '@sentry/scraps/text';
import {Tooltip} from '@sentry/scraps/tooltip';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {t} from 'sentry/locale';

import type {GroupIntegrationIssueResult} from './hooks/types';
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/interactionStateLayer/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {InteractionStateLayer as default} from './interactionStateLayer';
export {InteractionStateLayer} from './interactionStateLayer';
2 changes: 1 addition & 1 deletion static/app/components/onboardingWizard/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {Text} from '@sentry/scraps/text';
import {Tooltip} from '@sentry/scraps/tooltip';

import {navigateTo} from 'sentry/actionCreators/navigation';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {useMutateOnboardingTasks} from 'sentry/components/onboarding/useMutateOnboardingTasks';
import {ProgressRing} from 'sentry/components/progressRing';
import {t, tct} from 'sentry/locale';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Flex, Stack} from '@sentry/scraps/layout';
import type {TableColumnConfig} from '@sentry/scraps/table';
import {Text} from '@sentry/scraps/text';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {SimpleTable} from 'sentry/components/tables/simpleTable';
import {TimeSince} from 'sentry/components/timeSince';
import {t} from 'sentry/locale';
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/preprod/preprodBuildsTableCommon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {Container, Flex, Stack} from '@sentry/scraps/layout';
import {Text} from '@sentry/scraps/text';
import {Tooltip} from '@sentry/scraps/tooltip';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {SimpleTable} from 'sentry/components/tables/simpleTable';
import {TimeSince} from 'sentry/components/timeSince';
import {t, tn} from 'sentry/locale';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {ProjectAvatar, UserAvatar} from '@sentry/scraps/avatar';
import {Container, Flex, Stack} from '@sentry/scraps/layout';
import {Text} from '@sentry/scraps/text';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {TimeSince} from 'sentry/components/timeSince';
import {t} from 'sentry/locale';
import {getShortEventId} from 'sentry/utils/events';
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/replays/table/replayTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {Query} from 'history';
import {Alert} from '@sentry/scraps/alert';
import {Pagination} from '@sentry/scraps/pagination';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {SimpleTable} from 'sentry/components/tables/simpleTable';
import {t} from 'sentry/locale';
import type {Sort} from 'sentry/utils/discover/fields';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IconClose} from '@sentry/icons/close';

import {CompactSelect} from '@sentry/scraps/compactSelect';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {
useSearchQueryBuilderConfig,
useSearchQueryBuilderState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {ListState} from '@react-stately/list';
import type {Node} from '@react-types/shared';
import {IconClose} from '@sentry/icons/close';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {useSearchQueryBuilderState} from 'sentry/components/searchQueryBuilder/context';
import {useQueryBuilderGridItem} from 'sentry/components/searchQueryBuilder/hooks/useQueryBuilderGridItem';
import type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {mergeProps} from '@react-aria/utils';
import type {ListState} from '@react-stately/list';
import type {Node} from '@react-types/shared';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {
useSearchQueryBuilderConfig,
useSearchQueryBuilderState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {ListState} from '@react-stately/list';
import type {Node} from '@react-types/shared';
import {IconClose} from '@sentry/icons/close';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {
useSearchQueryBuilderConfig,
useSearchQueryBuilderLayout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {mergeProps} from '@react-aria/utils';
import type {ListState} from '@react-stately/list';
import type {Node} from '@react-types/shared';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {useSearchQueryBuilderConfig} from 'sentry/components/searchQueryBuilder/context';
import {
Token,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {Node} from '@react-types/shared';

import {CompactSelect} from '@sentry/scraps/compactSelect';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {
useSearchQueryBuilderConfig,
useSearchQueryBuilderState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {Container, Flex} from '@sentry/scraps/layout';
import {Overlay} from '@sentry/scraps/overlay';

import {FeedbackButton} from 'sentry/components/feedbackButton/feedbackButton';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {AskSeerSetupLoading} from 'sentry/components/searchQueryBuilder/askSeer/askSeerSetupLoading';
import {OpenAskSeerButton} from 'sentry/components/searchQueryBuilder/askSeer/openAskSeerButton';
import {
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/stream/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {AssigneeSelector} from 'sentry/components/group/assigneeSelector';
import {getBadgeProperties} from 'sentry/components/group/inboxBadges/statusBadge';
import {GroupHeaderRow} from 'sentry/components/groupHeaderRow';
import {GroupMetaRow} from 'sentry/components/groupMetaRow';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import type {GroupListColumn} from 'sentry/components/issues/groupList';
import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters';
import {Placeholder} from 'sentry/components/placeholder';
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/tables/dataGrid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
type TableColumnConfig,
} from '@sentry/scraps/table';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {SimpleTable} from 'sentry/components/tables/simpleTable';
import {t} from 'sentry/locale';
import {onRenderCallback, Profiler} from 'sentry/utils/performanceForSentry';
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/tables/simpleTable/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import moment from 'moment-timezone';
import {Link} from '@sentry/scraps/link';
import type {TableColumnConfig} from '@sentry/scraps/table';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {SimpleTable} from 'sentry/components/tables/simpleTable';
import {TimeAgoCell} from 'sentry/components/workflowEngine/gridCell/timeAgoCell';
import {t} from 'sentry/locale';
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/tables/simpleTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {Flex, type FlexProps} from '@sentry/scraps/layout';
import {PanelProvider} from '@sentry/scraps/panelProvider';
import {fullWidthCellStyle, Table, type TableColumnConfig} from '@sentry/scraps/table';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {
type ColumnAlign,
HeaderCellContent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {ListState} from '@react-stately/list';
import type {Node} from '@react-types/shared';
import {IconClose} from '@sentry/icons/close';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {useGridListItem} from 'sentry/components/tokenizedInput/grid/useGridListItem';
import {focusTarget} from 'sentry/components/tokenizedInput/grid/utils';
import {t} from 'sentry/locale';
Expand Down
18 changes: 18 additions & 0 deletions static/app/oxlint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@
"count": 3
}
},
"components/core/form/field/rangeField.spec.tsx": {
"@sentry/prefer-fake-timers": {
"count": 1
}
},
"components/core/relativeTime/relativeTime.spec.tsx": {
"@sentry/require-fake-timer-cleanup": {
"count": 1
Expand Down Expand Up @@ -2679,6 +2684,16 @@
"count": 1
}
},
"views/detectors/detectorNewSettings.spec.tsx": {
"@sentry/prefer-fake-timers": {
"count": 1
}
},
"views/detectors/hooks/useDetectorStatsPeriods.spec.tsx": {
"@sentry/prefer-fake-timers": {
"count": 5
}
},
"views/discover/eventDetails.tsx": {
"@sentry/scraps/prefer-primitives": {
"count": 1
Expand Down Expand Up @@ -2887,6 +2902,9 @@
}
},
"views/explore/logs/tables/logsInfiniteTable.spec.tsx": {
"@sentry/prefer-fake-timers": {
"count": 1
},
"@sentry/require-fake-timer-cleanup": {
"count": 1
}
Expand Down
4 changes: 2 additions & 2 deletions static/app/views/automations/components/actions/slack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ export function SlackDetails({
logo: ActionMetadata[ActionType.SLACK]?.icon,
workspace: integrationName,
channel: action.config.targetDisplay || action.config.targetIdentifier,
tagsAndNotes: SlackTagsAndNotes(action),
tagsAndNotes: <SlackTagsAndNotes action={action} />,
}
);
}

function SlackTagsAndNotes(action: Action) {
function SlackTagsAndNotes({action}: {action: Action}) {
const notes = action.data.notes;
const tags = action.data.tags;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styled from '@emotion/styled';
import {Stack} from '@sentry/scraps/layout';

import {Hovercard} from 'sentry/components/hovercard';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {LoadingError} from 'sentry/components/loadingError';
import {Placeholder} from 'sentry/components/placeholder';
import {EmptyCell} from 'sentry/components/workflowEngine/gridCell/emptyCell';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,37 +378,37 @@ export function SelectRow({
return columnOptionsWithSearched;
}, [columnValue, columnOptionsWithSearched]);

const applySpansConditionalFilter = useCallback(
(nextField: QueryFieldValue, nextAggregateName: string): QueryFieldValue => {
if (!isSpansDataset || nextField.kind !== FieldValueKind.FUNCTION) {
return nextField;
}
const existingFilter = conditionalAggregate?.filter;
const filter = supportsConditionalAggregateFilter(nextAggregateName)
? (existingFilter ?? '')
: '';
if (!filter && existingFilter === undefined) {
return nextField;
}
// Rebuild from the base aggregate so we do not keep a leftover `_if` name
// or a search-filter argument in the column slot.
const baseField: QueryFieldValue = {
kind: FieldValueKind.FUNCTION,
function: [
nextAggregateName as AggregationKeyWithAlias,
nextField.function[1] ?? '',
nextField.function[2],
nextField.function[3],
],
alias: nextField.alias,
};
return explodeFieldString(
applyConditionalFilter(generateFieldAsString(baseField), filter),
nextField.alias
);
},
[conditionalAggregate?.filter, isSpansDataset]
);
const applySpansConditionalFilter = (
nextField: QueryFieldValue,
nextAggregateName: string
): QueryFieldValue => {
if (!isSpansDataset || nextField.kind !== FieldValueKind.FUNCTION) {
return nextField;
}
const existingFilter = conditionalAggregate?.filter;
const filter = supportsConditionalAggregateFilter(nextAggregateName)
? (existingFilter ?? '')
: '';
if (!filter && existingFilter === undefined) {
return nextField;
}
// Rebuild from the base aggregate so we do not keep a leftover `_if` name
// or a search-filter argument in the column slot.
const baseField: QueryFieldValue = {
kind: FieldValueKind.FUNCTION,
function: [
nextAggregateName as AggregationKeyWithAlias,
nextField.function[1] ?? '',
nextField.function[2],
nextField.function[3],
],
alias: nextField.alias,
};
return explodeFieldString(
applyConditionalFilter(generateFieldAsString(baseField), filter),
nextField.alias
);
};

const handleFilterSearch = useCallback(
(filter: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {Stack} from '@sentry/scraps/layout';
import {Link} from '@sentry/scraps/link';

import {Hovercard} from 'sentry/components/hovercard';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {LoadingError} from 'sentry/components/loadingError';
import {Placeholder} from 'sentry/components/placeholder';
import {EmptyCell} from 'sentry/components/workflowEngine/gridCell/emptyCell';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {Link} from '@sentry/scraps/link';

import {AnalyticsArea} from 'sentry/components/analyticsArea';
import {EmptyStateWarning} from 'sentry/components/emptyStateWarning';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {LoadingIndicator} from 'sentry/components/loadingIndicator';
import {ReplayBadge} from 'sentry/components/replays/replayBadge';
import {t} from 'sentry/locale';
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/inbox/inboxItemList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {OverlayTrigger} from '@sentry/scraps/overlayTrigger';
import {Text} from '@sentry/scraps/text';
import {toast} from '@sentry/scraps/toast';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {TimeSince} from 'sentry/components/timeSince';
import {UnreadIndicator} from 'sentry/components/unreadIndicator';
import {t} from 'sentry/locale';
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/issueList/newViewEmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {useQueryState} from 'nuqs';

import {Stack} from '@sentry/scraps/layout';

import InteractionStateLayer from 'sentry/components/interactionStateLayer';
import {InteractionStateLayer} from 'sentry/components/interactionStateLayer';
import {Panel} from 'sentry/components/panels/panel';
import {ProvidedFormattedQuery} from 'sentry/components/searchQueryBuilder/formattedQuery';
import {t} from 'sentry/locale';
Expand Down
Loading
Loading