diff --git a/ai/overview.md b/ai/overview.md index 6bc1a7b6..f82504d6 100644 --- a/ai/overview.md +++ b/ai/overview.md @@ -33,6 +33,7 @@ Every entry point below delivers this same context - they differ in where you ar | [MCP Server](mcp-server.md) | Any MCP-capable agent | Agents querying runs, tests, and analytics on demand; autonomous troubleshooting | | [IDE Extension](ide-extension.md) | VS Code, Cursor, compatible forks | Debugging CI failures without leaving the editor | | [Fix with AI](overview.md#fix-with-ai-from-the-dashboard) | Currents dashboard | Handing a failure to an agent while triaging a run | +| [Slack Fix with AI](../resources/integrations/slack/slack-app.md#fix-with-ai) | Slack | Handing a failed-test notification to an agent from a team channel | | [Playwright Skill](agent-skill-playwright-best-practices.md) | Claude Code, Cursor, other agents | Teaching agents how to write and fix Playwright tests correctly | | [n8n](../resources/integrations/n8n.md) | n8n workflows | Automated triage, notifications, and agent pipelines without code | @@ -84,6 +85,10 @@ You can copy the prompt to your clipboard for any agent, or open it directly in This is the bridge from investigation to action: whoever is looking at the failing run - not necessarily the person with the repo open - can package the failure with its full context and route it to an agent in one click. +### Fix with AI from Slack + +Failed-test notifications from the [Slack App](../resources/integrations/slack/slack-app.md#fix-with-ai) include a **Fix with AI** button. The modal can open the failure in Cursor or GitHub Copilot, provide a copyable prompt for Claude, Codex, Zed, Conductor, and other tools, and link to the Currents MCP installation. This lets anyone monitoring a team channel route a failure to an agent without first opening the Currents dashboard. + ### Playwright Skill Context tells an agent _what_ failed; the [Playwright Best Practices skill](agent-skill-playwright-best-practices.md) tells it _how_ to fix it well. It's an [Agent Skill](https://agentskills.io/home) - an open standard supported by Claude Code, Cursor, VS Code, and others - that packages expert Playwright knowledge: locator strategy, web-first assertions, debugging flaky tests, CI configuration, and more. @@ -106,12 +111,6 @@ The [n8n integration](../resources/integrations/n8n.md) connects Currents to mor Combined with [HTTP webhooks](../resources/integrations/http-webhooks.md) as a trigger, this covers the fully autonomous end of the spectrum - no editor, no dashboard, just test results flowing into whatever process you define. -## Coming up - -### Slack - -**Fix with AI** is coming to the [Slack integration](../resources/integrations/slack/): failed-test notifications will include a Fix with AI button that opens one-click deep links to AI coding tools, plus a copyable prompt for everything else - prefilled with the same enriched failure context and MCP identifiers as the dashboard and IDE actions. A failure lands in your team channel, and anyone in the thread can route it to an agent without opening the dashboard first. - ## Combining entry points These methods compose - most teams end up using several: diff --git a/dashboard/automated-reports.md b/dashboard/automated-reports.md index b8144798..a66412f1 100644 --- a/dashboard/automated-reports.md +++ b/dashboard/automated-reports.md @@ -68,8 +68,27 @@ Configure the settings and enable the automated report: 9. Use **Preview** to examine and change the report settings. +### Send automated reports to Slack (Slack App) + +Projects with the [Slack App](../resources/integrations/slack/slack-app.md) connected at the organization level can deliver the same scheduled report to Slack channels. + +On the report customization page: + +1. Enable the report and configure label, filters, lookback period, and schedule as for email. +2. In the report **Slack** settings, enable **Send to Slack**. +3. Select the Slack channel or channels that should receive the report. The Currents app must be able to post in each channel (invite the app to private channels if needed). +4. Save the report. Email recipients and Slack channels can be used together or independently. + +At the scheduled time, Currents posts a Block Kit summary to each selected channel, with links to the full report in the dashboard. Message content matches the report’s filters and period; it is a channel-friendly summary rather than a copy of the HTML email. + +For prerequisites, channel selection, and troubleshooting, see [Automated Reports to Slack](../resources/integrations/slack/slack-app.md#automated-reports-to-slack). + ### Forward automated reports email to Slack +{% hint style="info" %} +**Recommendation:** When the organization uses the Currents Slack App, prefer [native Slack delivery](#send-automated-reports-to-slack-slack-app) on the report instead of forwarding email. Native delivery posts structured Block Kit messages and does not depend on Slack inbound email addresses. +{% endhint %} + Slack currently allows receiving emails in a Slack channel or private message. Slack generates an email where the automated reports will be sent and that must be registered in the dashboard. Slack then receives the email and forwards the email to the previously setup channel. diff --git a/guides/currents-actions/lifecycle-notifications.md b/guides/currents-actions/lifecycle-notifications.md index 754156c3..6a38f2c8 100644 --- a/guides/currents-actions/lifecycle-notifications.md +++ b/guides/currents-actions/lifecycle-notifications.md @@ -23,7 +23,7 @@ Enabling Slack notifications requires two steps: 1. **Connect Slack to the organization** following the [#installation](../../resources/integrations/slack/slack-app.md#installation "mention"). {% hint style="info" %} -Note that this OAuth flow requires an organization administrator. +A **Currents organization administrator** must connect, re-authenticate, or disconnect the integration. A **Slack administrator** must authorize the app; the exact required Slack role depends on whether the account uses a single workspace or Enterprise Grid. {% endhint %}

Missing Slack App installation

@@ -37,7 +37,7 @@ Connecting Slack under Integrations alone does not enable notifications — they

Slack channel configuration

-Once Slack is connected, anyone with **Actions Admin** access can configure the channel and events. If the Slack option is unavailable, an organization administrator must complete the Integrations setup first. +Once Slack is connected, anyone with **Actions Admin** access can configure the channel and events. If the Slack option is unavailable, a Currents organization administrator must complete the Integrations setup first. #### Email diff --git a/resources/data-privacy/access-to-customer-data.md b/resources/data-privacy/access-to-customer-data.md index 3d1c80cd..4f3377b0 100644 --- a/resources/data-privacy/access-to-customer-data.md +++ b/resources/data-privacy/access-to-customer-data.md @@ -52,4 +52,5 @@ We collect diverse data from our users' test suites, which are strictly limited * **GitHub**: No access to data or repos source code; we post comments and status check updates for Pull Requests. The integration application is listed here: [https://github.com/apps/currents-bot](https://github.com/apps/currents-bot), and the list of permissions appears as part of the setup. * **GitLab**: We list repositories and projects, refresh oAuth tokens, post notes and status check updates to Merge Requests, fetching Merge Request details. * **BitBucket**: No access to data; we only post status check updates for Pull Requests. -* **Microsoft Teams, Slack**: No access to data, just posting messages within the restrictions of the platform's rules. +* **Microsoft Teams**: Currents posts messages within the restrictions of the platform's rules. +* **Slack**: The Slack App lists accessible channels; reads workspace, user, email, and user-group metadata; posts messages and thread replies; sends direct installation and re-authentication messages; and processes supported Slack interactions and message metadata. Access is limited by the OAuth permissions approved during installation and Slack channel-membership rules. diff --git a/resources/integrations/slack/README.md b/resources/integrations/slack/README.md index 741e5760..8e7449d2 100644 --- a/resources/integrations/slack/README.md +++ b/resources/integrations/slack/README.md @@ -1,18 +1,17 @@ --- description: >- - Integrating Slack with Currents dashboard for Playwright and Cypress test - notifications + Integrating Slack with Currents dashboard for test notifications icon: slack --- # Slack -Currents integration with Slack allows posting test results of your Playwright or Cypress tests directly into Slack channels, helping your team stay informed about test outcomes without leaving Slack. +Currents integration with Slack allows posting test results directly into Slack channels, helping teams stay informed about test outcomes without leaving Slack. There are two versions of Slack integration available: {% hint style="info" %} -**Recommendation:** We recommend using the Slack App integration due to its advanced features and improved security model. +**Recommendation:** Currents recommends using the Slack App integration due to its advanced features and improved security model. {% endhint %} ## [Slack App](slack-app.md) Integration (Recommended) @@ -20,14 +19,22 @@ There are two versions of Slack integration available: The Slack App integration provides a rich, feature-complete experience for test notifications: * ✅ Organization-level installation with per-project configuration -* ✅ Multiple destinations (up to 10 channels per project) +* ✅ Multiple destinations (the dashboard shows the organization's limit; the default is 10) * ✅ Run-level notifications with thread-based grouping -* ✅ Individual test failure notifications +* ✅ Individual failed or flaky test notifications +* ✅ Fix with AI from failed-test messages +* ✅ Run attachment colors for in-progress, success, and error states +* ✅ Live updates to the groups table on threaded run notifications * ✅ Advanced filtering by tags, branches, and commit messages * ✅ Annotation-based mentions (users, groups, emails) * ✅ UI-based mention rules configuration +* ✅ Scheduled [Automated Reports](../../../dashboard/automated-reports.md) to Slack channels (Block Kit summaries with dashboard links) * ✅ Improved security with OAuth 2.0 +The Slack App also delivers independently configured [Action lifecycle notifications](../../../guides/currents-actions/lifecycle-notifications.md) for actions that are created, disabled, re-enabled, archived, expiring, or expired. Connecting Slack under **Integrations** does not enable these notifications; Action notifications are configured under **Actions > Settings**. + +Scheduled automated reports are configured per report on the project **Reports** page; see [Automated Reports to Slack](slack-app.md#automated-reports-to-slack). + ## [Slack Webhook](slack-webhook.md) Integration (Legacy) The webhook-based integration provides basic notification functionality: diff --git a/resources/integrations/slack/slack-app.md b/resources/integrations/slack/slack-app.md index 25c4c9ad..07de1591 100644 --- a/resources/integrations/slack/slack-app.md +++ b/resources/integrations/slack/slack-app.md @@ -1,24 +1,31 @@ --- -description: Slack App integration for Currents - Playwright test notifications and alerts +description: Slack App integration for Currents - test notifications and alerts --- # Slack App -Integrate Slack with Currents to receive real-time Playwright test notifications and failure alerts directly in your team's channels. The Slack App helps engineering teams stay informed about test results without leaving their workflow. +Integrate Slack with Currents to receive real-time test notifications and failure alerts directly in team channels. The Slack App helps engineering teams stay informed about test results without leaving their workflow. ## Use Cases -- **Instant failure alerts**: Get notified immediately when Playwright tests fail, allowing your team to respond quickly before issues reach production. +- **Instant failure alerts**: Notify teams immediately when tests fail so they can respond quickly before issues reach production. - **Flaky test detection**: Receive Slack alerts when tests exhibit flaky behavior, helping maintain test suite reliability. - **Team routing**: Automatically mention the right team members based on which tests failed - route checkout failures to the payments team, API failures to backend engineers. - **Release gating**: Send notifications to release managers when smoke tests or critical tests fail on main or release branches. -- **On-call escalation**: Page on-call engineers when critical Playwright tests fail in production environments. +- **On-call escalation**: Page on-call engineers when critical tests fail in production environments. The integration supports organization-level installation, per-project configuration, multiple notification destinations, and advanced filtering options. -## Requirements +## Requirements and permissions -Before installing the Currents Slack App, the installation must be performed by a user with the correct administrator permissions in Slack. The required role depends on how the Slack account is structured: +Currents and Slack permissions are separate: + +| Role | Access | +| --- | --- | +| **Currents organization administrator** | Connect, re-authenticate, disconnect, and change the Slack App settings in Currents | +| **Slack administrator** | Authorize the Currents app in Slack; the exact role depends on whether Slack uses a single workspace or Enterprise Grid | + +A Currents organization administrator starts the connection from Currents. The Slack authorization step must be completed by a user with the correct Slack administrator permissions: | Slack setup | Who must install the app | | ---------------------------------------------- | ----------------------------------------------------------------------------------------- | @@ -26,7 +33,7 @@ Before installing the Currents Slack App, the installation must be performed by | **Enterprise Grid (multiple workspaces / org)** | An **Org Owner** or **Org Admin** (workspace-level admins are not sufficient on their own) | {% hint style="warning" %} -**The app must be installed by an Org Admin when the Slack account belongs to an Enterprise Grid organization.** +**When the Slack account belongs to an Enterprise Grid organization, the app must be installed by an Org Owner or Org Admin.** If a workspace-level admin installs the app while the workspace is part of a larger Slack organization, the installation may appear to succeed and Currents will store the access token, but Slack can later invalidate that token. When this happens, Currents receives an [`account_inactive`](https://docs.slack.dev/reference/methods/admin.apps.uninstall/#errors) error from the Slack API and notifications silently stop working. @@ -55,7 +62,7 @@ The Slack App integration is installed at the organization level and can be conf 3. You'll be redirected to Slack to authorize the Currents app 4. Click **Allow** to install the application in your Slack workspace -
+
Slack authorization page showing the Currents app permissions and Allow button

Review and authorize the Currents app in Slack.

After installation, you'll receive a welcome message in Slack confirming the connection. @@ -74,11 +81,26 @@ After connecting Slack to your organization: You can enable or disable Slack notifications for each project independently without affecting the organization-level installation. -
+
Slack project integration settings with the Enable Notifications control

Enable Slack notifications independently for each project.

+ +## Installation Status and Recovery + +The Slack integration page reports installation and configuration issues and provides the appropriate recovery action. + +| Status | Recommended action | +| --- | --- | +| **Credentials expired** | Select **Re-authenticate** | +| **Installation archived** | Re-authenticate or reinstall | +| **Installed but not configured** | Enable notifications and save the project settings | +| **Project notifications disabled** | Enable the project-level toggle | +| **Destination has no channel** | Select or manually enter a channel | +| **All destinations disabled** | Enable at least one destination | + +Re-authenticating normally preserves the existing project configuration. If Slack continues returning `account_inactive`, [disconnect](#disconnect-slack) the integration and reinstall it using the required Slack administrator role. ## Notification Destinations -Each project can have up to **10 notification destinations**, allowing you to send notifications to different Slack channels based on your needs. +The dashboard shows the destination limit for the organization; the default is **10**. Destinations allow notifications to be sent to different Slack channels based on project needs. ### Adding a Destination @@ -91,6 +113,12 @@ Each project can have up to **10 notification destinations**, allowing you to se **Manual Channel Entry:** For organizations with many channels, you can manually enter the Channel ID and Channel Name instead of selecting from the dropdown. This is useful when Slack's API limitations prevent listing all channels. {% endhint %} +### Public and Private Channels + +The channel picker can return public channels and private channels that are visible to the Currents Slack App, even if the dashboard label says **Slack Channel (Public Only)**. + +The Currents app must be invited to a private channel before it can post there. If an accessible channel does not appear in search, select **Manual Input** and enter its Channel ID and Channel Name. + ### Managing Destinations Each destination can be: @@ -113,7 +141,7 @@ Message threading is enabled by default for new destinations. Disable it if your Run notifications provide a summary of the entire test run. These are sent when a run completes and can use Slack threads to organize related messages. -
+
Threaded Slack run notification with project, commit, branch, and grouped test results

A run summary and its detailed results grouped in a Slack thread.

### How Threading Works @@ -127,6 +155,24 @@ This keeps your Slack channels organized and prevents notification overload. When **Message Threading** is disabled, each notification is sent as a standalone message in the channel. +### Run message appearance + +Run notifications set the Slack attachment [`color`](https://api.slack.com/reference/messaging/attachments) field (the colored bar beside the message). Only Slack-defined values are valid for `attachments[].color`; do not use display labels such as “Success” or “In progress” as the field value. + +| Slack `color` value | Run state | +| --- | --- | +| `warning` | The run is still in progress | +| `good` | The run finished with a passing outcome for the configured notification mode | +| `danger` | The run finished with a failed or otherwise error outcome for the configured notification mode | + +A recovery notification after a prior failure uses `good` when the run completes with a passing outcome. + +The threaded **groups** table uses separate status styling in the message body (not the attachment `color` field): green for passed tests, red for failed and skipped tests, grey for ignored tests, and purple for flaky tests. + +### Results table updates during a run + +When **Message Threading** is enabled, Currents posts a main thread for the run and **updates the groups table on that thread** as groups finish while the run is still in progress. Teams see partial group results without waiting for every group to complete first. + ### Notification Modes Configure when run notifications are sent: @@ -134,8 +180,11 @@ Configure when run notifications are sent: | Mode | Description | | ----------------------- | ------------------------------------------------------- | | **Always send** | Send notifications for every run, regardless of outcome | -| **Only on failures** | Send notifications only when there are failed tests | -| **Only on flaky tests** | Send notifications only when flaky tests are detected | +| **Only when there are failures** | Send notifications only when there are failed tests | +| **Only when there are failed or flaky tests** | Send notifications when failed or flaky tests are detected | +| **Only when all tests are passing** | Send notifications only when all tests pass (passing-only run outcome) | + +When **Only when there are failures** is selected, the platform can also send a **recovery** notification: if a run already triggered a failure notification for that destination, a later completion with a passing outcome can post a success update so the channel shows when the pipeline is green again. ### Additional Run Events @@ -162,13 +211,13 @@ Or to notify only for main branch runs: - Set **Git Branch** `matches`: `main` -
+
Run notification settings with lifecycle events, result mode, and a main branch filter

Configure run-result delivery and optional conditions for each destination.

## Individual Test Notifications -Individual test notifications send a dedicated message for each failed or flaky test, providing detailed information about specific failures. +Individual test notifications provide detailed information about failed or flaky tests. -
+
Failed-test Slack message with test details, retry attempts, error output, and a user mention

An individual failed-test notification with retry and error details.

### Enabling Individual Test Notifications @@ -215,6 +264,19 @@ Individual test notifications include: - Direct link to the test in Currents dashboard - Mentioned users (if configured) +Messages display up to five test results. When more tests require attention, the message includes the number of omitted tests, mentions collected from the omitted tests, and a **View in Currents** button. + +### Fix with AI + +Failed-test messages include a **Fix with AI** button. The modal provides options to: + +- Open the failure context directly in Cursor +- Open it in GitHub Copilot +- Copy a prompt for Claude, Codex, Zed, Conductor, or another AI tool +- Install the [Currents MCP server](../../../ai/mcp-server.md) so an agent can retrieve additional test and run context + +See [AI-powered test troubleshooting](../../../ai/overview.md) for other Fix with AI entry points. + ## Annotation-Based Mentions The Slack App integration supports mentioning users directly in notifications based on test annotations. When a test fails, the configured users or groups are notified in the Slack message. @@ -252,7 +314,7 @@ See [Playwright Annotations](../../../guides/playwright-annotations.md#annotatio In addition to code annotations, you can configure mention rules directly in the Currents UI. This allows you to set up notification routing without modifying your test code. -
+
Slack mention rule matching smoke tests on the main branch and routing notifications to users and groups

Route matching test notifications with UI-based mention rules.

### Creating Mention Rules @@ -302,6 +364,47 @@ Both [Annotation-Based Mentions](#annotation-based-mentions) and [UI-Based Menti **Finding Slack IDs:** See [Slack's documentation](https://slack.com/help/articles/360057541954-Get-user-and-group-IDs) for instructions on finding user and group IDs. {% endhint %} +## Automated Reports to Slack + +Scheduled [Automated Reports](../../../dashboard/automated-reports.md) can be delivered to Slack channels through the **Currents Slack App**, in addition to email. Delivery uses the same report definition (schedule, lookback period, and tag, author, and branch filters) as email; only the destination changes. + +Automated report messages are separate from [run notifications](#run-notifications) and [individual test notifications](#individual-test-notifications). Report Slack settings are configured on each report in the **Reports** section of the project, not under **Project Settings > Integrations > Slack** destinations. + +### Prerequisites + +Before a report can post to Slack: + +1. The organization must [connect the Slack App](#connecting-slack-to-your-organization) with a user who has the required Slack administrator role (see [Requirements and permissions](#requirements-and-permissions)). +2. The Currents app must be allowed to post in the target channel. For **private channels**, the app must be invited to the channel before delivery succeeds (see [Public and Private Channels](#public-and-private-channels)). + +{% hint style="info" %} +Native Slack App delivery for automated reports is available on Currents cloud. It does not replace per-project Incoming Webhook integrations or on-premises report configuration. +{% endhint %} + +### Configuring Slack delivery for a report + +1. Open the project **Reports** section and create or edit a report (see [Managing Automated Reports](../../../dashboard/automated-reports.md#managing-automated-reports)). +2. Enable the report and configure label, filters, lookback period, and schedule as for email delivery. +3. In the report's **Slack** settings, enable **Send to Slack**. +4. Select one or more Slack channels for the report. The channel picker lists channels visible to the Currents Slack App in the connected workspace. If a channel does not appear, use **Manual Input** and enter the channel ID and name (same approach as [notification destinations](#notification-destinations)). +5. Optionally keep **email recipients** configured so the same report is sent to both email and Slack. +6. Save the report and use **Preview** to validate settings before the next scheduled send. + +### What appears in Slack + +When a scheduled report runs, Currents posts a **Block Kit** message to each configured channel. The message summarizes the same performance insights as the email report (runs, tests, specs, and trend highlights for the selected period) and includes links to open the full report and related views in the Currents dashboard. + +Slack messages are optimized for channel reading; they do not duplicate the full HTML email layout. Teams that need the complete email formatting can continue to use email recipients, or the [email-to-Slack forwarding](../../../dashboard/automated-reports.md#forward-automated-reports-email-to-slack) workaround described in the Automated Reports documentation. + +### Troubleshooting report delivery + +| Symptom | What to check | +| --- | --- | +| No Slack message at the scheduled time | Report **Enable/Disable** is on; **Send to Slack** is enabled; at least one channel is selected; schedule and timezone are correct | +| Email arrives but Slack does not | Slack-specific settings on the report; organization [installation status](#installation-status-and-recovery) (`Credentials expired`, `Installation archived`, and similar) | +| Slack API errors for a channel | App membership in the channel (especially private channels); channel ID when using manual entry | +| Run notifications work but reports do not | Reports use per-report Slack settings on the **Reports** page, not integration **destinations** | + ## Disabling Slack Integration ### Disable for a Project @@ -326,7 +429,7 @@ This removes the organization-level Slack installation and disables notification ### Can I send notifications to multiple channels? -Yes, each project supports up to 10 destinations. Each destination can target a different Slack channel with its own configuration. +Yes. The dashboard shows the destination limit for the organization; the default is 10. Each destination can target a different Slack channel with its own configuration. ### Why am I not receiving notifications? @@ -334,16 +437,16 @@ Check the following: 1. **Project-level toggle** - Ensure "Enable Notifications" is turned on 2. **Destination toggle** - Ensure the specific destination is enabled -3. **Notification mode** - If set to "Only on failures", passing runs won't trigger notifications -4. **Filters** - Check if any tag or branch filters are excluding your runs -5. **Mention rules** - Ensure conditions match your test properties +3. **Notification mode** - Confirm the selected run-result mode matches the expected outcome +4. **Filters** - Check whether any tag or branch filters are excluding runs +5. **Mention rules** - Ensure conditions match test properties 6. **Installation permissions** - If notifications stopped entirely, the Slack token may have been invalidated (`account_inactive`). See [Why did notifications stop with an `account_inactive` error?](#why-did-notifications-stop-with-an-account_inactive-error) ### Why did notifications stop with an `account_inactive` error? This usually means the Slack access token was invalidated because the app was installed without the required administrator permissions. In an Enterprise Grid organization, apps must be installed (or approved) by an **Org Owner/Admin** - a workspace-level admin alone is not sufficient, and Slack may later deactivate that installation's token. -The fix is to [disconnect](#disconnect-slack) the integration and reinstall it with an Org Owner/Admin (or a Workspace Owner/Admin for single-workspace accounts). See [Requirements](#requirements) for the full breakdown. +The fix is to [disconnect](#disconnect-slack) the integration and reinstall it with an Org Owner/Admin (or a Workspace Owner/Admin for single-workspace accounts). See [Requirements and permissions](#requirements-and-permissions) for the full breakdown. ### Can I use both annotation mentions and UI rules? @@ -351,4 +454,4 @@ Yes, both methods work together. Annotation-based mentions take precedence and a ### What happens when a run has multiple groups? -By default, notifications are sent when all groups complete. You may still receive multiple notifications if one group finishes before others are discovered. For example, if one group completes before other groups are known, an early notification may be sent. +With **Message Threading** enabled, Currents keeps one run thread per destination and updates the **groups** table on that thread as groups complete during the run. Individual test failures and run-result replies stay in the same thread instead of filling the channel with separate run summaries for each group.