Skip to content
Merged
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
7 changes: 5 additions & 2 deletions static/app/views/seerWorkflows/overview/sectionIssueCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ function HydratedCard({
// endpoint omits issue.autofix_state, so we reconstruct it from enrichment.
sectionKey?: AutofixStateKey;
}) {
const {run, state, enrichmentPending} = useIssueAutofixEnrichment(issue.id);
const row = buildOverviewRow(issue, run, state, enrichmentPending, statsPeriod);
const {run, state, statePending, enrichmentPending} = useIssueAutofixEnrichment(
issue.id
);
const classificationPending = sectionKey ? statePending : enrichmentPending;
const row = buildOverviewRow(issue, run, state, classificationPending, statsPeriod);
const resolvedSectionKey = sectionKey ?? deriveSectionKey(run, state);
const minHeight = enrichmentPending
? `${view === 'cards' ? CARD_PLACEHOLDER_HEIGHT : TABLE_ROW_PLACEHOLDER_HEIGHT}px`
Expand Down
5 changes: 4 additions & 1 deletion static/app/views/seerWorkflows/overview/sectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {LoadingIndicator} from 'sentry/components/loadingIndicator';
import {Sticky} from 'sentry/components/sticky';
import {t} from 'sentry/locale';
import {useOrganization} from 'sentry/utils/useOrganization';
import {useProjects} from 'sentry/utils/useProjects';

import {DEFAULT_STATS_PERIOD} from './periods';
import {SectionIssueCard} from './sectionIssueCard';
Expand Down Expand Up @@ -43,6 +44,7 @@ export function SectionList({
view: OverviewView;
}) {
const organization = useOrganization();
const {projects: orgProjects} = useProjects();
const {sections, isPending, isError, refetch} = useAutofixSections({
enabled,
projects,
Expand All @@ -54,7 +56,8 @@ export function SectionList({
const allSectionsEmpty = sections.every(
section => !section.isPending && !section.isError && section.issues.length === 0
);
const hasNonDefaultFilters = projects.length > 0 || period !== DEFAULT_STATS_PERIOD;
const hasProjectFilter = projects.length > 0 && orgProjects.length > 1;
const hasNonDefaultFilters = hasProjectFilter || period !== DEFAULT_STATS_PERIOD;
Comment thread
NicoHinderling marked this conversation as resolved.

if (isError) {
return <LoadingError onRetry={refetch} />;
Expand Down
Loading