Skip to content

Conversation

@leeandher
Copy link
Member

@leeandher leeandher commented Jan 9, 2026

Adds a slack-compact-alerts flag for the new alert layout. The compact layout won't affect most customers, key differences are

  • the AI summary is moved
  • title will not vary by your access to Seer
  • suggested assignee is moved to the context stats
  • suspect commit removed
image

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.

@linear
Copy link

linear bot commented Jan 9, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 9, 2026
@leeandher leeandher force-pushed the leander/eco-1315-improve-slack-issue-alert-message branch from 17702fa to 5f79552 Compare January 9, 2026 16:37
leeandher and others added 2 commits January 9, 2026 11:48
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]>
Copy link
Member Author

@leeandher leeandher Jan 9, 2026

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 :/

@leeandher leeandher marked this pull request as ready for review January 9, 2026 18:38
@leeandher leeandher requested review from a team as code owners January 9, 2026 18:38
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants