Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(slack_app): add the channel welcome step to the slack onboarding (#129885)

Vojta Bartošb49aba6cc377
diff --git a/products/slack_app/backend/logic/onboarding/actions.py b/products/slack_app/backend/logic/onboarding/actions.py
index cf3876f72fe7..4f0ca6c43548 100644
--- a/products/slack_app/backend/logic/onboarding/actions.py
+++ b/products/slack_app/backend/logic/onboarding/actions.py
@@ -11,6 +11,8 @@ SKIP_ACTION_ID = "slack_onboarding:skip"
CONTINUE_ACTION_ID = "slack_onboarding:continue"
AI_CONSENT_ACTION_ID = "slack_onboarding:ai_consent"
INBOX_JOIN_ACTION_ID = "slack_onboarding:inbox_join"
+# The mode is a suffix for the same reason as the reply modes.
+CHANNEL_WELCOME_ACTION_ID = "slack_onboarding:channel_welcome"
SOURCES_ACTION_ID = "slack_onboarding:sources"
SOURCES_BLOCK_PREFIX = "slack_onboarding_sources"
ONBOARDING_ACTION_PREFIX = "slack_onboarding:"
diff --git a/products/slack_app/backend/logic/onboarding/card.py b/products/slack_app/backend/logic/onboarding/card.py
index 5c6d2df5f74f..3c8210746205 100644
--- a/products/slack_app/backend/logic/onboarding/card.py
+++ b/products/slack_app/backend/logic/onboarding/card.py
@@ -66,33 +66,12 @@ def _current(checked: list[_PlannedStep]) -> _PlannedStep | None:
def _progress(checked: list[_PlannedStep]) -> str:
finished = sum(1 for item in checked if item.status != "pending")
- return f"{finished} of {len(checked)} {'step' if len(checked) == 1 else 'steps'} done"
+ return f"{finished}/{len(checked)} done"
-_CHECKLIST_LINES: dict[StepStatus, str] = {
- "done": ":white_check_mark: {done_text}",
- "already_set": ":white_check_mark: {title}: already set",
- "not_needed": ":heavy_minus_sign: {title}: not needed",
- "skipped": ":heavy_minus_sign: {title}: skipped",
- "pending": ":white_small_square: {title}",
-}
-
-
-def _checklist(checked: list[_PlannedStep]) -> str:
- current = _current(checked)
- lines = []
- for item in checked:
- if item is current:
- line = f":arrow_right: *{item.step.title}*"
- else:
- line = _CHECKLIST_LINES[item.status].format(title=item.step.title, done_text=item.step.done_text)
- lines.append(f"{item.number}. {line}")
- return "\n".join(lines)
-
-
-def _root_status(checked: list[_PlannedStep]) -> str:
- """Stored so the thread can tell when any checklist line changes, even when the count stays the same."""
- return f"{_progress(checked)}\n{_checklist(checked)}"
+def _progress_bar(checked: list[_PlannedStep]) -> str:
+ finished = sum(1 for item in checked if item.status != "pending")
+ return f"{'▰' * finished}{'▱' * (len(checked) - finished)} {_progress(checked)}"
def _root_message(checked: list[_PlannedStep], *, ready: bool, ts: str | None = None) -> SlackAppOnboardingMessage:
@@ -101,53 +80,64 @@ def _root_message(checked: list[_PlannedStep], *, ready: bool, ts: str | None =
text="PostHog is set up" if ready else "Set up PostHog in Slack",
blocks=[
section_block(ONBOARDING_INTRO_TEXT),
- context_block(":white_check_mark: Setup done" if ready else _progress(checked)),
- context_block(_checklist(checked)),
+ context_block(":white_check_mark: Setup done" if ready else _progress_bar(checked)),
],
ts=ts,
- root_status=_root_status(checked),
+ root_status=_progress(checked),
)
-def _passed_notes(checked: list[_PlannedStep], current: _PlannedStep) -> list[str]:
- """The steps that were set elsewhere after the previous reply, so the thread jumps over them."""
- notes = []
- for item in reversed(checked[: current.number - 1]):
- if item.shown:
+_SUMMARY_LINES: dict[StepStatus, str] = {
+ "done": ":white_check_mark: {done_text}",
+ "already_set": ":white_check_mark: {title}: already set",
+ "not_needed": "Not needed: {title}",
+ "skipped": "Skipped: {title}",
+}
+
+
+def _summary_line(item: _PlannedStep) -> str:
+ return _SUMMARY_LINES[item.status].format(title=item.step.title, done_text=item.step.done_text)
+
+
+def _passed(items: list[_PlannedStep]) -> list[_PlannedStep]:
+ """The steps the thread jumped over at the start of ``items``, because they were set elsewhere."""
+ passed = []
+ for item in items:
+ if item.shown or item.status == "pending":
break
- reason = "is already set" if item.status == "already_set" else "is not needed anymore"
- notes.append(f"Step {item.number}, {item.step.title}, {reason}, so I skipped it.")
- return list(reversed(notes))
+ passed.append(item)
+ return passed
def _step_message(
ctx: OnboardingContext, checked: list[_PlannedStep], current: _PlannedStep
) -> SlackAppOnboardingMessage:
- position = f"Step {current.number} of {len(checked)}"
+ position = f"Step {current.number}/{len(checked)}"
+ # A step jumped over before any reply has no summary to sit in, so it shows here.
+ leading = [] if any(item.shown for item in checked[: current.number - 1]) else _passed(checked)
# The mention makes the person follow the thread, so each new step reply notifies them.
return SlackAppOnboardingMessage(
kind="step",
step=current.step.key,
text=f"{position}: {current.step.title}",
blocks=[
+ *(context_block(_summary_line(item)) for item in leading),
context_block(f"<@{ctx.slack_user_id}> {position}"),
- *(context_block(note) for note in _passed_notes(checked, current)),
*current.step.render(ctx),
],
)
-_SUMMARY_LINES: dict[StepStatus, str] = {
- "done": ":white_check_mark: {done_text}",
- "not_needed": "Not needed: {title}",
- "skipped": "Skipped: {title}",
-}
-
-
-def _summary_message(item: _PlannedStep, ts: str) -> SlackAppOnboardingMessage:
- line = _SUMMARY_LINES[item.status].format(title=item.step.title, done_text=item.step.done_text)
+def _summary_message(checked: list[_PlannedStep], item: _PlannedStep, ts: str) -> SlackAppOnboardingMessage:
+ # The steps jumped over after this reply get their line here, so every step shows in the thread.
+ lines = [_summary_line(later) for later in [item, *_passed(checked[item.number :])]]
return SlackAppOnboardingMessage(
- kind="step", step=item.step.key, text=line, blocks=[context_block(line)], ts=ts, summarizes_step=True
+ kind="step",
+ step=item.step.key,
+ text="\n".join(lines),
+ blocks=[context_block(line) for line in lines],
+ ts=ts,
+ summarizes_step=True,
)
@@ -201,7 +191,7 @@ def plan_onboarding(integration: WorkspaceIntegration, slack_user_id: str) -> Sl
checked = _check_planned(ctx, planned, state.step_ts, skipped)
status = _status(checked)
edits = [
- _summary_message(item, state.step_ts[item.step.key])
+ _summary_message(checked, item, state.step_ts[item.step.key])
for item in checked
if item.shown and item.status != "pending" and item.step.key not in state.summarized
]
@@ -210,7 +200,7 @@ def plan_onboarding(integration: WorkspaceIntegration, slack_user_id: str) -> Sl
edits.append(_root_message(checked, ready=True, ts=state.root_ts))
return SlackAppOnboardingPlan(edits=edits, post=_ready_message(ctx, checked), finished=True, status=status)
- if state.root_status != _root_status(checked):
+ if state.root_status != _progress(checked):
edits.append(_root_message(checked, ready=False, ts=state.root_ts))
message = _step_message(ctx, checked, current)
current_ts = state.step_ts.get(current.step.key)
diff --git a/products/slack_app/backend/logic/onboarding/channel_welcome_step.py b/products/slack_app/backend/logic/onboarding/channel_welcome_step.py
new file mode 100644
index 000000000000..92b5dfff334b
--- /dev/null
+++ b/products/slack_app/backend/logic/onboarding/channel_welcome_step.py
@@ -0,0 +1,56 @@
+from typing import Any
+
+from products.slack_app.backend.logic.onboarding.actions import CHANNEL_WELCOME_ACTION_ID, button, skip_button
+from products.slack_app.backend.logic.onboarding.step import (
+ OnboardingContext,
+ OnboardingStep,
+ OnboardingStepKey,
+ StepClick,
+)
+from products.slack_app.backend.models import ChannelWelcomeMode
+from products.slack_app.backend.services.slack_app_home import CHANNEL_WELCOME_MODE_LABELS
+from products.slack_app.backend.services.slack_messages import section_block
+from products.slack_app.backend.services.slack_settings import has_chosen_channel_welcome_mode, set_channel_welcome_mode
+
+
+class ChannelWelcomeStep(OnboardingStep):
+ key = OnboardingStepKey.CHANNEL_WELCOME
+ title = "Channel welcome"
+ done_text = "Channel welcome set"
+
+ def applies(self, ctx: OnboardingContext) -> bool:
+ # The mode applies to the whole Slack workspace.
+ return ctx.is_workspace_admin
+
+ def is_done(self, ctx: OnboardingContext) -> bool:
+ return has_chosen_channel_welcome_mode(ctx.integration.integration_id)
+
+ def render(self, ctx: OnboardingContext) -> list[dict]:
+ buttons = [
+ button(ctx, CHANNEL_WELCOME_MODE_LABELS[mode], f"{CHANNEL_WELCOME_ACTION_ID}:{mode}", mode=mode)
+ for mode in (ChannelWelcomeMode.CHANNEL, ChannelWelcomeMode.INVITER, ChannelWelcomeMode.OFF)
+ ]
+ return [
+ section_block(
+ "*Channel welcome*\n"
+ "When someone adds me to a channel, I can post a short welcome that says what I do. "
+ "Where should it go? This applies to everyone in this Slack workspace."
+ ),
+ {"type": "actions", "elements": [*buttons, skip_button(ctx, self.key)]},
+ ]
+
+ def handles(self, action_id: str) -> bool:
+ return action_id.startswith(f"{CHANNEL_WELCOME_ACTION_ID}:")
+
+ def apply_action(self, ctx: OnboardingContext, action_id: str, value: dict[str, Any]) -> StepClick:
+ if not ctx.is_workspace_admin:
+ return StepClick(
+ message="Only Slack workspace admins or owners can change the channel welcome message.",
+ refresh=False,
+ )
+ mode = value.get("mode")
+ if mode not in ChannelWelcomeMode.values:
+ return StepClick(refresh=False)
+ set_channel_welcome_mode(ctx.integration.integration_id, ChannelWelcomeMode(mode))
+ self.record_completed(ctx, choice=str(mode))
+ return StepClick()
diff --git a/products/slack_app/backend/logic/onboarding/step.py b/products/slack_app/backend/logic/onboarding/step.py
index f2e565ed6658..96b57c0a293b 100644
--- a/products/slack_app/backend/logic/onboarding/step.py
+++ b/products/slack_app/backend/logic/onboarding/step.py
@@ -27,6 +27,7 @@ class OnboardingStepKey(StrEnum):
GITHUB = "github"
INBOX_CHANNEL = "inbox_channel"
SOURCES = "sources"
+ CHANNEL_WELCOME = "channel_welcome"
MODEL = "model"
REPLIES_IN_THREADS = "replies_in_threads"
diff --git a/products/slack_app/backend/logic/onboarding/steps.py b/products/slack_app/backend/logic/onboarding/steps.py
index 6d0fc7a6916d..d3656a418819 100644
--- a/products/slack_app/backend/logic/onboarding/steps.py
+++ b/products/slack_app/backend/logic/onboarding/steps.py
@@ -1,4 +1,5 @@
from products.slack_app.backend.logic.onboarding.ai_consent_step import AiConsentStep
+from products.slack_app.backend.logic.onboarding.channel_welcome_step import ChannelWelcomeStep
from products.slack_app.backend.logic.onboarding.github_step import GithubStep
from products.slack_app.backend.logic.onboarding.inbox_channel_step import InboxChannelStep
from products.slack_app.backend.logic.onboarding.link_account_step import LinkAccountStep
@@ -14,6 +15,7 @@ ONBOARDING_STEPS: tuple[OnboardingStep, ...] = (
GithubStep(),
InboxChannelStep(),
SourcesStep(),
+ ChannelWelcomeStep(),
ModelStep(),
RepliesInThreadsStep(),
)
diff --git a/products/slack_app/backend/services/slack_settings.py b/products/slack_app/backend/services/slack_settings.py
index 034bc0c235c9..3b10adece227 100644
--- a/products/slack_app/backend/services/slack_settings.py
+++ b/products/slack_app/backend/services/slack_settings.py
@@ -317,6 +317,15 @@ def has_chosen_untagged_followup_mode(slack_workspace_id: str, slack_user_id: st
).exists()
+def has_chosen_channel_welcome_mode(slack_workspace_id: str) -> bool:
+ """Whether an admin picked a mode, as opposed to getting the ``CHANNEL`` default."""
+ from products.slack_app.backend.models import SlackSettings
+
+ return SlackSettings.objects.filter(
+ slack_workspace_id=slack_workspace_id, slack_user_id__isnull=True, channel_welcome_mode__isnull=False
+ ).exists()
+
+
def resolve_workspace_default_integration_id(slack_workspace_id: str) -> int | None:
"""The integration that the workspace-wide row routes mentions to."""
@@ -345,6 +354,7 @@ __all__ = [
"ONBOARDING_VERSION",
"OnboardingState",
"parse_onboarding",
+ "has_chosen_channel_welcome_mode",
"has_chosen_untagged_followup_mode",
"resolve_onboarding",
"update_onboarding",
diff --git a/products/slack_app/backend/temporal/tests/test_slack_app_onboarding_workflow.py b/products/slack_app/backend/temporal/tests/test_slack_app_onboarding_workflow.py
index fc8f98f63963..516f114d4ee6 100644
--- a/products/slack_app/backend/temporal/tests/test_slack_app_onboarding_workflow.py
+++ b/products/slack_app/backend/temporal/tests/test_slack_app_onboarding_workflow.py
@@ -31,7 +31,7 @@ def _message(kind: str, ts: str | None = None) -> SlackAppOnboardingMessage:
blocks=[],
ts=ts,
step="model" if kind == "step" else None,
- root_status="1 of 3 steps done" if kind == "root" else None,
+ root_status="1/3 done" if kind == "root" else None,
summarizes_step=kind == "step" and ts is not None,
)
@@ -169,9 +169,9 @@ async def test_each_activity_names_the_message_it_sends_in_the_history(env: Work
summaries = await _run(env, slack, refreshes=2)
assert summaries == [
- *["plan", "post top message: 1 of 3 steps done", "plan", "post model: show step"],
- *["plan", "edit model: shrink to one line", "edit top message: 1 of 3 steps done", "post model: show step"],
- *["plan", "edit top message: 1 of 3 steps done", "post ready message"],
+ *["plan", "post top message: 1/3 done", "plan", "post model: show step"],
+ *["plan", "edit model: shrink to one line", "edit top message: 1/3 done", "post model: show step"],
+ *["plan", "edit top message: 1/3 done", "post ready message"],
]
diff --git a/products/slack_app/backend/tests/logic/onboarding/test_steps.py b/products/slack_app/backend/tests/logic/onboarding/test_steps.py
index c921d5466a85..5e6c05d663ad 100644
--- a/products/slack_app/backend/tests/logic/onboarding/test_steps.py
+++ b/products/slack_app/backend/tests/logic/onboarding/test_steps.py
@@ -84,7 +84,16 @@ def test_each_button_on_a_step_reaches_a_handler(step: OnboardingStep, org_team_
("member_with_team_github", ["link_account", "github", "model", "replies_in_threads"]),
(
"installer",
- ["link_account", "ai_consent", "github", "inbox_channel", "sources", "model", "replies_in_threads"],
+ [
+ "link_account",
+ "ai_consent",
+ "github",
+ "inbox_channel",
+ "sources",
+ "channel_welcome",
+ "model",
+ "replies_in_threads",
+ ],
),
("linked_org_admin", ["ai_consent", "model", "replies_in_threads"]),
],
diff --git a/products/slack_app/backend/tests/logic/onboarding/test_thread.py b/products/slack_app/backend/tests/logic/onboarding/test_thread.py
index bc484de92dad..3d01672e0fb6 100644
--- a/products/slack_app/backend/tests/logic/onboarding/test_thread.py
+++ b/products/slack_app/backend/tests/logic/onboarding/test_thread.py
@@ -23,9 +23,10 @@ from products.slack_app.backend.logic.onboarding.interactivity import (
onboarding_integration_hint,
)
from products.slack_app.backend.logic.onboarding.sources_step import NO_PROJECT_ACCESS_TEXT
-from products.slack_app.backend.models import UntaggedFollowupMode
+from products.slack_app.backend.models import ChannelWelcomeMode, UntaggedFollowupMode
from products.slack_app.backend.services.slack_settings import (
resolve_auto_model_choice,
+ resolve_channel_welcome_mode,
resolve_onboarding,
resolve_untagged_followup_mode,
set_auto_model_choice,
@@ -125,10 +126,9 @@ def test_first_open_starts_a_thread_with_the_first_step_and_later_refreshes_post
root, step = _posts(slack_client)
assert root["channel"] == SLACK_USER_ID and "thread_ts" not in root
- assert "0 of 3 steps done" in all_block_text(root["blocks"])
- assert "1. :arrow_right: *Link your PostHog account*" in all_block_text(root["blocks"])
+ assert "▱▱▱ 0/3 done" in all_block_text(root["blocks"])
assert (step["channel"], step["thread_ts"]) == ("D1", "100.1")
- assert f"<@{SLACK_USER_ID}> Step 1 of 3" in all_block_text(step["blocks"])
+ assert f"<@{SLACK_USER_ID}> Step 1/3" in all_block_text(step["blocks"])
assert "Link your PostHog account" in all_block_text(step["blocks"])
# The second refresh only renders the shown step again, which keeps its link fresh.
assert list(_edits(slack_client)) == ["100.2"]
@@ -170,16 +170,16 @@ def test_each_step_is_a_new_reply_and_done_steps_shrink_to_one_line(
edits_after_link = _edits(slack_client)
update_onboarding(SLACK_TEAM_ID, SLACK_USER_ID, skip_step="model")
assert plan_onboarding(integration, SLACK_USER_ID).status == (
- "2 of 3 steps done · current step: replies_in_threads · skipped: model"
+ "2/3 done · current step: replies_in_threads · skipped: model"
)
set_untagged_followup_mode(SLACK_TEAM_ID, SLACK_USER_ID, UntaggedFollowupMode.AUTO)
capture.reset_mock()
finished = _refresh(integration)
- assert "Step 2 of 3" in all_block_text(model_step["blocks"]) and model_step["thread_ts"] == "100.1"
+ assert "Step 2/3" in all_block_text(model_step["blocks"]) and model_step["thread_ts"] == "100.1"
assert ":white_check_mark: PostHog account linked" in edits_after_link["100.2"]
assert "Link account" not in edits_after_link["100.2"]
- assert "1 of 3 steps done" in edits_after_link["100.1"]
+ assert "▰▱▱ 1/3 done" in edits_after_link["100.1"]
ready = _posts(slack_client)[-1]
edits = _edits(slack_client)
assert finished is True
@@ -220,6 +220,28 @@ def test_card_clicks_save_the_choice_and_refresh_the_card(action_id: str, value:
refresh.assert_called_once_with(integration, SLACK_USER_ID, may_start=False)
[email protected]("workspace_admin", [True, False])
+def test_only_a_workspace_admin_can_set_the_channel_welcome(
+ workspace_admin: bool, org_team_user, slack_workspace_admin: MagicMock
+) -> None:
+ _, team, _ = org_team_user
+ integration = _install(team)
+ slack_workspace_admin.return_value = workspace_admin
+
+ with (
+ patch(f"{CLICKS}.request_onboarding") as refresh,
+ patch(f"{CLICKS}.post_response_url") as reply,
+ patch(f"{STEP}.capture_slack_event"),
+ ):
+ handle_onboarding_action(_click(integration, "slack_onboarding:channel_welcome:off", mode="off"))
+
+ expected = ChannelWelcomeMode.OFF if workspace_admin else ChannelWelcomeMode.CHANNEL
+ assert resolve_channel_welcome_mode(SLACK_TEAM_ID) == expected
+ assert refresh.called is workspace_admin
+ assert reply.called is not workspace_admin
+
+
@pytest.mark.django_db
def test_the_link_step_cannot_be_skipped(org_team_user) -> None:
_, team, _ = org_team_user
@@ -327,11 +349,9 @@ def test_a_workspace_admin_also_gets_the_workspace_steps_after_linking(
link_user(user)
_refresh(integration)
- assert plan_onboarding(integration, SLACK_USER_ID).status == (
- "1 of 7 steps done · current step: ai_consent · skipped: none"
- )
+ assert plan_onboarding(integration, SLACK_USER_ID).status == ("1/8 done · current step: ai_consent · skipped: none")
second_step = all_block_text(_posts(slack_client)[-1]["blocks"])
- assert f"<@{SLACK_USER_ID}> Step 2 of 7" in second_step and "Allow AI data processing" in second_step
+ assert f"<@{SLACK_USER_ID}> Step 2/8" in second_step and "Allow AI data processing" in second_step
@pytest.mark.django_db
@@ -348,14 +368,14 @@ def test_steps_done_before_the_thread_are_left_out_of_the_numbering(
finished = _refresh(integration)
root, link_step, ready = _posts(slack_client)
- assert "0 of 1 step done" in all_block_text(root["blocks"])
- assert f"<@{SLACK_USER_ID}> Step 1 of 1" in all_block_text(link_step["blocks"])
+ assert "0/1 done" in all_block_text(root["blocks"])
+ assert f"<@{SLACK_USER_ID}> Step 1/1" in all_block_text(link_step["blocks"])
assert finished is True and ready["thread_ts"] == "100.1"
assert "Setup done" in _edits(slack_client)["100.1"]
@pytest.mark.django_db
-def test_a_step_set_elsewhere_keeps_its_number_and_says_it_is_already_set(
+def test_a_step_set_elsewhere_keeps_its_number_and_shows_as_checked_in_the_thread(
org_team_user, link_user, slack_client: MagicMock, capture: MagicMock
) -> None:
_, team, user = org_team_user
@@ -366,31 +386,12 @@ def test_a_step_set_elsewhere_keeps_its_number_and_says_it_is_already_set(
set_auto_model_choice(SLACK_TEAM_ID, SLACK_USER_ID, True)
_refresh(integration)
- replies_step = all_block_text(_posts(slack_client)[-1]["blocks"])
- assert f"<@{SLACK_USER_ID}> Step 3 of 3" in replies_step
- assert "Step 2, Your model, is already set, so I skipped it." in replies_step
- root = _edits(slack_client)["100.1"]
- assert "2 of 3 steps done" in root and "2. :white_check_mark: Your model: already set" in root
-
-
-def test_the_top_message_follows_a_skipped_step_set_later(
- org_team_user, link_user, slack_client: MagicMock, capture: MagicMock
-) -> None:
- _, team, user = org_team_user
- integration = _install(team)
- _refresh(integration)
- link_user(user)
- _refresh(integration)
- update_onboarding(SLACK_TEAM_ID, SLACK_USER_ID, skip_step="model")
- _refresh(integration)
- slack_client.chat_update.reset_mock()
-
- set_auto_model_choice(SLACK_TEAM_ID, SLACK_USER_ID, True)
- _refresh(integration)
-
- root = _edits(slack_client)["100.1"]
- assert "2 of 3 steps done" in root and "2. :white_check_mark: Model chosen" in root
+ assert f"<@{SLACK_USER_ID}> Step 3/3" in all_block_text(_posts(slack_client)[-1]["blocks"])
+ edits = _edits(slack_client)
+ # The link reply shrinks to one line and keeps the model step under it, so both stay in the thread.
+ assert ":white_check_mark: PostHog account linked" in edits["100.2"]
+ assert ":white_check_mark: Your model: already set" in edits["100.2"]
+ assert "▰▰▱ 2/3 done" in edits["100.1"]
@pytest.mark.django_db
@@ -412,7 +413,7 @@ def test_a_deleted_top_message_starts_a_new_thread(
assert plan_again.called
old_root, _, new_root, next_step = _posts(slack_client)
- assert "thread_ts" not in new_root and "0 of 2 steps done" in all_block_text(new_root["blocks"])
+ assert "thread_ts" not in new_root and "0/2 done" in all_block_text(new_root["blocks"])
assert next_step["thread_ts"] == "100.3" and "Choose your model" in all_block_text(next_step["blocks"])
@@ -431,7 +432,7 @@ def test_an_org_admin_who_links_later_gets_ai_consent_at_the_end(
state = resolve_onboarding(SLACK_TEAM_ID, SLACK_USER_ID)
assert state is not None and state.planned == ("link_account", "model", "replies_in_threads", "ai_consent")
- assert f"<@{SLACK_USER_ID}> Step 2 of 4" in all_block_text(_posts(slack_client)[-1]["blocks"])
+ assert f"<@{SLACK_USER_ID}> Step 2/4" in all_block_text(_posts(slack_client)[-1]["blocks"])
@pytest.mark.django_db