Skip to content

feat(aci): Send project slug with test fire action request#113127

Merged
malwilley merged 3 commits intomasterfrom
malwilley/test-project-slug
Apr 15, 2026
Merged

feat(aci): Send project slug with test fire action request#113127
malwilley merged 3 commits intomasterfrom
malwilley/test-project-slug

Conversation

@malwilley
Copy link
Copy Markdown
Member

Closes ISWF-2436

This is the frontend follow-up to #112859, which added projectSlug support to the test fire action endpoint. This PR selects a connected project to pass for that value by adding useTestNotificationProjectSlug() and a test. While doing so, I extracted ActionFilterBlock into its own file since it was getting kinda big.

Tested it out and it works as expected. Before it selected the alphabetical first project, now it selects the one that's connected:

CleanShot 2026-04-15 at 15 03 34@2x

The test notification endpoint accepts an optional projectSlug to
control which project is shown in the notification. This picks a
project from the connected monitors that the user has access to,
so the test notification displays a relevant project instead of an
arbitrary one.

Also extracts ActionFilterBlock into its own file for clarity.
@malwilley malwilley requested a review from a team as a code owner April 15, 2026 22:04
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 15, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 15, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b589ff9. Configure here.

Comment thread static/app/views/automations/components/actionFilterBlock.tsx Outdated
Copy link
Copy Markdown
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

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

just nits / questions.

Comment thread static/app/views/automations/components/actionFilterBlock.tsx Outdated
minHeight: '21px',
height: '21px',
}),
}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just curious - if we're using styled on this component already, why are we inlining here? because the hardcoded 21px?

Comment on lines +99 to +100
minHeight: '21px',
height: '21px',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

more of a general question; should try adding anything to the style guide that's close to these values?

i think 24 would probably be a decent value for these (if it still looks okay). that's be our base font size + 1/2 of base size.

... or should we just use 1.5rems here and kinda sorta align to the style guide? 🤔

not sure if it'd look off with the current design tho; but might be cool to use rems (if it's not an anti-pattern for us).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah we probably should, I think the reason these overrides exist is because our form designs don't match some of the common form components that we have, though I'm hoping that it will be a bit better with the headless form hooks we have now

Comment on lines +179 to +202
const IfThenWrapper = styled(Flex)`
position: relative;
flex-direction: column;
gap: ${p => p.theme.space.md};
border: 1px solid ${p => p.theme.tokens.border.primary};
border-radius: ${p => p.theme.radius.md};
padding: ${p => p.theme.space.lg};
margin-top: ${p => p.theme.space.md};

/* Only hide delete button when hover is supported */
@media (hover: hover) {
&:not(:hover):not(:focus-within) {
.delete-condition-group {
${p => p.theme.visuallyHidden}
}
}
}
`;

const DeleteButton = styled(Button)`
position: absolute;
top: ${p => p.theme.space.sm};
right: ${p => p.theme.space.sm};
`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
const IfThenWrapper = styled(Flex)`
position: relative;
flex-direction: column;
gap: ${p => p.theme.space.md};
border: 1px solid ${p => p.theme.tokens.border.primary};
border-radius: ${p => p.theme.radius.md};
padding: ${p => p.theme.space.lg};
margin-top: ${p => p.theme.space.md};
/* Only hide delete button when hover is supported */
@media (hover: hover) {
&:not(:hover):not(:focus-within) {
.delete-condition-group {
${p => p.theme.visuallyHidden}
}
}
}
`;
const DeleteButton = styled(Button)`
position: absolute;
top: ${p => p.theme.space.sm};
right: ${p => p.theme.space.sm};
`;
const DeleteButton = styled(Button)`
position: absolute;
top: ${p => p.theme.space.sm};
right: ${p => p.theme.space.sm};
`;
const IfThenWrapper = styled(Flex)`
position: relative;
flex-direction: column;
gap: ${p => p.theme.space.md};
border: 1px solid ${p => p.theme.tokens.border.primary};
border-radius: ${p => p.theme.radius.md};
padding: ${p => p.theme.space.lg};
margin-top: ${p => p.theme.space.md};
/* Only hide delete button when hover is supported */
@media (hover: hover) {
&:not(:hover):not(:focus-within) {
${DeleteButton} {
${p => p.theme.visuallyHidden}
}
}
}
`;

Could you do something like this then remove the className or are we trying to use that more to migrate away from styled components?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes it could certainly be written that way! There isn't much of a concerted effort right now to do one or the other, but we have discussed that targeting classnames or data attributes is probably better to make the future migration easier

@malwilley malwilley merged commit 06a3ce4 into master Apr 15, 2026
65 checks passed
@malwilley malwilley deleted the malwilley/test-project-slug branch April 15, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants