Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b190242
feat(seer): Add Automations and Runs tabs to the Automations page
aliu39 Oct 23, 2026
61dac97
test(seer): Cover Automations page tabs and runs route
aliu39 Oct 23, 2026
13a5c27
feat(seer): Add placeholder automation cards to the Automations tab
aliu39 Oct 23, 2026
3d4bdef
ref(seer): Use small tabs and bold the active tab on the Automations …
aliu39 Oct 23, 2026
a14c4f5
feat(automations): Populate automation cards from workflow configs
aliu39 Oct 23, 2026
04296f7
ref(automations): Show sample projects on the Breached Metrics placeh…
aliu39 Oct 23, 2026
d91f280
ref(automations): List project slugs next to the project avatars
aliu39 Oct 23, 2026
11c1114
ref(automations): Adjust automation card spacing
aliu39 Oct 23, 2026
146f1ed
rename index components
aliu39 Oct 23, 2026
8bc6dc8
ref(automations): Make automation cards non-links and label the next-…
aliu39 Oct 23, 2026
b5334f5
ref(automations): Add Sentry icon after automation card titles
aliu39 Oct 23, 2026
747c5b0
test(automations): Cover the automation config list and next run times
aliu39 Oct 23, 2026
5423a78
Update index.spec.tsx
aliu39 Oct 23, 2026
ccb48d2
chore(codeowners): Assign owners for Seer workflows
aliu39 Oct 23, 2026
73b3cc7
Merge branch 'aliu/auto-ui0.2' of github.com:getsentry/sentry into al…
aliu39 Oct 23, 2026
090316a
test(automations): Flush pending timers in the runs spec teardown
aliu39 Oct 23, 2026
f75ff25
:hammer_and_wrench: apply pre-commit fixes
getsantry[bot] Oct 23, 2026
cf2c1b3
Merge branch 'aliu/auto-ui0.2' of github.com:getsentry/sentry into al…
aliu39 Oct 23, 2026
098afef
test(automations): Remove resolved runs spec suppression
aliu39 Oct 23, 2026
e8e921a
feat(automations): Show a Paused tag on disabled automation cards
aliu39 Oct 23, 2026
d574554
feat(automations): Highlight automation cards on hover
aliu39 Oct 23, 2026
7c98629
Merge branch 'master' into aliu/auto-ui0.2
aliu39 Oct 26, 2026
f5f95e5
rename dir
aliu39 Oct 26, 2026
3c4e647
fix import
aliu39 Oct 26, 2026
70431f4
Update index.spec.tsx
aliu39 Oct 26, 2026
45c77ba
Change AutomationsList to default export
aliu39 Oct 26, 2026
1a695af
feat(seer): Limit project slugs shown on automation cards
aliu39 Oct 26, 2026
2f126c9
Merge branch 'aliu/auto-ui0.2' of github.com:getsentry/sentry into al…
aliu39 Oct 26, 2026
f762374
ref(seer): Group usage line with automation card details
aliu39 Oct 26, 2026
1fd6f48
ref(automations): Pass a config to automation cards
aliu39 Oct 26, 2026
5f5b3e7
fix(seer-workflows): Translate run source labels
aliu39 Oct 26, 2026
7076a4a
Update index.tsx
aliu39 Oct 26, 2026
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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,8 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
/tests/sentry/middleware/test_viewer_context.py @getsentry/machine-learning-ai
/src/sentry/investigations/ @getsentry/machine-learning-ai @getsentry/agent-interfaces-sentry-backend
/tests/sentry/investigations/ @getsentry/machine-learning-ai @getsentry/agent-interfaces-sentry-backend
/src/sentry/seer/workflows/ @getsentry/machine-learning-ai @getsentry/agent-interfaces-sentry-backend
/tests/sentry/seer/workflows/ @getsentry/machine-learning-ai @getsentry/agent-interfaces-sentry-backend

## End of ML & AI

Expand Down Expand Up @@ -916,6 +918,7 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get

