Skip to content

Add Block Kit layout to frontend-triage notifications - #6677

Open
suhaibmujahid wants to merge 1 commit into
slack-blocksfrom
slack-frontend-triage
Open

Add Block Kit layout to frontend-triage notifications#6677
suhaibmujahid wants to merge 1 commit into
slack-blocksfrom
slack-frontend-triage

Conversation

@suhaibmujahid

Copy link
Copy Markdown
Member

Resolves #6673

Refactors notification rendering into reusable helpers and adds build_blocks for richer Slack messages.


Stack created with GitHub Stacks CLIGive Feedback 💬

@suhaibmujahid
suhaibmujahid requested a review from a team as a code owner August 20, 2026 01:49
@suhaibmujahid
suhaibmujahid requested a review from a team as a code owner August 20, 2026 01:58
@suhaibmujahid
suhaibmujahid force-pushed the slack-frontend-triage branch from 9487ac3 to 61f1aec Compare August 20, 2026 01:58
Refactors notification rendering into reusable helpers and adds `build_blocks` for richer Slack messages.
@suhaibmujahid
suhaibmujahid force-pushed the slack-frontend-triage branch from 61f1aec to 24eaad0 Compare August 20, 2026 03:38
Copilot AI lite review requested due to automatic review settings August 20, 2026 03:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements Slack Block Kit formatting for the frontend-triage agent’s auto-apply notifications, improving readability while preserving the existing plain-text message as Slack’s fallback.

Changes:

  • Refactors notification rendering into small helpers (_bug_link, _summary, _is_urgent, field renderers).
  • Adds build_blocks(...) to generate a Block Kit layout (headline, optional fields grid, run context).
  • Updates notification recording and tests to ensure blocks is included and that Block Kit conveys at least the same facts/URLs as the fallback text.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
agents/frontend-triage/hackbot_agents/frontend_triage/notify.py Adds Block Kit block building and records Slack actions with both text and blocks.
agents/frontend-triage/tests/test_notify.py Extends tests to validate Block Kit structure and equivalence of conveyed facts vs fallback text.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@crythms

crythms commented Aug 20, 2026

Copy link
Copy Markdown
Member

@suhaibmujahid
#6679 and this PR conflict. I think #6679 would need to land first. it targets master directly while this sits on top of other unmerged PRs (#6674#6675#6676), and it changes whether the severity in these notifications was actually
applied to the bug.

#6679 removes the triage agent's ability to write severity to Bugzilla at all. Severity just becomes a suggestion in the triage comment, and is left out below medium confidence.

After #6679 lands, this would need a rebase plus a couple of changes:

  1. _severity_field adds the word "suggested" only when confidence is below high. That's right today, because a high-confidence severity really does get written to the bug. After Frontend triage severity as comment suggestion #6679 nothing is ever written, so a plain S3 would look like the bug was changed when it wasn't. The if could go and the label could say it instead -- *Suggested severity* with the level underneath, every time. The build_blocks headline has the same problem: it shows a bare *S1*.

  2. _is_urgent and _severity_field both ignore confidence. Frontend triage severity as comment suggestion #6679 only reports severity at high or medium (REPORTABLE_SEVERITY_CONFIDENCES in config.py), so these would need to match, otherwise Slack flags an S1 on a bug whose comment doesn't mention severity at all.

A few tests in this PR assume the old behaviour too, but those should fail loudly on the rebase so they're easy to spot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Slack Block Kit layout for frontend-triage agent messages

3 participants