-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
ref(slack): Compact Slack issue alert message layout #105994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
ref(slack): Compact Slack issue alert message layout #105994
Conversation
17702fa to
5f79552
Compare
Add tests for the slack-compact-alerts feature flag behavior: - Verify AI summary displays as "Initial Guess:" context block - Verify suggested assignees appear in compact format Also fix nested quote syntax error in get_issue_summary_text(). Refs ECO-1315 Co-Authored-By: Claude <[email protected]>
Store the feature flag result in an instance variable at the start of build() instead of checking it 8 times throughout the method. Also add a basic test for the compact layout without AI summary dependencies. Refs ECO-1315 Co-Authored-By: Claude <[email protected]>
The compact alerts refactor moved the action_text block from before the context block to after it. Update test assertions to use the correct block indices (blocks[2] -> blocks[3] for action_text). Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is very fragile, but would be a much bigger initiative to change for now, so I just resolved the indices. We were rendering the action_text block ('issue resolved by X') before the context on tags/counts -- when in reality it should be replacing the action block which is underneath it.
That correction, caused this rewrite :/
Add validation to prevent appending an empty context block when both get_context() returns empty and there are no suggested assignees. This mirrors the guard logic in the non-compact code path and prevents potential Slack API validation errors. Co-Authored-By: Claude <[email protected]>
Adds a slack-compact-alerts flag for the new alert layout. The compact layout won't affect most customers, key differences are
Hard to display all the differences without setting them up each feature and preventing race conditions (i.e. alert fires before suggested assignee is determined), so we can verify with tests and in production via the flag.