Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

Drop the Console session link from the Slack golden payloads

Petr Bauche429f9509cf6
diff --git a/core/tests/switch_core/bridges/collaboration/golden/slack/activity_plan.json b/core/tests/switch_core/bridges/collaboration/golden/slack/activity_plan.json
index 8b3e7f8b9..725cd9d63 100644
--- a/core/tests/switch_core/bridges/collaboration/golden/slack/activity_plan.json
+++ b/core/tests/switch_core/bridges/collaboration/golden/slack/activity_plan.json
@@ -6,22 +6,6 @@
"block_id": "switch-request:tok-plan",
"tasks": [
{
- "details": {
- "elements": [
- {
- "elements": [
- {
- "text": "Open in Console app",
- "type": "link",
- "url": "switchdash://session?server=https%3A%2F%2Fswitch.example.com&agent=agent-1&room=room-1&session=session-1"
- }
- ],
- "type": "rich_text_section"
- }
- ],
- "type": "rich_text"
- },
- "hide_title": true,
"status": "in_progress",
"task_id": "switch-session",
"title": "Switch session"
@@ -88,22 +72,6 @@
"block_id": "switch-request:tok-plan",
"tasks": [
{
- "details": {
- "elements": [
- {
- "elements": [
- {
- "text": "Open in Console app",
- "type": "link",
- "url": "switchdash://session?server=https%3A%2F%2Fswitch.example.com&agent=agent-1&room=room-1&session=session-1"
- }
- ],
- "type": "rich_text_section"
- }
- ],
- "type": "rich_text"
- },
- "hide_title": true,
"status": "complete",
"task_id": "switch-session",
"title": "Switch session"
diff --git a/core/tests/switch_core/bridges/collaboration/golden/slack/activity_stream.json b/core/tests/switch_core/bridges/collaboration/golden/slack/activity_stream.json
index abdcbf187..fb95c9db0 100644
--- a/core/tests/switch_core/bridges/collaboration/golden/slack/activity_stream.json
+++ b/core/tests/switch_core/bridges/collaboration/golden/slack/activity_stream.json
@@ -21,22 +21,6 @@
"block_id": "switch-steps-top",
"tasks": [
{
- "details": {
- "elements": [
- {
- "elements": [
- {
- "text": "Open in Console app",
- "type": "link",
- "url": "switchdash://session?server=https%3A%2F%2Fswitch.example.com&agent=agent-1&room=room-1&session=session-1"
- }
- ],
- "type": "rich_text_section"
- }
- ],
- "type": "rich_text"
- },
- "hide_title": true,
"status": "in_progress",
"task_id": "switch-session",
"title": "Switch session"
@@ -93,22 +77,6 @@
"block_id": "switch-steps-top",
"tasks": [
{
- "details": {
- "elements": [
- {
- "elements": [
- {
- "text": "Open in Console app",
- "type": "link",
- "url": "switchdash://session?server=https%3A%2F%2Fswitch.example.com&agent=agent-1&room=room-1&session=session-1"
- }
- ],
- "type": "rich_text_section"
- }
- ],
- "type": "rich_text"
- },
- "hide_title": true,
"status": "complete",
"task_id": "switch-session",
"title": "Switch session"
diff --git a/core/tests/switch_core/bridges/collaboration/golden/slack/status_card.json b/core/tests/switch_core/bridges/collaboration/golden/slack/status_card.json
index bcff0a1fb..dd1de8b60 100644
--- a/core/tests/switch_core/bridges/collaboration/golden/slack/status_card.json
+++ b/core/tests/switch_core/bridges/collaboration/golden/slack/status_card.json
@@ -12,7 +12,7 @@
{
"elements": [
{
- "text": "Needs attention: <@U0OWNER> · <switchdash://session?server=https%3A%2F%2Fswitch.example.com&agent=agent-1&room=room-1&session=session-1|Open in Console app>",
+ "text": "Needs attention: <@U0OWNER>",
"type": "mrkdwn"
}
],
@@ -47,15 +47,6 @@
}
],
"type": "context"
- },
- {
- "elements": [
- {
- "text": "<switchdash://session?server=https%3A%2F%2Fswitch.example.com&agent=agent-1&room=room-1&session=session-1|Open in Console app>",
- "type": "mrkdwn"
- }
- ],
- "type": "context"
}
],
"channel": "C0GENERAL",
diff --git a/core/tests/switch_core/bridges/collaboration/test_slack_outbound_golden.py b/core/tests/switch_core/bridges/collaboration/test_slack_outbound_golden.py
index b728c7734..4cc144a68 100644
--- a/core/tests/switch_core/bridges/collaboration/test_slack_outbound_golden.py
+++ b/core/tests/switch_core/bridges/collaboration/test_slack_outbound_golden.py
@@ -39,7 +39,6 @@ from switch_core.bridges.collaboration.slack.adapter import (
SlackConnectionConfig,
)
from switch_core.sessions.contract import Item, TurnUpsert
-from switch_core.sessions.presentation import session_console_url
from .slack_fakes import FakeResponse
@@ -216,14 +215,6 @@ def _tool(item_id: str, title: str, status: str) -> Item:
)
-def _session_url() -> str:
- url = session_console_url(
- "https://switch.example.com", "agent-1", "room-1", "session-1"
- )
- assert url is not None
- return url
-
-
async def test_agent_identity() -> None:
adapter, client = _adapter(third_party_avatars=True, upload_error=None)
@@ -387,7 +378,6 @@ async def test_status_card_and_edits() -> None:
elapsed_seconds=12.0,
status_only=True,
publication_token="tok-status",
- session_url=_session_url(),
notify_external_id="U0OWNER",
)
completed = TurnActivity(
@@ -396,7 +386,6 @@ async def test_status_card_and_edits() -> None:
elapsed_seconds=75.0,
status_only=True,
publication_token="tok-status",
- session_url=_session_url(),
notify_external_id="U0OWNER",
)
@@ -417,7 +406,6 @@ async def test_activity_plan_posted_and_edited() -> None:
turn=_turn("running"),
elapsed_seconds=5.0,
publication_token="tok-plan",
- session_url=_session_url(),
interrupt_turn_id=TURN,
)
completed = TurnActivity(
@@ -425,7 +413,6 @@ async def test_activity_plan_posted_and_edited() -> None:
turn=_turn("completed"),
elapsed_seconds=42.0,
publication_token="tok-plan",
- session_url=_session_url(),
)
ref = await adapter.post_rich(CHANNEL, "scout", running, None)
@@ -442,14 +429,12 @@ async def test_activity_streamed_in_a_thread() -> None:
items=[_tool("i1", "Read README.md", "in-progress")],
turn=_turn("running"),
elapsed_seconds=3.0,
- session_url=_session_url(),
interrupt_turn_id=TURN,
)
completed = TurnActivity(
items=[_tool("i1", "Read README.md", "completed")],
turn=_turn("completed"),
elapsed_seconds=9.0,
- session_url=_session_url(),
)
ref = await adapter.post_rich(CHANNEL, "scout", running, thread)