# Agent Interfaces
/static/app/views/investigations/ @getsentry/agent-interfaces-sentry-frontend
/static/app/views/seerWorkflows/ @getsentry/agent-interfaces-sentry-frontend
Comment thread
aliu39 marked this conversation as resolved.
/static/app/components/seer/ @getsentry/agent-interfaces-sentry-frontend
/static/app/components/prevent/ @getsentry/agent-interfaces-sentry-frontend
/static/app/views/prevent/ @getsentry/agent-interfaces-sentry-frontend
Expand Down
5 changes: 0 additions & 5 deletions static/app/oxlint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3129,11 +3129,6 @@
"count": 1
}
},
"views/seerWorkflows/index.spec.tsx": {
"@sentry/require-fake-timer-cleanup": {
"count": 2
}
},
"views/seerWorkflows/overview/index.spec.tsx": {
"@sentry/prefer-fake-timers": {
"count": 2
Expand Down
2 changes: 2 additions & 0 deletions static/app/router/routes.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ describe('buildRoutes()', () => {
it.each([
['/seer/automations/', 'automations/', true],
['/organizations/test-org/seer/automations/', 'automations/', false],
['/seer/automations/runs/', 'runs/', true],
['/organizations/test-org/seer/automations/runs/', 'runs/', false],
['/seer/investigations/', 'investigations/', true],
['/seer/investigations/investigation-1/', 'investigations/:investigationId/', true],
['/organizations/test-org/seer/investigations/', 'investigations/', false],
Expand Down
10 changes: 10 additions & 0 deletions static/app/router/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2746,6 +2746,16 @@ function buildRoutes(): RouteObject[] {
{
path: 'automations/',
component: make(() => import('sentry/views/seerWorkflows')),
children: [
{
index: true,
component: make(() => import('sentry/views/seerWorkflows/automations')),
},
{
path: 'runs/',
component: make(() => import('sentry/views/seerWorkflows/runs')),
},
],
},
];
const seerRoutes: SentryRouteObject = {
Expand Down
166 changes: 166 additions & 0 deletions static/app/views/seerWorkflows/automations/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
import {OrganizationFixture} from 'sentry-fixture/organization';
import {ProjectFixture} from 'sentry-fixture/project';

import {render, screen, within} from 'sentry-test/reactTestingLibrary';

import {ProjectsStore} from 'sentry/stores/projectsStore';
import AutomationsList, {getNextUpdate} from 'sentry/views/seerWorkflows/automations';
import type {SeerWorkflowConfigsResponse} from 'sentry/views/seerWorkflows/types';

type Config = SeerWorkflowConfigsResponse['configs'][number];

function makeConfig(overrides: Partial<Config>): Config {
return {
id: '1',
strategy: 'custom_strategy',
enabled: true,
schedule: 'weekly',
version: 1,
projects: [],
environments: [],
filters: {},
outputPolicy: {},
seededDefault: null,
dateAdded: '2026-10-01T00:00:00Z',
dateUpdated: '2026-10-01T00:00:00Z',
...overrides,
};
}

function getCard(title: string) {
return within(screen.getByRole('heading', {name: title}).closest('li')!);
}

describe('AutomationsList', () => {
const organization = OrganizationFixture({features: ['seer-automations']});
const configsUrl = `/organizations/${organization.slug}/seer/workflows/configs/`;

beforeEach(() => {
MockApiClient.clearMockResponses();
MockApiClient.addMockResponse({
url: `/organizations/${organization.slug}/projects/`,
body: [],
});
ProjectsStore.loadInitialData([
ProjectFixture({id: '1', slug: 'frontend'}),
ProjectFixture({id: '2', slug: 'backend'}),
]);
});

function mockConfigs(configs: Config[]) {
return MockApiClient.addMockResponse({url: configsUrl, body: {configs}});
}

it('only renders placeholders without seer-automations', async () => {
const request = mockConfigs([makeConfig({id: '1'})]);

render(<AutomationsList />, {organization: OrganizationFixture()});

expect(await screen.findAllByRole('listitem')).toHaveLength(2);
expect(request).not.toHaveBeenCalled();
});

it('renders a card per config after the placeholders', async () => {
mockConfigs([
makeConfig({id: '1', strategy: 'agentic_triage'}),
makeConfig({id: '2', strategy: 'custom_strategy'}),
]);

render(<AutomationsList />, {organization});

expect(
await screen.findByRole('heading', {name: 'Agentic triage'})
).toBeInTheDocument();
expect(screen.getAllByRole('listitem')).toHaveLength(4);
expect(
getCard('Agentic triage').getByText(
'Automatically triage and fix the most fixable Issues'
)
).toBeInTheDocument();
expect(getCard('custom_strategy').getByText('No description')).toBeInTheDocument();
});

it('shows which projects each config covers', async () => {
mockConfigs([
makeConfig({id: '1', strategy: 'all_strategy', projects: [-1]}),
makeConfig({id: '2', strategy: 'none_strategy', projects: []}),
makeConfig({id: '3', strategy: 'some_strategy', projects: [2, 99, 1]}),
]);

render(<AutomationsList />, {organization});

await screen.findByRole('heading', {name: 'some_strategy'});
expect(getCard('all_strategy').getByText('All projects')).toBeInTheDocument();
expect(getCard('none_strategy').getByText('No projects')).toBeInTheDocument();
expect(getCard('some_strategy').getByText('backend, frontend')).toBeInTheDocument();
});

it('shows a next run tag only for daily configs', async () => {
mockConfigs([
makeConfig({id: '1', strategy: 'daily_strategy', schedule: 'daily'}),
makeConfig({id: '2', strategy: 'weekly_strategy', schedule: 'weekly'}),
]);

render(<AutomationsList />, {organization});

await screen.findByRole('heading', {name: 'daily_strategy'});
expect(getCard('daily_strategy').getByText(/Next run/)).toBeInTheDocument();
expect(getCard('weekly_strategy').queryByText(/Next run/)).not.toBeInTheDocument();
});

it('shows a paused tag in place of the schedule for disabled configs', async () => {
mockConfigs([
makeConfig({
id: '1',
strategy: 'paused_strategy',
schedule: 'daily',
enabled: false,
}),
]);

render(<AutomationsList />, {organization});

await screen.findByRole('heading', {name: 'paused_strategy'});
expect(getCard('paused_strategy').getByText('Paused')).toBeInTheDocument();
expect(getCard('paused_strategy').queryByText(/Next run/)).not.toBeInTheDocument();
});
});

describe('getNextUpdate', () => {
afterEach(() => {
try {
jest.runOnlyPendingTimers();
} finally {
jest.useRealTimers();
}
});

it('returns undefined for schedules other than daily', () => {
jest.useFakeTimers({now: new Date('2026-10-23T09:00:00Z')});

expect(getNextUpdate('weekly')).toBeUndefined();
expect(getNextUpdate('')).toBeUndefined();
});

it.each([
['before 10:00', '2026-10-23T09:59:59Z', '2026-10-23T10:00:00.000Z'],
['at 10:00', '2026-10-23T10:00:00Z', '2026-10-23T22:00:00.000Z'],
['between 10:00 and 22:00', '2026-10-23T15:30:00Z', '2026-10-23T22:00:00.000Z'],
['at 22:00', '2026-10-23T22:00:00Z', '2026-10-24T10:00:00.000Z'],
['after 22:00', '2026-10-23T23:15:00Z', '2026-10-24T10:00:00.000Z'],
[
'after 22:00 at the end of a month',
'2026-10-31T23:00:00Z',
'2026-11-01T10:00:00.000Z',
],
[
'after 22:00 at the end of a year',
'2026-12-31T23:00:00Z',
'2027-01-01T10:00:00.000Z',
],
])('picks the next daily run %s UTC', (_, now, expected) => {
jest.useFakeTimers({now: new Date(now)});

expect(getNextUpdate('daily')?.toISOString()).toBe(expected);
});
});
Loading
Loading