Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(calls): put channel call chat in a thread in the channel (#9878)
Eric Hayes51cb4ad40dd5
diff --git a/.github/workspace-dep-closures.json b/.github/workspace-dep-closures.jsonindex 1e3fb674bf..505258b956 100644--- a/.github/workspace-dep-closures.json+++ b/.github/workspace-dep-closures.json@@ -317,6 +317,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -1347,6 +1348,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -1449,6 +1451,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -2242,6 +2245,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -2680,6 +2684,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/foreign_entity",@@ -2794,6 +2799,7 @@"crates/entity_access","crates/entity_access_db_utils","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/frecency","crates/genai_telemetry",@@ -2874,6 +2880,7 @@"crates/entity_access_db_utils","crates/entity_mutation","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/filter_ast","crates/frecency","crates/genai_telemetry",@@ -2964,6 +2971,7 @@"crates/entity_access_db_utils","crates/entity_mutation","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/filter_ast","crates/frecency","crates/genai_telemetry",@@ -3053,6 +3061,7 @@"crates/entity_access","crates/entity_access_db_utils","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/frecency","crates/genai_telemetry",@@ -3729,6 +3738,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -4529,6 +4539,7 @@"crates/entity_access","crates/entity_access_db_utils","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/frecency","crates/genai_telemetry",@@ -4881,6 +4892,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/foreign_entity",@@ -5832,6 +5844,7 @@"crates/entity_access_db_utils","crates/entity_access_management","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -5922,6 +5935,7 @@"crates/entity_access","crates/entity_access_db_utils","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/frecency","crates/genai_telemetry",@@ -6245,6 +6259,7 @@"crates/entity_access_db_utils","crates/entity_access_management","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -6350,6 +6365,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -6464,6 +6480,7 @@"crates/entity_access_db_utils","crates/entity_access_management","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -6967,6 +6984,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/forms",@@ -7307,6 +7325,7 @@"crates/entity_access","crates/entity_access_db_utils","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/frecency","crates/genai_telemetry",@@ -7436,6 +7455,7 @@"crates/entity_access","crates/entity_access_db_utils","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/frecency","crates/genai_telemetry",@@ -7615,6 +7635,7 @@"crates/entity_access","crates/entity_access_db_utils","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/frecency","crates/genai_telemetry",@@ -7725,6 +7746,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -7861,6 +7883,7 @@"crates/entity_access_db_utils","crates/entity_access_management","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -7978,6 +8001,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -8130,6 +8154,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -8283,6 +8308,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -8481,6 +8507,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -8732,6 +8759,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -9025,6 +9053,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -9204,6 +9233,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -11034,6 +11064,7 @@"crates/entity_access_db_utils","crates/entity_access_management","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -11147,6 +11178,7 @@"crates/entity_access_db_utils","crates/entity_access_management","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -11425,6 +11457,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -12151,6 +12184,7 @@"crates/entity_access_db_utils","crates/entity_access_management","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -12589,6 +12623,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -12731,6 +12766,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -12848,6 +12884,7 @@"crates/entity_access_db_utils","crates/entity_access_management","crates/entity_mutation",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/frecency",@@ -13179,6 +13216,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -13534,6 +13572,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/foreign_entity",@@ -13654,6 +13693,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/foreign_entity",@@ -13779,6 +13819,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/filter_ast","crates/folds/agent_fold","crates/foreign_entity",@@ -13906,6 +13947,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -14799,6 +14841,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",@@ -15116,6 +15159,7 @@"crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry","crates/favorites",+ "crates/feature_flags","crates/fig_engine","crates/filter_ast","crates/folds/agent_fold",diff --git a/.sqlx/query-c2cb747ab09bc415cb01318a733b986c55ad2b28b7986cd66b402d343ed8df31.json b/.sqlx/query-01dbce839e23fb852fc1c17e1f268ec2040f71b4f4ad1abc7984f325cd7dcdec.jsonsimilarity index 70%rename from .sqlx/query-c2cb747ab09bc415cb01318a733b986c55ad2b28b7986cd66b402d343ed8df31.jsonrename to .sqlx/query-01dbce839e23fb852fc1c17e1f268ec2040f71b4f4ad1abc7984f325cd7dcdec.jsonindex 05e69d0af7..c6b874389f 100644--- a/.sqlx/query-c2cb747ab09bc415cb01318a733b986c55ad2b28b7986cd66b402d343ed8df31.json+++ b/.sqlx/query-01dbce839e23fb852fc1c17e1f268ec2040f71b4f4ad1abc7984f325cd7dcdec.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "INSERT INTO comms_messages(id, parent_entity_type, parent_entity_id, thread_id,\n sender_id, triggered_by_user_id, triggered_via, content, client_message_id,\n guest_name)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)",+ "query": "INSERT INTO comms_messages(id, parent_entity_type, parent_entity_id, thread_id,\n sender_id, triggered_by_user_id, triggered_via, content, client_message_id,\n guest_name, kind)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)","describe": {"columns": [],"parameters": {@@ -14,10 +14,11 @@"Text","Text","Uuid",+ "Text","Text"]},"nullable": []},- "hash": "c2cb747ab09bc415cb01318a733b986c55ad2b28b7986cd66b402d343ed8df31"+ "hash": "01dbce839e23fb852fc1c17e1f268ec2040f71b4f4ad1abc7984f325cd7dcdec"}diff --git a/.sqlx/query-1e749418d94374c8c970c32579f27c0195d884f2496841db9d4be04ade335b4c.json b/.sqlx/query-1e749418d94374c8c970c32579f27c0195d884f2496841db9d4be04ade335b4c.jsonnew file mode 100644index 0000000000..7432472e30--- /dev/null+++ b/.sqlx/query-1e749418d94374c8c970c32579f27c0195d884f2496841db9d4be04ade335b4c.json@@ -0,0 +1,40 @@+{+ "db_name": "PostgreSQL",+ "query": "SELECT id, started_at, ended_at, duration_ms FROM call_entities WHERE id = ANY($1)",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "id",+ "type_info": "Uuid"+ },+ {+ "ordinal": 1,+ "name": "started_at",+ "type_info": "Timestamptz"+ },+ {+ "ordinal": 2,+ "name": "ended_at",+ "type_info": "Timestamptz"+ },+ {+ "ordinal": 3,+ "name": "duration_ms",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "UuidArray"+ ]+ },+ "nullable": [+ false,+ true,+ true,+ true+ ]+ },+ "hash": "1e749418d94374c8c970c32579f27c0195d884f2496841db9d4be04ade335b4c"+}diff --git a/.sqlx/query-28501ea0e2acbfeb28dcc2ae5dd0ac40cb396809f046c049d8344c323dcb1f24.json b/.sqlx/query-28501ea0e2acbfeb28dcc2ae5dd0ac40cb396809f046c049d8344c323dcb1f24.jsonnew file mode 100644index 0000000000..d61871fe51--- /dev/null+++ b/.sqlx/query-28501ea0e2acbfeb28dcc2ae5dd0ac40cb396809f046c049d8344c323dcb1f24.json@@ -0,0 +1,22 @@+{+ "db_name": "PostgreSQL",+ "query": "\n SELECT DISTINCT id AS \"user_id!\" FROM (\n SELECT m.sender_id AS id\n FROM comms_messages m\n JOIN comms_channel_participants cp\n ON m.parent_entity_type = 'channel' AND m.parent_entity_id = cp.channel_id::text AND cp.user_id = m.sender_id\n WHERE (m.id = $1 OR m.thread_id = $1)\n AND m.deleted_at IS NULL\n AND m.kind = 'message'\n AND cp.left_at IS NULL\n UNION\n SELECT em.entity_id AS id\n FROM comms_entity_mentions em\n JOIN comms_messages m ON m.id::text = em.source_entity_id\n JOIN comms_channel_participants cp\n ON m.parent_entity_type = 'channel' AND m.parent_entity_id = cp.channel_id::text AND cp.user_id = em.entity_id\n WHERE (m.id = $1 OR m.thread_id = $1)\n AND m.deleted_at IS NULL\n AND em.source_entity_type = 'message'\n AND em.entity_type = 'user'\n AND cp.left_at IS NULL\n ) AS combined\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "user_id!",+ "type_info": "Text"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": [+ null+ ]+ },+ "hash": "28501ea0e2acbfeb28dcc2ae5dd0ac40cb396809f046c049d8344c323dcb1f24"+}diff --git a/.sqlx/query-2e94210011a9636d994437cbe074d904d563e57443cc3f65432e1db986f016dc.json b/.sqlx/query-4412c93f47126f5f09b096e8cea163af04a6a0eb3542f7966990c5ff5ecdc07b.jsonsimilarity index 66%rename from .sqlx/query-2e94210011a9636d994437cbe074d904d563e57443cc3f65432e1db986f016dc.jsonrename to .sqlx/query-4412c93f47126f5f09b096e8cea163af04a6a0eb3542f7966990c5ff5ecdc07b.jsonindex c8f7b6d614..6a6a77aa86 100644--- a/.sqlx/query-2e94210011a9636d994437cbe074d904d563e57443cc3f65432e1db986f016dc.json+++ b/.sqlx/query-4412c93f47126f5f09b096e8cea163af04a6a0eb3542f7966990c5ff5ecdc07b.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT sender_id\n FROM comms_messages\n WHERE id = $1\n ORDER BY created_at ASC\n ",+ "query": "\n SELECT sender_id\n FROM comms_messages\n WHERE id = $1 AND kind = 'message'\n ORDER BY created_at ASC\n ","describe": {"columns": [{@@ -18,5 +18,5 @@false]},- "hash": "2e94210011a9636d994437cbe074d904d563e57443cc3f65432e1db986f016dc"+ "hash": "4412c93f47126f5f09b096e8cea163af04a6a0eb3542f7966990c5ff5ecdc07b"}diff --git a/.sqlx/query-3718d42411995c3344c0b5aba5b14a018d03ce4a48dbc8bcb55ccb5f4b5ce3a7.json b/.sqlx/query-494420672015f4bbde19a51d00bce2073b66f41210e58bd43ee1a50f30889b7e.jsonsimilarity index 78%rename from .sqlx/query-3718d42411995c3344c0b5aba5b14a018d03ce4a48dbc8bcb55ccb5f4b5ce3a7.jsonrename to .sqlx/query-494420672015f4bbde19a51d00bce2073b66f41210e58bd43ee1a50f30889b7e.jsonindex 64d2017d24..4a1f41884f 100644--- a/.sqlx/query-3718d42411995c3344c0b5aba5b14a018d03ce4a48dbc8bcb55ccb5f4b5ce3a7.json+++ b/.sqlx/query-494420672015f4bbde19a51d00bce2073b66f41210e58bd43ee1a50f30889b7e.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT c.id, c.channel_id, c.room_name, c.created_by, c.created_at, c.egress_id, c.recording_key, c.preview_url, c.recording_started_at,\n (SELECT title FROM call_meetings WHERE id = c.meeting_id) AS custom_name,\n c.share_with_team,\n sp.team_share_access_level AS \"team_share_access_level?: AccessLevel\"\n FROM calls c\n JOIN \"SharePermission\" sp ON sp.id = c.share_permission_id\n WHERE c.id = $1\n ",+ "query": "\n SELECT c.id, c.channel_id, c.room_name, c.created_by, c.created_at, c.egress_id, c.recording_key, c.preview_url, c.recording_started_at,\n (SELECT title FROM call_meetings WHERE id = c.meeting_id) AS custom_name,\n c.share_with_team,\n ce.discussion,\n sp.team_share_access_level AS \"team_share_access_level?: AccessLevel\"\n FROM calls c\n JOIN call_entities ce ON ce.id = c.id\n JOIN \"SharePermission\" sp ON sp.id = c.share_permission_id\n WHERE c.id = $1\n ","describe": {"columns": [{@@ -60,6 +60,11 @@},{"ordinal": 11,+ "name": "discussion",+ "type_info": "Text"+ },+ {+ "ordinal": 12,"name": "team_share_access_level?: AccessLevel","type_info": {"Custom": {@@ -93,8 +98,9 @@true,null,false,+ false,true]},- "hash": "3718d42411995c3344c0b5aba5b14a018d03ce4a48dbc8bcb55ccb5f4b5ce3a7"+ "hash": "494420672015f4bbde19a51d00bce2073b66f41210e58bd43ee1a50f30889b7e"}diff --git a/.sqlx/query-4b466d1ecef9174f511fcfa57396181d87d2446d92fa69119b87990a7899265a.json b/.sqlx/query-4b466d1ecef9174f511fcfa57396181d87d2446d92fa69119b87990a7899265a.jsonnew file mode 100644index 0000000000..419f3b3e52--- /dev/null+++ b/.sqlx/query-4b466d1ecef9174f511fcfa57396181d87d2446d92fa69119b87990a7899265a.json@@ -0,0 +1,22 @@+{+ "db_name": "PostgreSQL",+ "query": "SELECT discussion = 'channel_thread' AS \"channel_thread!\" FROM call_entities WHERE id = $1",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "channel_thread!",+ "type_info": "Bool"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": [+ null+ ]+ },+ "hash": "4b466d1ecef9174f511fcfa57396181d87d2446d92fa69119b87990a7899265a"+}diff --git a/.sqlx/query-b41dce00fedf9de1aa717c352952608bab80fb2edc149e1242f948f60c67b91f.json b/.sqlx/query-b41dce00fedf9de1aa717c352952608bab80fb2edc149e1242f948f60c67b91f.jsonnew file mode 100644index 0000000000..814a097f9b--- /dev/null+++ b/.sqlx/query-b41dce00fedf9de1aa717c352952608bab80fb2edc149e1242f948f60c67b91f.json@@ -0,0 +1,14 @@+{+ "db_name": "PostgreSQL",+ "query": "UPDATE call_entities SET discussion = 'channel_thread' WHERE id = $1",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": []+ },+ "hash": "b41dce00fedf9de1aa717c352952608bab80fb2edc149e1242f948f60c67b91f"+}diff --git a/.sqlx/query-b9329c6761d5754eb5d61d32a2a98f6648773ab509bebdff3e33e35801b0fd3e.json b/.sqlx/query-b9329c6761d5754eb5d61d32a2a98f6648773ab509bebdff3e33e35801b0fd3e.jsonnew file mode 100644index 0000000000..74cf0338f0--- /dev/null+++ b/.sqlx/query-b9329c6761d5754eb5d61d32a2a98f6648773ab509bebdff3e33e35801b0fd3e.json@@ -0,0 +1,28 @@+{+ "db_name": "PostgreSQL",+ "query": "SELECT id, discussion FROM call_entities WHERE id = ANY($1)",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "id",+ "type_info": "Uuid"+ },+ {+ "ordinal": 1,+ "name": "discussion",+ "type_info": "Text"+ }+ ],+ "parameters": {+ "Left": [+ "UuidArray"+ ]+ },+ "nullable": [+ false,+ false+ ]+ },+ "hash": "b9329c6761d5754eb5d61d32a2a98f6648773ab509bebdff3e33e35801b0fd3e"+}diff --git a/.sqlx/query-309e2e00fdc84585a812c6ffa65beb217cea3ab797b2f387909a13e6de332f9a.json b/.sqlx/query-c5aad9db60c32894274cd1a42fbb16059eb17135cf9651dd1bdfd4bf981ede55.jsonsimilarity index 71%rename from .sqlx/query-309e2e00fdc84585a812c6ffa65beb217cea3ab797b2f387909a13e6de332f9a.jsonrename to .sqlx/query-c5aad9db60c32894274cd1a42fbb16059eb17135cf9651dd1bdfd4bf981ede55.jsonindex a5a45b07ea..035c98104c 100644--- a/.sqlx/query-309e2e00fdc84585a812c6ffa65beb217cea3ab797b2f387909a13e6de332f9a.json+++ b/.sqlx/query-c5aad9db60c32894274cd1a42fbb16059eb17135cf9651dd1bdfd4bf981ede55.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT COUNT(id) AS \"count!\"\n FROM comms_messages\n WHERE parent_entity_type = 'channel' AND parent_entity_id = $1::uuid::text\n ",+ "query": "\n SELECT COUNT(id) AS \"count!\"\n FROM comms_messages\n WHERE parent_entity_type = 'channel' AND parent_entity_id = $1::uuid::text\n AND kind = 'message'\n ","describe": {"columns": [{@@ -18,5 +18,5 @@null]},- "hash": "309e2e00fdc84585a812c6ffa65beb217cea3ab797b2f387909a13e6de332f9a"+ "hash": "c5aad9db60c32894274cd1a42fbb16059eb17135cf9651dd1bdfd4bf981ede55"}diff --git a/.sqlx/query-d6ac5ae2bb3d1d6413b912158a849edf56cc7b75f8a52826efaf603e2d45f52c.json b/.sqlx/query-d6ac5ae2bb3d1d6413b912158a849edf56cc7b75f8a52826efaf603e2d45f52c.jsonnew file mode 100644index 0000000000..fd9da30d07--- /dev/null+++ b/.sqlx/query-d6ac5ae2bb3d1d6413b912158a849edf56cc7b75f8a52826efaf603e2d45f52c.json@@ -0,0 +1,28 @@+{+ "db_name": "PostgreSQL",+ "query": "SELECT channel_id AS \"channel_id!\", user_id FROM call_entities\n WHERE id = $1 AND discussion = 'channel_thread' AND channel_id IS NOT NULL",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "channel_id!",+ "type_info": "Uuid"+ },+ {+ "ordinal": 1,+ "name": "user_id",+ "type_info": "Text"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": [+ true,+ false+ ]+ },+ "hash": "d6ac5ae2bb3d1d6413b912158a849edf56cc7b75f8a52826efaf603e2d45f52c"+}diff --git a/.sqlx/query-e01c2801959afae8af6524dfbb37316e4cba11bbbeedf57b56fcee7118877b7d.json b/.sqlx/query-e01c2801959afae8af6524dfbb37316e4cba11bbbeedf57b56fcee7118877b7d.jsondeleted file mode 100644index 2f02824175..0000000000--- a/.sqlx/query-e01c2801959afae8af6524dfbb37316e4cba11bbbeedf57b56fcee7118877b7d.json+++ /dev/null@@ -1,22 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n SELECT DISTINCT id AS \"user_id!\" FROM (\n SELECT m.sender_id AS id\n FROM comms_messages m\n JOIN comms_channel_participants cp\n ON m.parent_entity_type = 'channel' AND m.parent_entity_id = cp.channel_id::text AND cp.user_id = m.sender_id\n WHERE (m.id = $1 OR m.thread_id = $1)\n AND m.deleted_at IS NULL\n AND cp.left_at IS NULL\n UNION\n SELECT em.entity_id AS id\n FROM comms_entity_mentions em\n JOIN comms_messages m ON m.id::text = em.source_entity_id\n JOIN comms_channel_participants cp\n ON m.parent_entity_type = 'channel' AND m.parent_entity_id = cp.channel_id::text AND cp.user_id = em.entity_id\n WHERE (m.id = $1 OR m.thread_id = $1)\n AND m.deleted_at IS NULL\n AND em.source_entity_type = 'message'\n AND em.entity_type = 'user'\n AND cp.left_at IS NULL\n ) AS combined\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "user_id!",- "type_info": "Text"- }- ],- "parameters": {- "Left": [- "Uuid"- ]- },- "nullable": [- null- ]- },- "hash": "e01c2801959afae8af6524dfbb37316e4cba11bbbeedf57b56fcee7118877b7d"-}diff --git a/.sqlx/query-e99786b98d8bf9df5aacd139b4cbafdb728ed57094918d05672b8c365183562a.json b/.sqlx/query-e99786b98d8bf9df5aacd139b4cbafdb728ed57094918d05672b8c365183562a.jsonnew file mode 100644index 0000000000..cdf2059133--- /dev/null+++ b/.sqlx/query-e99786b98d8bf9df5aacd139b4cbafdb728ed57094918d05672b8c365183562a.json@@ -0,0 +1,22 @@+{+ "db_name": "PostgreSQL",+ "query": "\n SELECT cp.user_id AS \"user_id!\"\n FROM comms_messages root\n JOIN call_participants cp ON cp.call_id = root.id\n WHERE root.id = $1 AND root.kind = 'call_root' AND cp.left_at IS NULL\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "user_id!",+ "type_info": "Text"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "e99786b98d8bf9df5aacd139b4cbafdb728ed57094918d05672b8c365183562a"+}diff --git a/.sqlx/query-7a8672111c0c887bf1c2c873a478615fc42fed6f7769515edc0e025cc5c6d493.json b/.sqlx/query-fb3be0e22711efc39d2d92f7a190acdc584c9a61fe524e4e652c9ba092f7594b.jsonsimilarity index 79%rename from .sqlx/query-7a8672111c0c887bf1c2c873a478615fc42fed6f7769515edc0e025cc5c6d493.jsonrename to .sqlx/query-fb3be0e22711efc39d2d92f7a190acdc584c9a61fe524e4e652c9ba092f7594b.jsonindex 20afebdd92..f5375384b7 100644--- a/.sqlx/query-7a8672111c0c887bf1c2c873a478615fc42fed6f7769515edc0e025cc5c6d493.json+++ b/.sqlx/query-fb3be0e22711efc39d2d92f7a190acdc584c9a61fe524e4e652c9ba092f7594b.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT cr.id, cr.channel_id, cr.room_name, cr.created_by, cr.started_at, cr.ended_at, cr.duration_ms, cr.egress_id, cr.recording_key, cr.preview_url, cr.recording_started_at, cr.custom_name, cr.summary,\n sp.team_share_access_level AS \"team_share_access_level?: AccessLevel\"\n FROM call_records cr\n JOIN \"SharePermission\" sp ON sp.id = cr.share_permission_id\n WHERE cr.id = $1\n ",+ "query": "\n SELECT cr.id, cr.channel_id, cr.room_name, cr.created_by, cr.started_at, cr.ended_at, cr.duration_ms, cr.egress_id, cr.recording_key, cr.preview_url, cr.recording_started_at, cr.custom_name, cr.summary,\n ce.discussion,\n sp.team_share_access_level AS \"team_share_access_level?: AccessLevel\"\n FROM call_records cr\n JOIN call_entities ce ON ce.id = cr.id\n JOIN \"SharePermission\" sp ON sp.id = cr.share_permission_id\n WHERE cr.id = $1\n ","describe": {"columns": [{@@ -70,6 +70,11 @@},{"ordinal": 13,+ "name": "discussion",+ "type_info": "Text"+ },+ {+ "ordinal": 14,"name": "team_share_access_level?: AccessLevel","type_info": {"Custom": {@@ -105,8 +110,9 @@true,true,true,+ false,true]},- "hash": "7a8672111c0c887bf1c2c873a478615fc42fed6f7769515edc0e025cc5c6d493"+ "hash": "fb3be0e22711efc39d2d92f7a190acdc584c9a61fe524e4e652c9ba092f7594b"}diff --git a/Cargo.lock b/Cargo.lockindex 54da323503..7053ab86f8 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -4031,6 +4031,7 @@ dependencies = ["entity_access","entity_access_db_utils","entity_mutation",+ "feature_flags","filter_ast","futures","invite_email",@@ -6698,6 +6699,7 @@ dependencies = ["entity_registry_db_utils","external_chat","favorites",+ "feature_flags","flate2","foreign_entity","forms",diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.mdindex 9e303ed031..71fb0da0d8 100644--- a/apps/web/AGENTS.md+++ b/apps/web/AGENTS.md@@ -98,6 +98,13 @@ meter on every row except on phones, with the direction in its label whileimportance moves:`bunx playwright test --config src/features/email-view/browser-test/playwright.config.ts`.+A channel call's row and its call panel (the real `Channel` over synthetic service+responses) have a backend-free desktop and phone regression: the collapsed row, the+blank slate, composer pinning, quote replies and the outside-message popup:+`bunx playwright test --config src/features/channel/Call/discussion/browser-test/playwright.config.ts`.+On a machine with many network interfaces, run it under `bwrap --dev-bind / / --unshare-net`:+Chromium otherwise aborts module requests with `ERR_NETWORK_CHANGED`.+Discussion link scrolling has a backend-free browser regression:`bunx playwright test --config src/lib/core/messages/browser-test/playwright.config.ts`.diff --git a/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.test.tsx b/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.test.tsxindex 819a525346..cf9eddb5d9 100644--- a/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.test.tsx+++ b/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.test.tsx@@ -27,7 +27,7 @@ vi.mock('@app/features/chat/ChatWithAgentButton', () => ({AskMacroButton: () => null,}));vi.mock('@channel/Call/chat/CallChatHistory', () => ({- CallChatHistory: () => null,+ CallDiscussionHistory: () => null,}));vi.mock('@components/app/HeaderActionGroup', () => ({HeaderActionGroup: () => null,diff --git a/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.tsx b/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.tsxindex 5e7b06e0a1..658e765519 100644--- a/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.tsx+++ b/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.tsx@@ -1,6 +1,6 @@import { AskMacroButton } from '@app/features/chat/ChatWithAgentButton';import { useCallContextOptional } from '@channel/Call/CallContext';-import { CallChatHistory } from '@channel/Call/chat/CallChatHistory';+import { CallDiscussionHistory } from '@channel/Call/chat/CallChatHistory';import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { SidePanel } from '@components/app/side-panel';import { CustomScrollbar } from '@core/component/CustomScrollbar';@@ -267,7 +267,8 @@ export function CallRecordingBody(props: {</div></section></Show>- <CallChatHistory+ <CallDiscussionHistory+ discussion={record().discussion}callId={props.callId}targetId={props.messageTarget}targetRequestKey={props.messageTargetRequestKey}diff --git a/apps/web/src/features/block-call/queries/recording-download.test.ts b/apps/web/src/features/block-call/queries/recording-download.test.tsindex e09e6d10b0..d6ed72276e 100644--- a/apps/web/src/features/block-call/queries/recording-download.test.ts+++ b/apps/web/src/features/block-call/queries/recording-download.test.ts@@ -9,6 +9,7 @@ import { callRecordingDownloadSource } from './recording-download';const record = (recordingUrl?: string): CallRecord => ({callId: 'call-1',+ discussion: { kind: 'call_chat', call_id: 'call-1' },createdBy: 'macro|[email protected]',guests: [],isActive: false,diff --git a/apps/web/src/features/block-call/views/CallDetailView.test.tsx b/apps/web/src/features/block-call/views/CallDetailView.test.tsxindex 4d2a7ac0bc..87741f4c51 100644--- a/apps/web/src/features/block-call/views/CallDetailView.test.tsx+++ b/apps/web/src/features/block-call/views/CallDetailView.test.tsx@@ -16,6 +16,7 @@ const mocks = vi.hoisted(() => ({isActive: false,participants: [],roomName: 'room',+ discussion: { kind: 'call_chat', call_id: 'call-1' },shareWithTeam: false,startedAt: '2026-10-02T00:00:00Z',transcript: [],diff --git a/apps/web/src/features/channel/Call/CallOverlay.tsx b/apps/web/src/features/channel/Call/CallOverlay.tsxindex 4b1a773a1e..62adcf43dc 100644--- a/apps/web/src/features/channel/Call/CallOverlay.tsx+++ b/apps/web/src/features/channel/Call/CallOverlay.tsx@@ -27,8 +27,11 @@ import {For,type JSXElement,lazy,+ Match,+ on,Show,Suspense,+ Switch,} from 'solid-js';import { useCallContext } from './CallContext';import { CallControls } from './CallControls/CallControls';@@ -39,6 +42,7 @@ import {type CallPanelTab,} from './chat/components/CallChatPanel';import { createControlsVisibility } from './create-controls-visibility';+import type { CallPanelState } from './discussion/CallDiscussionContent';import { LK_TRACK_SOURCE } from './livekit-loader';import { MutedMicrophoneBadge } from './MutedMicrophoneBadge';import { ParticipantAvatarBackground } from './ParticipantAvatarBackground';@@ -314,6 +318,16 @@ export function CallOverlay(props: {footerLeading?: JSXElement;/** Narrow RTC credential for a guest; never an account bearer. */guestChatSession?: { token: string; participantId: string };+ /** The host's own discussion, in place of the call's chat. */+ discussion?: {+ /** Names the panel's discussion tab. */+ label: () => string | undefined;+ /** Open the panel as soon as this turns true. */+ opensByDefault: () => boolean;+ /** There's news for someone whose panel is closed. */+ hasUpdates: () => boolean;+ render: (panel: CallPanelState) => JSXElement;+ };}) {const callCtx = useCallContext();const currentUserId = useUserId();@@ -351,6 +365,17 @@ export function CallOverlay(props: {setPanelOpen(false);panelButton?.focus();};+ createEffect(+ on(+ () => props.discussion?.opensByDefault() ?? false,+ (opensByDefault) => {+ if (!opensByDefault) return;+ setFocusChatOnOpen(false);+ setPanelMounted(true);+ setPanelOpen(true);+ }+ )+ );const togglePanel = () => {if (panelOpen()) return closePanel();setFocusChatOnOpen(true);@@ -384,7 +409,12 @@ export function CallOverlay(props: {><ChatIcon class="size-4 mobile:size-6" /></Show>- <Show when={callWork.showButtonDot()}>+ <Show+ when={+ callWork.showButtonDot() ||+ (!panelOpen() && props.discussion?.hasUpdates())+ }+ ><spanaria-hidden="true"class="absolute top-1 right-1 size-1.5 rounded-full bg-accent"@@ -757,13 +787,12 @@ export function CallOverlay(props: {sidebarMount={widePanel() ? sidebarMount() : undefined}overlayMount={overlayMount()}returnFocus={panelButton}+ discussionLabel={props.discussion?.label()}><Show when={canChat() && callCtx.activeCallId()} keyed>{(callId) => (<Suspense>- <Show- when={props.guestChatSession}- keyed+ <Switchfallback={<CallChatcallId={callId}@@ -773,16 +802,31 @@ export function CallOverlay(props: {/>}>- {(session) => (- <GuestCallChat- callId={callId}- session={session}- open={panelOpen() && activeTab() === 'chat'}- focusOnOpen={focusChatOnOpen()}- onClose={closePanel}- />- )}- </Show>+ <Match when={props.discussion}>+ {(discussion) =>+ discussion().render({+ get open() {+ return panelOpen() && activeTab() === 'chat';+ },+ get focusOnOpen() {+ return focusChatOnOpen();+ },+ onClose: closePanel,+ })+ }+ </Match>+ <Match when={props.guestChatSession} keyed>+ {(session) => (+ <GuestCallChat+ callId={callId}+ session={session}+ open={panelOpen() && activeTab() === 'chat'}+ focusOnOpen={focusChatOnOpen()}+ onClose={closePanel}+ />+ )}+ </Match>+ </Switch></Suspense>)}</Show>diff --git a/apps/web/src/features/channel/Call/CallStartedNotifier.tsx b/apps/web/src/features/channel/Call/CallStartedNotifier.tsxindex 96d59aadd2..90256e89bb 100644--- a/apps/web/src/features/channel/Call/CallStartedNotifier.tsx+++ b/apps/web/src/features/channel/Call/CallStartedNotifier.tsx@@ -10,6 +10,7 @@ import {setActiveCallEndedCache,setActiveCallStartedCache,} from '@queries/call/call';+import { invalidateMessageTimeline } from '@queries/messages/timeline';import { useCallContext } from './CallContext';import { createCallEventsEffect } from './call-events';import {@@ -274,6 +275,11 @@ export function CallStartedNotifier() {// and clicking it deep-links into a join, which for a call that is over// means get-or-create starts a brand-new one in the channel.closeCallNotification(resolution.callId);+ // A channel call's row says how long it lasted once it ends.+ fireAndForget(+ invalidateMessageTimeline({ type: 'channel', id: resolution.channelId }),+ 'channel-call'+ );setActiveCallEndedCache({channelId: resolution.channelId,callId: resolution.callId,diff --git a/apps/web/src/features/channel/Call/ChannelCallTab.tsx b/apps/web/src/features/channel/Call/ChannelCallTab.tsxindex dbf378f882..d17e5165be 100644--- a/apps/web/src/features/channel/Call/ChannelCallTab.tsx+++ b/apps/web/src/features/channel/Call/ChannelCallTab.tsx@@ -1,16 +1,26 @@import { useChannelTab } from '@channel/Channel/ChannelTabContext';import { SplitHeaderRight } from '@components/app/split-layout/components/SplitHeader';import { UserGroup } from '@core/component/UserGroup';+import { useChannel } from '@core/context/channels';import { isMobile } from '@core/mobile/isMobile';import { getDisplayName, tryMacroId } from '@core/user';import PhoneIcon from '@icon/system/regular/phone-call.svg';import { Telemetry } from '@macro-inc/observability';import { useActiveCallQuery, useLiveCallRecordQuery } from '@queries/call/call';import { Button } from '@ui';-import { type Accessor, createMemo, Match, Show, Switch } from 'solid-js';+import {+ type Accessor,+ createMemo,+ createSignal,+ Match,+ Show,+ Switch,+} from 'solid-js';import { ActiveCallLink } from './ActiveCallLink';import { CallOverlay } from './CallOverlay';import { getCallJoinTab, getCallLeaveTab } from './call-tabs';+import { CallDiscussionContent } from './discussion/CallDiscussionContent';+import { callDiscussionOf } from './discussion/call-discussion';import { useCall } from './use-call';function ParticipantFirstName(props: { id: string }) {@@ -113,6 +123,14 @@ export function ChannelCallTab(props: {onLeave: () => setActiveTab(getCallLeaveTab()),});+ const record = useLiveCallRecordQuery(+ () => call.callCtx.activeCallId() ?? ''+ );+ const discussion = () =>+ callDiscussionOf(record, call.callCtx.activeCallId());+ const channel = useChannel(props.channelId);+ const [outsideCount, setOutsideCount] = createSignal(0);+async function handleJoin() {try {await call.joinCall();@@ -157,6 +175,23 @@ export function ChannelCallTab(props: {</Show><CallOverlayonLeave={handleLeave}+ discussion={{+ label: () =>+ discussion()?.kind === 'channel_thread'+ ? (channel()?.name ?? undefined)+ : undefined,+ opensByDefault: () =>+ !isMobile() && discussion()?.kind === 'channel_thread',+ hasUpdates: () => outsideCount() > 0,+ render: (panel) => (+ <CallDiscussionContent+ discussion={discussion}+ panel={panel}+ onViewChannel={() => setActiveTab('messages')}+ onOutsideCountChange={setOutsideCount}+ />+ ),+ }}footerLeading={<Show when={!isMobile()}><ActiveCallLink />diff --git a/apps/web/src/features/channel/Call/chat/CallChatHistory.tsx b/apps/web/src/features/channel/Call/chat/CallChatHistory.tsxindex a31ef663c1..3464df8c46 100644--- a/apps/web/src/features/channel/Call/chat/CallChatHistory.tsx+++ b/apps/web/src/features/channel/Call/chat/CallChatHistory.tsx@@ -1,7 +1,12 @@+import { t } from '@app/lib/i18n';+import { buildMessageLink } from '@channel/Thread/utils/message-actions';import { StaticMarkdownContext } from '@core/component/LexicalMarkdown/component/core/StaticMarkdown';import { MessageThread, threadListItem } from '@core/messages/MessageThread';import { fireAndForget } from '@core/util/fireAndForget';+import { threadRepliesQueryOptions } from '@queries/messages/thread-replies';+import { useQuery } from '@tanstack/solid-query';import { Show, Suspense } from 'solid-js';+import type { CallDiscussion } from '../discussion/call-discussion';import { buildCallMessageLink } from './build-call-message-link';import { useCallChat } from './queries/use-call-chat';@@ -24,6 +29,92 @@ export function CallChatHistory(props: CallChatHistoryProps) {);}+/**+ * A channel call's discussion, on its record: read-only, and only for people+ * who can read the channel. Sharing a record doesn't open part of a channel.+ */+function ChannelThreadHistory(props: {+ channelId: string;+ rootId: string;+ targetId?: string;+ targetRequestKey?: string | number;+ onClearTarget?: () => void;+}) {+ const parent = () => ({ type: 'channel' as const, id: props.channelId });+ const thread = useQuery(() => ({+ ...threadRepliesQueryOptions(parent(), props.rootId),+ retry: false,+ }));++ return (+ <Show when={thread.isSuccess && thread.data}>+ {(data) => (+ <section class="flex min-w-0 flex-col gap-3" aria-label="Call chat">+ <div class="flex items-center justify-between gap-2">+ <h3 class="text-sm font-semibold text-ink">Call chat</h3>+ <a+ class="text-xs text-ink-muted hover:text-ink"+ href={buildMessageLink(props.channelId, props.rootId)}+ >+ {t('calls.openInChannel')}+ </a>+ </div>+ <StaticMarkdownContext>+ <div class="min-w-0 rounded border border-edge-muted/50 py-2">+ <MessageThread+ data={threadListItem(data())}+ canWrite={false}+ expanded+ hideReplyInput+ monorail+ hideRail+ targetId={props.targetId}+ targetRequestKey={props.targetRequestKey}+ onClearTarget={props.onClearTarget}+ buildLink={(message) =>+ buildMessageLink(+ props.channelId,+ message.id,+ message.thread_id+ )+ }+ />+ </div>+ </StaticMarkdownContext>+ </section>+ )}+ </Show>+ );+}++/** The one place a call's record chooses how to show its discussion. */+export function CallDiscussionHistory(+ props: CallChatHistoryProps & { discussion: CallDiscussion }+) {+ const channelThread = () =>+ props.discussion.kind === 'channel_thread' ? props.discussion : undefined;++ return (+ <Show+ when={channelThread()}+ keyed+ fallback={<CallChatHistory {...props} />}+ >+ {(thread) => (+ <Suspense>+ <ChannelThreadHistory+ channelId={thread.channel_id}+ rootId={thread.root_id}+ targetId={props.targetId}+ targetRequestKey={props.targetRequestKey}+ onClearTarget={props.onClearTarget}+ />+ </Suspense>+ )}+ </Show>+ );+}+function CallChatHistoryContent(props: CallChatHistoryProps) {const chat = useCallChat(() => props.callId);return (diff --git a/apps/web/src/features/channel/Call/chat/components/CallChatPanel.tsx b/apps/web/src/features/channel/Call/chat/components/CallChatPanel.tsxindex cbafa0264b..81a8c12b57 100644--- a/apps/web/src/features/channel/Call/chat/components/CallChatPanel.tsx+++ b/apps/web/src/features/channel/Call/chat/components/CallChatPanel.tsx@@ -25,6 +25,8 @@ export function CallChatPanel(props: {sidebarMount?: HTMLElement;overlayMount?: HTMLElement;returnFocus?: HTMLButtonElement;+ /** Names the discussion tab, for a discussion that isn't the call's chat. */+ discussionLabel?: string;}) {const [sidebarBody, setSidebarBody] = createSignal<HTMLDivElement>();const [sheetBody, setSheetBody] = createSignal<HTMLDivElement>();@@ -115,7 +117,7 @@ export function CallChatPanel(props: {options={[{value: 'chat',- label: t('calls.chat'),+ label: props.discussionLabel ?? t('calls.chat'),disabled: !props.chatAvailable,},{diff --git a/apps/web/src/features/channel/Call/discussion/CallDiscussionContent.test.tsx b/apps/web/src/features/channel/Call/discussion/CallDiscussionContent.test.tsxnew file mode 100644index 0000000000..88090c1c57--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/CallDiscussionContent.test.tsx@@ -0,0 +1,40 @@+import { render, waitFor } from '@solidjs/testing-library';+import { createSignal, onMount } from 'solid-js';+import { expect, it, vi } from 'vitest';+import { CallDiscussionContent } from './CallDiscussionContent';+import type { CallDiscussion } from './call-discussion';++const mounts = vi.hoisted(() => ({ count: 0 }));++vi.mock('./ChannelCallPanel', () => ({+ ChannelCallPanel: () => {+ onMount(() => {+ mounts.count += 1;+ });+ return <div data-testid="channel-panel" />;+ },+}));+vi.mock('../chat/CallChat', () => ({ default: () => null }));++it('keeps the channel mounted when the polled record returns a new object', async () => {+ const thread = (): CallDiscussion => ({+ kind: 'channel_thread',+ channel_id: 'channel-1',+ root_id: 'call-1',+ });+ const [discussion, setDiscussion] = createSignal<CallDiscussion>(thread());++ const view = render(() => (+ <CallDiscussionContent+ discussion={discussion}+ panel={{ open: true, focusOnOpen: false, onClose: () => undefined }}+ onViewChannel={() => undefined}+ />+ ));+ await waitFor(() => expect(view.getByTestId('channel-panel')).toBeTruthy());++ setDiscussion(thread());+ setDiscussion(thread());++ expect(mounts.count).toBe(1);+});diff --git a/apps/web/src/features/channel/Call/discussion/CallDiscussionContent.tsx b/apps/web/src/features/channel/Call/discussion/CallDiscussionContent.tsxnew file mode 100644index 0000000000..6d51073fae--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/CallDiscussionContent.tsx@@ -0,0 +1,75 @@+import { lazyNamed } from '@core/util/lazyNamed';+import {+ type Accessor,+ type JSX,+ lazy,+ Match,+ Suspense,+ Switch,+} from 'solid-js';+import type { CallDiscussion } from './call-discussion';++const CallChat = lazy(() => import('../chat/CallChat'));+const ChannelCallPanel = lazyNamed(+ () => import('./ChannelCallPanel'),+ 'ChannelCallPanel'+);++export type CallPanelState = {+ open: boolean;+ focusOnOpen: boolean;+ onClose: () => void;+};++/**+ * The one place a signed-in call chooses its discussion. Nothing below it+ * knows there is another kind. The record polls and returns a new object each+ * time, so these stay unkeyed: remounting would lose scroll and focus.+ */+export function CallDiscussionContent(props: {+ discussion: Accessor<CallDiscussion | undefined>;+ panel: CallPanelState;+ onViewChannel: (channelId: string) => void;+ onOutsideCountChange?: (count: number) => void;+ /** The state the channel needs, for a host that doesn't already provide it. */+ channelHost?: (channel: JSX.Element) => JSX.Element;+}) {+ const channelThread = () => {+ const discussion = props.discussion();+ return discussion?.kind === 'channel_thread' ? discussion : undefined;+ };+ const callChat = () => {+ const discussion = props.discussion();+ return discussion?.kind === 'call_chat' ? discussion : undefined;+ };++ return (+ <Suspense>+ <Switch>+ <Match when={channelThread()}>+ {(thread) => {+ const panel = (+ <ChannelCallPanel+ channelId={thread().channel_id}+ rootId={thread().root_id}+ onViewChannel={() => props.onViewChannel(thread().channel_id)}+ onOutsideCountChange={props.onOutsideCountChange}+ />+ );+ return props.channelHost ? props.channelHost(panel) : panel;+ }}+ </Match>+ <Match when={callChat()}>+ {(chat) => (+ <CallChat+ callId={chat().call_id}+ open={props.panel.open}+ focusOnOpen={props.panel.focusOnOpen}+ onClose={props.panel.onClose}+ />+ )}+ </Match>+ </Switch>+ </Suspense>+ );+}diff --git a/apps/web/src/features/channel/Call/discussion/CallRootLine.tsx b/apps/web/src/features/channel/Call/discussion/CallRootLine.tsxnew file mode 100644index 0000000000..5c190566b8--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/CallRootLine.tsx@@ -0,0 +1,180 @@+import { getCallJoinTab } from '@channel/Call/call-tabs';+import { useCall } from '@channel/Call/use-call';+import { useChannelTab } from '@channel/Channel/ChannelTabContext';+import { callDuration } from '@channel/core/system-activity';+import { UserGroup } from '@core/component/UserGroup';+import { fireAndForget } from '@core/util/fireAndForget';+import PhoneFillIcon from '@icon/system/fill/phone-fill.svg';+import PhoneIcon from '@icon/system/regular/phone-call.svg';+import { useLiveCallRecordQuery } from '@queries/call/call';+import type { CallEntryStatus, Message } from '@service-storage/messages';+import { Button } from '@ui';+import {+ createMemo,+ createSignal,+ type JSX,+ Match,+ onCleanup,+ Show,+ Switch,+} from 'solid-js';+import { formatCallElapsed } from './format-call-elapsed';+import { callerName, PastCallLine } from './PastCallLine';++/** The parts every live call row shows: who started it, for how long, who's on. */+function LiveCallLine(props: {+ message: Message;+ action?: JSX.Element;+ ref?: (element: HTMLElement) => void;+}) {+ const record = useLiveCallRecordQuery(() => props.message.id);+ const [nowMs, setNowMs] = createSignal(Date.now());+ const timer = globalThis.setInterval(() => setNowMs(Date.now()), 1000);+ onCleanup(() => globalThis.clearInterval(timer));+ const elapsed = createMemo(() =>+ formatCallElapsed(props.message.created_at, nowMs())+ );+ const liveParticipants = createMemo(() =>+ record.isSuccess+ ? record.data.participants+ .filter((participant) => !participant.leftAt)+ .map((participant) => participant.userId)+ : []+ );++ return (+ <div+ ref={props.ref}+ class="flex min-h-9 items-center gap-2 pl-(--message-padding-x) pr-2 text-sm text-ink-muted"+ data-message-id={props.message.id}+ >+ <span+ class="flex w-(--user-icon-width) shrink-0 justify-center"+ aria-hidden="true"+ >+ <PhoneFillIcon class="size-4.5 text-success" />+ </span>+ <span class="min-w-0 truncate">+ <span class="font-medium text-ink">{callerName(props.message)}</span>{' '}+ started a call+ </span>+ <span class="flex shrink-0 items-center gap-1.5 font-mono text-xs tabular-nums text-success">+ <span+ class="size-1.5 rounded-full bg-success animate-pulse"+ aria-hidden="true"+ />+ {elapsed()}+ </span>+ <Show when={liveParticipants().length > 0}>+ <UserGroup+ userIds={liveParticipants()}+ maxUsers={4}+ size="sm"+ suppressClick+ showTooltip+ />+ </Show>+ <Show when={props.action}>+ <span class="ml-auto shrink-0">{props.action}</span>+ </Show>+ </div>+ );+}++/** A live call's row in the channel, where people can get into the call. */+function LiveChannelCallLine(props: {+ channelId: string;+ message: Message;+ onVisibilityChange?: (visible: boolean) => void;+}) {+ const { setActiveTab } = useChannelTab();+ const call = useCall(() => props.channelId, {+ onJoin: () => setActiveTab(getCallJoinTab()),+ });+ let observer: IntersectionObserver | undefined;+ onCleanup(() => {+ observer?.disconnect();+ props.onVisibilityChange?.(false);+ });++ return (+ <LiveCallLine+ message={props.message}+ ref={(element) => {+ observer = new IntersectionObserver(([entry]) =>+ props.onVisibilityChange?.(entry.isIntersecting)+ );+ observer.observe(element);+ }}+ action={+ <Show+ when={call.isInThisChannel()}+ fallback={+ <Button+ variant="success"+ size="sm"+ disabled={call.isJoining()}+ onClick={() => fireAndForget(call.joinCall(), 'channel-call')}+ >+ <PhoneIcon class="size-3.5" />+ Join+ </Button>+ }+ >+ <Button+ variant="success"+ size="sm"+ onClick={() => setActiveTab('call')}+ >+ <PhoneIcon class="size-3.5" />+ Return to call+ </Button>+ </Show>+ }+ />+ );+}++/** A channel call's row: the thread's root, drawn as the call rather than a message. */+export function CallRootLine(props: {+ channelId: string;+ message: Message;+ status: CallEntryStatus;+ /** The call panel is already inside the call, so it offers no way in. */+ inCallPanel?: boolean;+ onVisibilityChange?: (visible: boolean) => void;+}) {+ const ended = () =>+ props.status.state === 'ended' ? props.status : undefined;++ return (+ <Switch>+ <Match when={props.status.state === 'live' && props.inCallPanel}>+ <LiveCallLine message={props.message} />+ </Match>+ <Match when={props.status.state === 'live'}>+ <LiveChannelCallLine+ channelId={props.channelId}+ message={props.message}+ onVisibilityChange={props.onVisibilityChange}+ />+ </Match>+ <Match when={ended()}>+ {(status) => (+ <PastCallLine+ message={props.message}+ verb={`started a call that lasted ${callDuration(status().duration_ms)}`}+ at={props.message.created_at}+ />+ )}+ </Match>+ <Match when={props.status.state === 'record_deleted'}>+ <PastCallLine+ message={props.message}+ verb="started a call"+ at={props.message.created_at}+ />+ </Match>+ </Switch>+ );+}diff --git a/apps/web/src/features/channel/Call/discussion/ChannelCallPanel.tsx b/apps/web/src/features/channel/Call/discussion/ChannelCallPanel.tsxnew file mode 100644index 0000000000..26057704de--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/ChannelCallPanel.tsx@@ -0,0 +1,51 @@+import { TraceFlow } from '@app/observability/flow';+import { Channel } from '@channel/Channel/Channel';+import {+ ChannelTabProvider,+ useChannelTabOptional,+} from '@channel/Channel/ChannelTabContext';+import { DEFAULT_CHANNEL_TAB } from '@channel/Channel/channel-tabs';+import { type JSX, Show } from 'solid-js';++/** Channels outside a channel surface still need a tab context to read. */+function TabContextBoundary(props: { children: JSX.Element }) {+ return (+ <Show+ when={useChannelTabOptional()}+ fallback={+ <ChannelTabProvider+ activeTab={() => DEFAULT_CHANNEL_TAB}+ setActiveTab={() => undefined}+ >+ {props.children}+ </ChannelTabProvider>+ }+ >+ {props.children}+ </Show>+ );+}++/** The channel, opened on the call's thread, in the call's panel. */+export function ChannelCallPanel(props: {+ channelId: string;+ rootId: string;+ onViewChannel: () => void;+ onOutsideCountChange?: (count: number) => void;+}) {+ return (+ <TabContextBoundary>+ <TraceFlow name="channel.call-panel.view">+ <Channel+ channelId={props.channelId}+ autofocus={false}+ callPanel={{+ rootId: props.rootId,+ onViewChannel: props.onViewChannel,+ onOutsideCountChange: props.onOutsideCountChange,+ }}+ />+ </TraceFlow>+ </TabContextBoundary>+ );+}diff --git a/apps/web/src/features/channel/Call/discussion/OutsideMessagesPopup.tsx b/apps/web/src/features/channel/Call/discussion/OutsideMessagesPopup.tsxnew file mode 100644index 0000000000..680210cf19--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/OutsideMessagesPopup.tsx@@ -0,0 +1,46 @@+import { t } from '@app/lib/i18n';+import { UserIcon } from '@core/component/UserIcon';+import { getDisplayName, tryMacroId } from '@core/user';+import ArrowUpRightIcon from '@icon/system/regular/arrow-up-right.svg';+import type { Message } from '@service-storage/messages';+import { Layer } from '@ui';++/** Says the channel has moved on while you're in the call's thread. */+export function OutsideMessagesPopup(props: {+ messages: Message[];+ onView: () => void;+}) {+ const latest = () => props.messages[props.messages.length - 1];+ const senderName = () =>+ getDisplayName(tryMacroId(latest().sender_id)).split(/\s+/)[0] ||+ t('calls.someone');++ return (+ <Layer depth={3}>+ <button+ type="button"+ class="absolute bottom-2 left-1/2 z-10 flex -translate-x-1/2 items-center gap-2 rounded-full border border-edge-muted bg-surface py-1.5 pr-3 pl-1.5 text-xs whitespace-nowrap shadow-lg not-touch:hover:overlay-hover not-touch:active:overlay-active"+ onClick={() => props.onView()}+ >+ <span class="size-5 shrink-0 *:size-full *:rounded-full">+ <UserIcon+ id={latest().sender_id}+ size="fill"+ suppressClick+ showTooltip={false}+ />+ </span>+ <span class="text-ink">+ {t('calls.outsideMessages', {+ count: props.messages.length,+ name: senderName(),+ })}+ </span>+ <span class="flex items-center gap-1 font-medium text-accent">+ {t('calls.viewChannel')}+ <ArrowUpRightIcon class="size-3" />+ </span>+ </button>+ </Layer>+ );+}diff --git a/apps/web/src/features/channel/Call/discussion/PastCallLine.tsx b/apps/web/src/features/channel/Call/discussion/PastCallLine.tsxnew file mode 100644index 0000000000..232a2901fa--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/PastCallLine.tsx@@ -0,0 +1,40 @@+import { SystemActivityLine } from '@channel/components/SystemActivityRow';+import { getDisplayName, tryMacroId } from '@core/user';+import PhoneFillIcon from '@icon/system/fill/phone-fill.svg';+import type { Message } from '@service-storage/messages';++export function callerName(message: Message): string {+ return getDisplayName(tryMacroId(message.sender_id)) || 'Someone';+}++/** The system line for a call that is over, or whose record is gone. */+export function PastCallLine(props: {+ message: Message;+ verb: string;+ at: string;+}) {+ return (+ <div data-message-id={props.message.id}>+ <SystemActivityLine+ id={props.message.id}+ icon={PhoneFillIcon}+ iconClass="text-success"+ actor={callerName(props.message)}+ verb={props.verb}+ label={`${callerName(props.message)} ${props.verb}`}+ occurredAt={props.at}+ />+ </div>+ );+}++/** A call's root outside the channel timeline, where its life isn't known. */+export function DetachedCallRootLine(props: { message: Message }) {+ return (+ <PastCallLine+ message={props.message}+ verb="started a call"+ at={props.message.created_at}+ />+ );+}diff --git a/apps/web/src/features/channel/Call/discussion/browser-test/call-thread.browser.e2e.ts b/apps/web/src/features/channel/Call/discussion/browser-test/call-thread.browser.e2e.tsnew file mode 100644index 0000000000..d7549c0ade--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/browser-test/call-thread.browser.e2e.ts@@ -0,0 +1,303 @@+import { expect, type Page, test } from '@playwright/test';++const CHANNEL_ID = '00000000-0000-7000-8000-00000000c0c0';+const CALL_ID = '00000000-0000-7000-8000-0000000ca110';+const CALLER = 'macro|[email protected]';+const STARTED_AT = new Date(Date.now() - 5 * 60_000).toISOString();+const PATH =+ '/src/features/channel/Call/discussion/browser-test/call-thread.html';++function message(id: string, content: string, overrides: object = {}) {+ return {+ id,+ parent: { type: 'channel', id: CHANNEL_ID },+ thread_id: null,+ kind: 'message',+ sender_id: 'macro|[email protected]',+ mentions: [],+ content,+ created_at: STARTED_AT,+ updated_at: STARTED_AT,+ attachments: [],+ reactions: [],+ ...overrides,+ };+}++function listItem(+ body: ReturnType<typeof message>,+ replies: ReturnType<typeof message>[]+) {+ return {+ ...body,+ state: {+ root_id: body.id,+ user_id: body.sender_id,+ resolved: false,+ anchor: null,+ created_at: body.created_at,+ updated_at: body.created_at,+ },+ thread: {+ reply_count: replies.length,+ latest_reply_at: replies.at(-1)?.created_at ?? null,+ preview: replies.slice(0, 3),+ },+ };+}++const reply = (id: string, content: string) =>+ message(id, content, {+ thread_id: CALL_ID,+ created_at: new Date(Date.parse(STARTED_AT) + 60_000).toISOString(),+ });++const root = message(CALL_ID, 'started a call', {+ kind: 'call_root',+ sender_id: CALLER,+});+const earlier = message(+ '00000000-0000-7000-8000-000000000e01',+ 'Earlier in the channel',+ { created_at: new Date(Date.parse(STARTED_AT) - 60_000).toISOString() }+);+const after = message(+ '00000000-0000-7000-8000-000000000a01',+ 'Posted outside the call',+ { created_at: new Date(Date.now() + 60_000).toISOString() }+);++type Scenario = {+ status: object;+ replies?: ReturnType<typeof message>[];+ outside?: boolean;+};++async function open(+ page: Page,+ view: 'messages' | 'panel',+ scenario: Scenario+) {+ const replies = scenario.replies ?? [];+ const posted: unknown[] = [];+ const entries = [+ ...(scenario.outside+ ? [{ type: 'message', message: listItem(after, []) }]+ : []),+ {+ type: 'call',+ message: listItem(root, replies),+ status: scenario.status,+ },+ { type: 'message', message: listItem(earlier, []) },+ ];+ await page.route('**/*', async (route) => {+ const request = route.request();+ const url = new URL(request.url());+ if (url.pathname.endsWith('/timeline')) {+ await route.fulfill({+ json: { entries, next_cursor: null, previous_cursor: null },+ });+ } else if (url.pathname.includes(`/threads/${CALL_ID}`)) {+ await route.fulfill({+ json: {+ root,+ state: listItem(root, replies).state,+ replies,+ },+ });+ } else if (+ url.pathname.endsWith(`/messages/channel/${CHANNEL_ID}`) &&+ request.method() === 'POST'+ ) {+ const body = request.postDataJSON();+ posted.push(body);+ await route.fulfill({+ json: message(body.id ?? 'posted', body.content, {+ thread_id: body.thread_id ?? null,+ }),+ });+ } else if (url.pathname.endsWith(`/call/${CHANNEL_ID}/active`)) {+ await route.fulfill({+ json:+ 'state' in scenario.status && scenario.status.state === 'live'+ ? {+ callId: CALL_ID,+ channelId: CHANNEL_ID,+ createdBy: CALLER,+ createdAt: STARTED_AT,+ }+ : null,+ });+ } else if (+ url.hostname === 'localhost' &&+ !url.pathname.startsWith('/__macro_dev/')+ ) {+ await route.continue();+ } else {+ // The fixture reads nothing else; hosted data is never read or written.+ await route.fulfill({ status: 404, json: {} });+ }+ });+ await page.routeWebSocket('**/*', (socket) => socket.close());+ await page.goto(`${PATH}?view=${view}`);+ return { posted };+}++const callRow = (page: Page) =>+ page.locator(`[data-message-id="${CALL_ID}"]`).first();++test('a live call is a row with its thread collapsed under it and a way in', async ({+ page,+}, testInfo) => {+ await open(page, 'messages', {+ status: { state: 'live' },+ replies: [reply('00000000-0000-7000-8000-000000000b01', 'First reply')],+ });++ await expect(callRow(page)).toContainText('started a call', {+ timeout: 30_000,+ });+ await expect(+ callRow(page).getByRole('button', { name: 'Join' })+ ).toBeVisible();+ await expect(page.getByText('First reply')).toHaveCount(0);+ // Touch replies through the one floating composer rather than under the row.+ if (testInfo.project.name === 'desktop') {+ await expect(+ page.locator('[data-input-id^="thread-reply-input"]')+ ).toHaveCount(1);+ }++ await page.getByRole('button', { name: /1 reply/ }).click();+ await expect(page.getByText('First reply')).toBeVisible();+});++test('an ended call says how long it lasted and offers no way in', async ({+ page,+}) => {+ await open(page, 'messages', {+ status: {+ state: 'ended',+ ended_at: new Date().toISOString(),+ duration_ms: 38 * 60_000,+ },+ });++ await expect(callRow(page)).toContainText(+ 'started a call that lasted 38 minutes',+ {+ timeout: 30_000,+ }+ );+ await expect(callRow(page).getByRole('button', { name: 'Join' })).toHaveCount(+ 0+ );+});++test('the panel opens on a blank slate, with the channel above and nothing newer', async ({+ page,+}) => {+ await open(page, 'panel', { status: { state: 'live' }, outside: true });++ await expect(page.getByText(/No messages yet/)).toBeVisible({+ timeout: 30_000,+ });+ await expect(page.getByText('Posted outside the call')).toHaveCount(0);++ // The call's row starts the view: the channel above it is out of sight.+ const list = await page.getByTestId('call-panel').boundingBox();+ const row = await callRow(page).boundingBox();+ expect(row && list && row.y - list.y).toBeLessThan(120);+ await expect(page.getByText('Earlier in the channel')).not.toBeInViewport();+});++test('sending from the panel replies in the call thread, never to the channel', async ({+ page,+}, testInfo) => {+ // The touch composer starts collapsed; its own suite covers opening it.+ test.skip(testInfo.project.name === 'phone');+ const { posted } = await open(page, 'panel', { status: { state: 'live' } });++ await expect(page.getByText('Replying in the call thread')).toBeVisible({+ timeout: 30_000,+ });+ const composer = page.locator('[data-markdown-editable]');+ await composer.click();+ await page.keyboard.type('From the call');+ await page.getByRole('button', { name: /send/i }).click();++ await expect.poll(() => posted.length).toBe(1);+ expect(posted[0]).toMatchObject({ thread_id: CALL_ID });++ // The composer stays on the call thread, empty and ready for the next one.+ await expect(page.getByText('Replying in the call thread')).toBeVisible();+ await expect(composer).toHaveText('');+});++test('a thread with messages opens at the newest, and a reply quotes in place', async ({+ page,+}, testInfo) => {+ // Reply is a hover action here and a long-press drawer on touch.+ test.skip(testInfo.project.name === 'phone');+ const { posted } = await open(page, 'panel', {+ status: { state: 'live' },+ replies: Array.from({ length: 40 }, (_, index) =>+ reply(+ `00000000-0000-7000-8000-0000000b00${(10 + index).toString()}`,+ `Message ${index + 1}`+ )+ ),+ });++ const newest = page.getByText('Message 40', { exact: true });+ await expect(newest).toBeInViewport({ timeout: 30_000 });+ await expect(callRow(page)).not.toBeInViewport();++ await newest.hover();+ await page+ .getByRole('button', { name: 'Reply', exact: true })+ .first()+ .click();+ await page.keyboard.type('Agreed');+ await page.getByRole('button', { name: /send/i }).click();++ await expect.poll(() => posted.length).toBe(1);+ expect(posted[0]).toMatchObject({ thread_id: CALL_ID });+ expect(JSON.stringify(posted[0])).toContain('m-reply-target');+});++test('scrolling up through the channel stays put', async ({+ page,+}, testInfo) => {+ test.skip(testInfo.project.name === 'phone');+ await open(page, 'panel', { status: { state: 'live' } });+ await expect(page.getByText(/No messages yet/)).toBeVisible({+ timeout: 30_000,+ });++ await page.getByTestId('call-panel').hover({ force: true });+ await page.mouse.wheel(0, -300);+ const earlierInChannel = page.getByText('Earlier in the channel');+ await expect(earlierInChannel).toBeInViewport();++ // Long enough for anything that pulls the list back down to have done so.+ await page.waitForTimeout(1_500);+ await expect(earlierInChannel).toBeInViewport();+});++test('the popup counts outside messages and swaps to the channel at the latest', async ({+ page,+}) => {+ await open(page, 'panel', { status: { state: 'live' }, outside: true });++ const popup = page.getByRole('button', {+ name: /sent a message in the channel/,+ });+ await expect(popup).toBeVisible({ timeout: 30_000 });++ await popup.click();++ await expect(page.getByTestId('messages-tab')).toBeVisible();+ await expect(page.getByText('Posted outside the call')).toBeInViewport();+});diff --git a/apps/web/src/features/channel/Call/discussion/browser-test/call-thread.html b/apps/web/src/features/channel/Call/discussion/browser-test/call-thread.htmlnew file mode 100644index 0000000000..0064b506d3--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/browser-test/call-thread.html@@ -0,0 +1,5 @@+<!doctype html>+<html lang="en">+ <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Channel call thread</title></head>+ <body><div id="root"></div><script type="module" src="./call-thread.tsx"></script></body>+</html>diff --git a/apps/web/src/features/channel/Call/discussion/browser-test/call-thread.tsx b/apps/web/src/features/channel/Call/discussion/browser-test/call-thread.tsxnew file mode 100644index 0000000000..6d364c79f4--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/browser-test/call-thread.tsx@@ -0,0 +1,113 @@+import '@app/index.css';+import { AnalyticsContextProvider } from '@app/lib/analytics/analytics-context';+import { PosthogProvider } from '@app/lib/analytics/posthog';+import { GlobalAppStateProvider } from '@components/app/GlobalAppState';+import { ChannelsContextProvider } from '@core/context/channels';+import { EmailLinksContextProvider } from '@core/context/emailLinks';+import { QuickAccessProvider } from '@core/context/quickAccess/QuickAccessProvider';+import { UserContextProvider } from '@core/context/user';+import { useHotKeyRoot } from '@core/hotkey/hotkeys';+import type { BlockOrchestrator } from '@core/orchestrator';+import { EntityProvider } from '@entity';+import type { NotificationSource } from '@notifications';+import { authKeys, type UserInfoData } from '@queries/auth/user-info';+import { queryClient } from '@queries/client';+import { QueryClientProvider } from '@tanstack/solid-query';+import { DragDropProvider } from '@thisbeyond/solid-dnd';+import { createSignal, Show, Suspense } from 'solid-js';+import { render } from 'solid-js/web';+import { Channel } from '../../../Channel/Channel';+import { ChannelTabProvider } from '../../../Channel/ChannelTabContext';+import type { ChannelTabId } from '../../../Channel/channel-tabs';+import { CallProvider } from '../../CallContext';+import { ChannelCallPanel } from '../ChannelCallPanel';++// Only the app's data boundary is replaced; the channel on top of it is real.+const NO_NOTIFICATIONS = {+ notificationsByEntity: () => ({}),+ bulkMarkAsRead: async () => undefined,+} as unknown as NotificationSource;+const NO_BLOCKS = {} as BlockOrchestrator;++// A signed-in viewer, without a session: nothing here reaches a real account.+queryClient.setQueryData(authKeys.userInfo.queryKey, {+ authenticated: true,+ id: 'macro|[email protected]',+ permissions: [],+} as unknown as UserInfoData);++const CHANNEL_ID = '00000000-0000-7000-8000-00000000c0c0';+const CALL_ID = '00000000-0000-7000-8000-0000000ca110';++/** The Messages tab and the call's panel, swapped the way a person moves between them. */+function Fixture() {+ useHotKeyRoot();+ const initial = new URLSearchParams(location.search).get('view');+ const [tab, setTab] = createSignal<ChannelTabId>(+ initial === 'panel' ? 'call' : 'messages'+ );+ return (+ <QueryClientProvider client={queryClient}>+ <AnalyticsContextProvider>+ <PosthogProvider>+ <EntityProvider>+ <UserContextProvider>+ <EmailLinksContextProvider>+ <ChannelsContextProvider>+ <CallProvider>+ <QuickAccessProvider>+ <GlobalAppStateProvider+ notificationSource={NO_NOTIFICATIONS}+ blockOrchestrator={NO_BLOCKS}+ >+ <DragDropProvider>+ <ChannelTabProvider+ activeTab={tab}+ setActiveTab={setTab}+ >+ <main class="flex h-screen min-h-0 flex-col bg-page text-ink">+ <Suspense>+ <Show+ when={tab() === 'call'}+ fallback={+ <div+ class="flex min-h-0 flex-1 flex-col"+ data-testid="messages-tab"+ >+ <Channel+ channelId={CHANNEL_ID}+ autofocus={false}+ />+ </div>+ }+ >+ <div+ class="mx-auto flex min-h-0 w-full max-w-[372px] flex-1 flex-col bg-surface-2"+ data-testid="call-panel"+ >+ <ChannelCallPanel+ channelId={CHANNEL_ID}+ rootId={CALL_ID}+ onViewChannel={() => setTab('messages')}+ />+ </div>+ </Show>+ </Suspense>+ </main>+ </ChannelTabProvider>+ </DragDropProvider>+ </GlobalAppStateProvider>+ </QuickAccessProvider>+ </CallProvider>+ </ChannelsContextProvider>+ </EmailLinksContextProvider>+ </UserContextProvider>+ </EntityProvider>+ </PosthogProvider>+ </AnalyticsContextProvider>+ </QueryClientProvider>+ );+}++const root = document.getElementById('root');+if (root) render(() => <Fixture />, root);diff --git a/apps/web/src/features/channel/Call/discussion/browser-test/playwright.config.ts b/apps/web/src/features/channel/Call/discussion/browser-test/playwright.config.tsnew file mode 100644index 0000000000..93cab6d31c--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/browser-test/playwright.config.ts@@ -0,0 +1,30 @@+import { fileURLToPath } from 'node:url';+import { defineConfig } from '@playwright/test';++const port = process.env.CALL_THREAD_TEST_PORT ?? '3071';+export default defineConfig({+ testDir: fileURLToPath(new URL('.', import.meta.url)),+ testMatch: '*.browser.e2e.ts',+ workers: 1,+ timeout: 120_000,+ use: {+ baseURL: `http://localhost:${port}`,+ launchOptions: {+ executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH,+ },+ },+ projects: [+ { name: 'desktop', use: { viewport: { width: 1280, height: 860 } } },+ {+ name: 'phone',+ use: { viewport: { width: 390, height: 844 }, hasTouch: true },+ },+ ],+ webServer: {+ command: `MACRO_DEV_HTTPS=false bunx vite --port ${port} --strictPort`,+ cwd: fileURLToPath(new URL('../../../../../../', import.meta.url)),+ url: `http://localhost:${port}/app/`,+ reuseExistingServer: false,+ timeout: 60_000,+ },+});diff --git a/apps/web/src/features/channel/Call/discussion/call-discussion.ts b/apps/web/src/features/channel/Call/discussion/call-discussion.tsnew file mode 100644index 0000000000..21d5de93e2--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/call-discussion.ts@@ -0,0 +1,20 @@+import type { useLiveCallRecordQuery } from '@queries/call/call';+import type { CallRecord } from '@service-call/client';++export type CallDiscussion = CallRecord['discussion'];++/**+ * The active call's discussion, once its record says. A record the viewer can't+ * read belongs to a call with its own chat: channel threads are for members.+ */+export function callDiscussionOf(+ record: ReturnType<typeof useLiveCallRecordQuery>,+ callId: string | null | undefined+): CallDiscussion | undefined {+ if (!callId) return undefined;+ if (record.isPending) return undefined;+ // A failed poll keeps the data it had; only a first read that failed has none.+ if (record.isLoadingError) return { kind: 'call_chat', call_id: callId };+ if (record.data?.callId !== callId) return undefined;+ return record.data.discussion;+}diff --git a/apps/web/src/features/channel/Call/discussion/format-call-elapsed.ts b/apps/web/src/features/channel/Call/discussion/format-call-elapsed.tsnew file mode 100644index 0000000000..11f47e65d0--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/format-call-elapsed.ts@@ -0,0 +1,16 @@+/** How long a call has been running: `4:05`, or `1h 12m` past an hour. */+export function formatCallElapsed(+ startedAt: string | undefined,+ nowMs: number+) {+ const startedAtMs = startedAt ? new Date(startedAt).getTime() : Number.NaN;+ if (!Number.isFinite(startedAtMs)) return '';++ const totalSeconds = Math.max(0, Math.floor((nowMs - startedAtMs) / 1000));+ const hours = Math.floor(totalSeconds / 3600);+ const minutes = Math.floor((totalSeconds % 3600) / 60);+ const seconds = totalSeconds % 60;++ if (hours > 0) return `${hours}h ${minutes}m`;+ return `${minutes}:${seconds.toString().padStart(2, '0')}`;+}diff --git a/apps/web/src/features/channel/Call/discussion/outside-messages.test.ts b/apps/web/src/features/channel/Call/discussion/outside-messages.test.tsnew file mode 100644index 0000000000..7deed94662--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/outside-messages.test.ts@@ -0,0 +1,58 @@+import type { MessageTimelineEntry } from '@service-storage/messages';+import { describe, expect, it } from 'vitest';+import { outsideMessages } from './outside-messages';++const ME = 'macro|[email protected]';+const THEM = 'macro|[email protected]';+const SINCE = '2026-11-05T12:00:00Z';++function entry(+ id: string,+ options: { sender?: string; at?: string; deleted?: boolean } = {}+) {+ return {+ type: 'message',+ message: {+ id,+ sender_id: options.sender ?? THEM,+ created_at: options.at ?? '2026-11-05T12:05:00Z',+ deleted_at: options.deleted ? '2026-11-05T12:06:00Z' : null,+ },+ } as unknown as MessageTimelineEntry;+}++function ids(entries: MessageTimelineEntry[]) {+ return outsideMessages(entries, { since: SINCE, currentUserId: ME }).map(+ (message) => message.id+ );+}++describe('outsideMessages', () => {+ it('counts what others posted to the channel since then', () => {+ expect(ids([entry('new')])).toEqual(['new']);+ });++ it('leaves out older messages, your own and deleted ones', () => {+ expect(+ ids([+ entry('older', { at: '2026-11-05T11:59:00Z' }),+ entry('mine', { sender: ME }),+ entry('deleted', { deleted: true }),+ ])+ ).toEqual([]);+ });++ it('leaves out call rows and activity, which are not messages to catch up on', () => {+ const call = {+ ...entry('call'),+ type: 'call',+ status: { state: 'live' },+ } as unknown as MessageTimelineEntry;+ const activity = {+ type: 'activity',+ activity: { id: 'a', occurred_at: '2026-11-05T12:05:00Z' },+ } as unknown as MessageTimelineEntry;++ expect(ids([call, activity])).toEqual([]);+ });+});diff --git a/apps/web/src/features/channel/Call/discussion/outside-messages.ts b/apps/web/src/features/channel/Call/discussion/outside-messages.tsnew file mode 100644index 0000000000..6760548463--- /dev/null+++ b/apps/web/src/features/channel/Call/discussion/outside-messages.ts@@ -0,0 +1,22 @@+import type { MessageTimelineEntry } from '@service-storage/messages';++/**+ * Top-level channel messages from others since the given time. Thread replies+ * and the call's own thread never count: they don't appear after the call.+ */+export function outsideMessages(+ entries: readonly MessageTimelineEntry[],+ options: { since: string; currentUserId: string | undefined }+) {+ const since = new Date(options.since).getTime();+ return entries.flatMap((entry) => {+ if (entry.type !== 'message') return [];++ const { message } = entry;+ const counts =+ !message.deleted_at &&+ message.sender_id !== options.currentUserId &&+ new Date(message.created_at).getTime() > since;+ return counts ? [message] : [];+ });+}diff --git a/apps/web/src/features/channel/Call/tests/call-exit-navigation.test.tsx b/apps/web/src/features/channel/Call/tests/call-exit-navigation.test.tsxindex f31545cc26..1860d159fc 100644--- a/apps/web/src/features/channel/Call/tests/call-exit-navigation.test.tsx+++ b/apps/web/src/features/channel/Call/tests/call-exit-navigation.test.tsx@@ -31,7 +31,13 @@ vi.mock('../CallOverlay', () => ({</button>),}));-vi.mock('@queries/call/call', () => ({}));+vi.mock('@queries/call/call', () => ({+ useLiveCallRecordQuery: () => ({ isSuccess: false, isError: false }),+}));+vi.mock('@core/context/channels', () => ({+ useChannel: () => () => undefined,+}));+vi.mock('@channel/Call/discussion/CallDiscussionContent', () => ({}));vi.mock('@core/component/UserGroup', () => ({}));vi.mock('@core/user', () => ({}));diff --git a/apps/web/src/features/channel/Channel/ActiveCallMessage.tsx b/apps/web/src/features/channel/Channel/ActiveCallMessage.tsxindex d9a293b9f4..5a66485188 100644--- a/apps/web/src/features/channel/Channel/ActiveCallMessage.tsx+++ b/apps/web/src/features/channel/Channel/ActiveCallMessage.tsx@@ -1,5 +1,7 @@import { analytics } from '@app/lib/analytics';+import { t } from '@app/lib/i18n';import { getCallJoinTab } from '@channel/Call/call-tabs';+import { formatCallElapsed } from '@channel/Call/discussion/format-call-elapsed';import { useCall } from '@channel/Call/use-call';import { fireAndForget } from '@core/util/fireAndForget';import PhoneIcon from '@icon/system/regular/phone-call.svg';@@ -8,20 +10,15 @@ import { Button } from '@ui';import { createMemo, createSignal, onCleanup, Show } from 'solid-js';import { useChannelTab } from './ChannelTabContext';-function formatDuration(startedAt: string | undefined, nowMs: number) {- const startedAtMs = startedAt ? new Date(startedAt).getTime() : Number.NaN;- if (!Number.isFinite(startedAtMs)) return '';-- const totalSeconds = Math.max(0, Math.floor((nowMs - startedAtMs) / 1000));- const hours = Math.floor(totalSeconds / 3600);- const minutes = Math.floor((totalSeconds % 3600) / 60);- const seconds = totalSeconds % 60;-- if (hours > 0) return `${hours}h ${minutes}m`;- return `${minutes}:${seconds.toString().padStart(2, '0')}`;-}--export function ActiveCallMessage(props: { channelId: string }) {+export function ActiveCallMessage(props: {+ channelId: string;+ /** The call's own row is on screen and says all this already. */+ hidden?: boolean;+ /** Messages in the call's thread, when its discussion is in the channel. */+ messageCount?: (callId: string) => number | undefined;+ /** Takes the viewer to the call's row. */+ onOpenRow?: (callId: string) => void;+}) {const activeCallQuery = useActiveCallQuery(() => props.channelId);const { setActiveTab } = useChannelTab();const call = useCall(() => props.channelId, {@@ -34,9 +31,14 @@ export function ActiveCallMessage(props: { channelId: string }) {);onCleanup(() => globalThis.clearInterval(durationTimer));- const shouldShow = () => !!activeCallQuery.data && !call.isInThisChannel();+ const shouldShow = () =>+ !props.hidden && !!activeCallQuery.data && !call.isInThisChannel();+ const messageCount = () => {+ const callId = activeCallQuery.data?.callId;+ return callId ? props.messageCount?.(callId) : undefined;+ };const duration = createMemo(() =>- formatDuration(activeCallQuery.data?.createdAt, nowMs())+ formatCallElapsed(activeCallQuery.data?.createdAt, nowMs()));async function handleJoin() {@@ -78,9 +80,27 @@ export function ActiveCallMessage(props: { channelId: string }) {><div class="flex min-w-0 items-center gap-2"><div class="min-w-0 flex-1">- <div class="font-medium">- A call is active in this channel- </div>+ <Show+ when={messageCount()}+ fallback={+ <div class="font-medium">+ A call is active in this channel+ </div>+ }+ >+ {(count) => (+ <button+ type="button"+ class="font-medium hover:underline"+ onClick={() => {+ const callId = activeCallQuery.data?.callId;+ if (callId) props.onOpenRow?.(callId);+ }}+ >+ {t('calls.activeCallMessages', { count: count() })}+ </button>+ )}+ </Show><Show when={duration()}>{(value) => (<div class="text-xs text-ink-extra-muted">diff --git a/apps/web/src/features/channel/Channel/Channel.tsx b/apps/web/src/features/channel/Channel/Channel.tsxindex e83884ca8b..3e039a75ba 100644--- a/apps/web/src/features/channel/Channel/Channel.tsx+++ b/apps/web/src/features/channel/Channel/Channel.tsx@@ -6,7 +6,8 @@ import { AgentConversationsProvider } from '@app/features/agent-conversations/agimport { AgentDmComposer } from '@app/features/agent-dms/agent-dm-composer';import { openChatWithInput } from '@app/features/chat/ChatWithAgentButton';import { taskSourceComposerContext } from '@app/features/task-composer/source-context';-import { usePending } from '@app/observability/flow';+import { t } from '@app/lib/i18n';+import { beginInteraction, usePending } from '@app/observability/flow';import { startUiOperation } from '@app/observability/ui-operation';import { createActivityTracker } from '@channel/activity-tracker';import { useStartChannelCall } from '@channel/Call/use-start-channel-call';@@ -85,6 +86,7 @@ import { timelineEntryKey } from '@queries/messages/timeline-entries';import { usePostTypingUpdateMutation } from '@queries/messages/typing';import { ChannelTypeEnum } from '@service-storage/client';import { tourTarget } from '@ui/components/Tour';+import { cn } from '@ui/utils/classname';import {createEffect,createMemo,@@ -93,9 +95,14 @@ import {on,onCleanup,onMount,+ type ParentProps,Show,Switch,} from 'solid-js';+import { Dynamic } from 'solid-js/web';+import { CallRootLine } from '../Call/discussion/CallRootLine';+import { OutsideMessagesPopup } from '../Call/discussion/OutsideMessagesPopup';+import { outsideMessages } from '../Call/discussion/outside-messages';import { ChannelAccessDenied } from '../ChannelAccessDenied';import {createInputAttachmentTracker,@@ -164,6 +171,13 @@ export type ChannelProps = {onHandleReady?: (handle: ChannelHandle) => void;/** Whether to auto-focus the channel input on mount. Defaults to `!isTouchDevice()`. */autofocus?: boolean;+ /** Shows the channel inside a call, opened on that call's thread. */+ callPanel?: {+ /** The root of the call's thread. */+ rootId: string;+ onViewChannel: () => void;+ onOutsideCountChange?: (count: number) => void;+ };};export type MessageTimelineStateSnapshot = {@@ -179,7 +193,16 @@ export type ChannelHandle = {getMessagesStateSnapshot: () => MessageTimelineStateSnapshot | undefined;};+/** A composer that stays where it is, for a surface with no floating chrome. */+function InPlaceRegion(props: ParentProps) {+ return <>{props.children}</>;+}+export function Channel(props: ChannelProps) {+ // Read once: a channel doesn't change between being a panel and not.+ const callPanel = props.callPanel;+ // The panel has one composer however wide it is, always bound to a thread.+ const usesUnifiedInput = () => !!callPanel || isUnifiedInputMode();const userId = useUserId();const splitPanel = useSplitPanel();const channelCall = useStartChannelCall(() => props.channelId);@@ -306,16 +329,77 @@ export function Channel(props: ChannelProps) {on(() => queryReadyGate(messagesQuery),(loaded) => {- if (!loaded || entryViewRecorded) return;+ // The panel hides what's new in the channel, so it hasn't been seen.+ if (callPanel || !loaded || entryViewRecorded) return;entryViewRecorded = true;recordChannelViewWhenIdle(props.channelId);}));- onCleanup(() => recordChannelViewWhenIdle(props.channelId));+ onCleanup(() => {+ if (!callPanel) recordChannelViewWhenIdle(props.channelId);+ });++ // Rows newer than the call are the channel's, not the call's.+ const rowKeys = createMemo(() => {+ if (!callPanel) return messageIndex.entryKeys;+ const root = messageIndex.entryKeys.indexOf(callPanel.rootId);+ return root < 0 ? [] : messageIndex.entryKeys.slice(0, root + 1);+ });++ // A long-running call's row can be further back than the newest page.+ createEffect(+ on(+ () =>+ !!callPanel &&+ !messageById().has(callPanel.rootId) &&+ messagesQuery.hasNextPage &&+ !messagesQuery.isFetchingNextPage,+ (shouldLoadOlder) => {+ if (shouldLoadOlder) {+ fireAndForget(messagesQuery.fetchNextPage(), 'channel-call');+ }+ }+ )+ );++ const [outsideSince, setOutsideSince] = createSignal(+ new Date().toISOString()+ );+ const outside = createMemo(() =>+ callPanel+ ? outsideMessages(messageIndex.entries, {+ since: outsideSince(),+ currentUserId: userId(),+ })+ : []+ );+ createEffect(+ on(+ () => outside().length,+ (count) => callPanel?.onOutsideCountChange?.(count)+ )+ );+ const viewChannelFromPanel = () => {+ if (!callPanel) return;++ beginInteraction('call.panel.view_channel', {+ attributes: {+ 'channel.id': props.channelId,+ 'call.id': callPanel.rootId,+ 'call.panel.outside_count': outside().length,+ },+ closeOnJoin: true,+ });+ setOutsideSince(new Date().toISOString());+ callPanel.onViewChannel();+ };++ const [liveCallRowVisible, setLiveCallRowVisible] = createSignal(false);const unifiedInput = createUnifiedInputManager({initialReplyTarget: props.initialMessagesStateSnapshot?.replyTarget,+ defaultThreadId: callPanel?.rootId,// Clear any highlight left by tapping the reply flag's navigate action.onReplyThreadReleased: (threadId) => releaseSelectionAndTarget(threadId),});@@ -323,6 +407,9 @@ export function Channel(props: ChannelProps) {const threadManager = createThreadManager(props.initialMessagesStateSnapshot?.threads);+ if (callPanel) {+ threadManager.getOrCreateThreadState(callPanel.rootId).setIsExpanded(true);+ }const prepareTargetReply = (threadId: string) => {// Expand before the virtualized row mounts so navigation never presents a@@ -350,7 +437,7 @@ export function Channel(props: ChannelProps) {onEditEnded: (message) => {// Clear any highlight left by tapping the edit flag's navigate action// (which selects and nav-targets the edited message's thread).- if (isUnifiedInputMode()) {+ if (usesUnifiedInput()) {releaseSelectionAndTarget(message.thread_id ?? message.id);}},@@ -370,7 +457,7 @@ export function Channel(props: ChannelProps) {!messagesQuery.hasNextPage,// Only an inline composer extends the rail before a reply exists.(message) =>- !isUnifiedInputMode() &&+ !usesUnifiedInput() &&threadManager.getOrCreateThreadState(message.id).isReplying()));@@ -425,7 +512,7 @@ export function Channel(props: ChannelProps) {const openReplyInput = (message: MessageData) => {const threadId = message.thread_id ?? message.id;const state = threadManager.getOrCreateThreadState(threadId);- if (isUnifiedInputMode()) {+ if (usesUnifiedInput()) {unifiedInput.bindReply(message);state.setIsExpanded(true);} else {@@ -456,7 +543,7 @@ export function Channel(props: ChannelProps) {};state.setReplyInputState(nextSnapshot);- if (isUnifiedInputMode()) {+ if (usesUnifiedInput()) {unifiedInput.bindReply(message);state.setIsExpanded(true);} else {@@ -803,7 +890,7 @@ export function Channel(props: ChannelProps) {/></Show><Show- when={messageIndex.entryKeys.length > 0}+ when={rowKeys().length > 0}fallback={<Showwhen={@@ -817,7 +904,10 @@ export function Channel(props: ChannelProps) {}><div- class="relative flex-1 min-h-0"+ class={cn(+ 'relative flex-1 min-h-0',+ callPanel && '[container-type:size]'+ )}ref={setThreadListContainerEl}><MessageNotificationIndexContext.Provider@@ -828,7 +918,7 @@ export function Channel(props: ChannelProps) {triggerBehavior="spring-back"><ThreadList- keys={() => messageIndex.entryKeys}+ keys={rowKeys}targetId={targetMessageController.hasPendingElementScroll()? targetMessageController.activeTargetMessageId()@@ -861,7 +951,12 @@ export function Channel(props: ChannelProps) {>{(item) => {const isNewestRow = () =>- item.id === messageIndex.entryKeys.at(-1);+ item.id === rowKeys().at(-1);+ const callStatus = () =>+ messageIndex.callStatusByKey.get(item.id);+ const isCallRow = () => !!callStatus();+ const isPanelRoot = () =>+ item.id === callPanel?.rootId;const activity = () =>messageIndex.activityByKey.get(item.id);const message = () =>@@ -905,118 +1000,168 @@ export function Channel(props: ChannelProps) {item.id);return (- <ChannelThread- beforeMessage={- <AgentConversationContextBoundary- messageId={item.id}- />- }- afterMessage={- <AgentConversationMessageStatus- messageId={item.id}- />- }- hideTriggeredBy={- !!channel()?.agent_dm- }- data={m}- parent={() => ({- type: 'channel',- id: (() => props.channelId)(),- })}- isNewestThread={isNewestRow()}- getMessageActions={- getMessageActions+ <div+ class={+ isPanelRoot()+ ? 'relative min-h-[100cqh]'+ : 'contents'}- isFindBarOpen={findBar.isOpen}- targetNavigation={{- targetThreadId:- targetMessageController.activeTargetMessageId,- targetMessageId: () =>- !targetMessageController.pendingTargetReplyId()- ? targetMessageController.pendingScrollTargetId()- : undefined,- targetReplyId: () =>- targetMessageController.pendingScrollTargetId()- ? undefined- : targetMessageController.pendingTargetReplyId(),- activeTargetReplyId:- targetMessageController.activeTargetMessageReplyId,- positionTarget: (- _,- targetElement- ) =>- threadListNavigation()?.scrollToElement(+ >+ <ChannelThread+ rootSlot={+ isCallRow()+ ? () => (+ <Show when={callStatus()}>+ {(status) => (+ <CallRootLine+ channelId={+ props.channelId+ }+ message={m()}+ status={status()}+ inCallPanel={isPanelRoot()}+ onVisibilityChange={+ setLiveCallRowVisible+ }+ />+ )}+ </Show>+ )+ : undefined+ }+ hideCollapsedPreview={isCallRow()}+ beforeMessage={+ <AgentConversationContextBoundary+ messageId={item.id}+ />+ }+ afterMessage={+ <AgentConversationMessageStatus+ messageId={item.id}+ />+ }+ hideTriggeredBy={+ !!channel()?.agent_dm+ }+ data={m}+ parent={() => ({+ type: 'channel',+ id: (() => props.channelId)(),+ })}+ isNewestThread={isNewestRow()}+ getMessageActions={+ getMessageActions+ }+ isFindBarOpen={findBar.isOpen}+ targetNavigation={{+ targetThreadId:+ targetMessageController.activeTargetMessageId,+ targetMessageId: () =>+ !targetMessageController.pendingTargetReplyId()+ ? targetMessageController.pendingScrollTargetId()+ : undefined,+ targetReplyId: () =>+ targetMessageController.pendingScrollTargetId()+ ? undefined+ : targetMessageController.pendingTargetReplyId(),+ activeTargetReplyId:+ targetMessageController.activeTargetMessageReplyId,+ positionTarget: (+ _,targetElement- ) ?? false,- onTargetMessageScrolled:- targetMessageController.completePendingScroll,- onTargetReplyScrolled: (- replyId- ) => {- targetMessageController.completePendingReplyScroll(- item.id,+ ) =>+ threadListNavigation()?.scrollToElement(+ targetElement+ ) ?? false,+ onTargetMessageScrolled:+ targetMessageController.completePendingScroll,+ onTargetReplyScrolled: (replyId- );- },- onClearTarget:- releaseSelectionAndTarget,- }}- inputMode={- isUnifiedInputMode()- ? 'unified'- : 'inline'- }- unifiedReplyTarget={unifiedInput.replyTarget()}- onMessageMount={- unread.onMessageMount- }- onDisclosureMount={- unread.onDisclosureMount- }- unreadMessageIds={unread- .unreadByThread()- .get(item.id)}- isExpanded={state.isExpanded}- setIsExpanded={state.setIsExpanded}- isReplying={state.isReplying}- setIsReplying={state.setIsReplying}- replyInputState={- state.replyInputState- }- setReplyInputState={- state.setReplyInputState- }- setReplyInputEl={- state.setReplyInputEl- }- replyInputHandle={- state.replyInputHandle- }- setReplyInputHandle={- state.setReplyInputHandle- }- replyInputFocusRequest={- state.replyInputFocusRequest- }- listMeta={listMetaByKey()[item.id]}- messageEditor={messageEditor}- threadActions={{- onDismissNewMessages:- activityTracker.dismissNewMessages,- }}- isNewMessage={- activityTracker.isNewMessage- }- selectedMessageId={- selection.selectedId- }- onSelectMessage={selectMessage}- onClearSelection={clearSelection}- messageListScopeId={- messageListScopeId- }- />+ ) => {+ targetMessageController.completePendingReplyScroll(+ item.id,+ replyId+ );+ },+ onClearTarget:+ releaseSelectionAndTarget,+ }}+ inputMode={+ usesUnifiedInput()+ ? 'unified'+ : 'inline'+ }+ unifiedReplyTarget={unifiedInput.replyTarget()}+ onMessageMount={+ unread.onMessageMount+ }+ onDisclosureMount={+ unread.onDisclosureMount+ }+ unreadMessageIds={unread+ .unreadByThread()+ .get(item.id)}+ isExpanded={state.isExpanded}+ setIsExpanded={+ state.setIsExpanded+ }+ isReplying={state.isReplying}+ setIsReplying={+ state.setIsReplying+ }+ replyInputState={+ state.replyInputState+ }+ setReplyInputState={+ state.setReplyInputState+ }+ setReplyInputEl={+ state.setReplyInputEl+ }+ replyInputHandle={+ state.replyInputHandle+ }+ setReplyInputHandle={+ state.setReplyInputHandle+ }+ replyInputFocusRequest={+ state.replyInputFocusRequest+ }+ listMeta={+ listMetaByKey()[item.id]+ }+ messageEditor={messageEditor}+ threadActions={{+ onDismissNewMessages:+ activityTracker.dismissNewMessages,+ }}+ isNewMessage={+ activityTracker.isNewMessage+ }+ selectedMessageId={+ selection.selectedId+ }+ onSelectMessage={selectMessage}+ onClearSelection={clearSelection}+ messageListScopeId={+ messageListScopeId+ }+ />+ <Show+ when={+ isPanelRoot() &&+ m().thread.reply_count === 0+ }+ >+ <p class="pointer-events-none absolute inset-0 flex items-center justify-center px-6 text-center text-sm text-ink-muted">+ {t('calls.callThreadEmpty', {+ channel:+ channel()?.name ??+ t('calls.thisChannel'),+ })}+ </p>+ </Show>+ </div>);}}</Match>@@ -1026,7 +1171,29 @@ export function Channel(props: ChannelProps) {</ThreadList></SwipableRowProvider>- <Show when={!findBar.isOpen()}>+ <Show when={callPanel}>+ <Show+ when={+ threadListScrollState() &&+ !threadListScrollState()?.isNearBottom+ }+ >+ <button+ type="button"+ class="absolute top-2 left-1/2 z-10 -translate-x-1/2 rounded-full border border-edge-muted bg-surface px-3 py-1.5 text-xs shadow-lg not-touch:hover:overlay-hover not-touch:active:overlay-active"+ onClick={() => goToLatest()}+ >+ {t('calls.backToCallThread')}+ </button>+ </Show>+ <Show when={outside().length > 0}>+ <OutsideMessagesPopup+ messages={outside()}+ onView={viewChannelFromPanel}+ />+ </Show>+ </Show>+ <Show when={!callPanel && !findBar.isOpen()}><Show when={unread.chip()}>{(chip) => (<UnreadNotificationsOverlay@@ -1047,12 +1214,28 @@ export function Channel(props: ChannelProps) {</MessageNotificationIndexContext.Provider></div></Show>- <DebugSuspense name="Channel.active-call">- <ActiveCallMessage channelId={props.channelId} />- </DebugSuspense>+ <Show when={!callPanel}>+ <DebugSuspense name="Channel.active-call">+ <ActiveCallMessage+ channelId={props.channelId}+ hidden={liveCallRowVisible()}+ messageCount={(callId) =>+ messageIndex.callStatusByKey.has(callId)+ ? messageById().get(callId)?.thread.reply_count+ : undefined+ }+ onOpenRow={(callId) => goToMessage(callId)}+ />+ </DebugSuspense>+ </Show></div><DebugSuspense name="Channel.input">- <FloatRegionOrInline region="accessory">+ <Dynamic+ component={+ callPanel ? InPlaceRegion : FloatRegionOrInline+ }+ region="accessory"+ ><ChannelInputContainerref={(el) => {attachInputRef(el);@@ -1062,7 +1245,7 @@ export function Channel(props: ChannelProps) {<Switch><Matchwhen={- isUnifiedInputMode() &&+ usesUnifiedInput() &&messageEditor.state()?.messageId}keyed@@ -1082,7 +1265,7 @@ export function Channel(props: ChannelProps) {</Match><Matchwhen={- isUnifiedInputMode() &&+ usesUnifiedInput() &&unifiedInput.replyTarget()?.threadId}keyed@@ -1107,6 +1290,11 @@ export function Channel(props: ChannelProps) {(messageById().get(threadId)?.thread.reply_count ?? 0) > 0}+ pinnedLabel={+ threadId === callPanel?.rootId+ ? () => t('calls.replyingInCallThread')+ : undefined+ }onNavigateToTarget={() =>goToMessage(threadId,@@ -1184,7 +1372,7 @@ export function Channel(props: ChannelProps) {</Match></Switch></ChannelInputContainer>- </FloatRegionOrInline>+ </Dynamic></DebugSuspense></ChannelDropZone></MaybeMessageActionDrawerManager>diff --git a/apps/web/src/features/channel/Channel/ChannelTabContext.tsx b/apps/web/src/features/channel/Channel/ChannelTabContext.tsxindex 9e7b5e8f70..464ea9ae52 100644--- a/apps/web/src/features/channel/Channel/ChannelTabContext.tsx+++ b/apps/web/src/features/channel/Channel/ChannelTabContext.tsx@@ -42,6 +42,10 @@ export function ChannelTabProvider();}+export function useChannelTabOptional() {+ return useContext(ChannelTabContext);+}+export function useChannelTab(): ChannelTabContextValue {const ctx = useContext(ChannelTabContext);if (!ctx) {diff --git a/apps/web/src/features/channel/Channel/UnifiedReplyInput.tsx b/apps/web/src/features/channel/Channel/UnifiedReplyInput.tsxindex 276d2f5f82..f88c2626b2 100644--- a/apps/web/src/features/channel/Channel/UnifiedReplyInput.tsx+++ b/apps/web/src/features/channel/Channel/UnifiedReplyInput.tsx@@ -1,4 +1,4 @@-import { Show } from 'solid-js';+import { type JSX, Show } from 'solid-js';import { InputFlag } from '../Input';import type { MessageData } from '../Message';import { SenderName } from '../Message/SenderName';@@ -25,6 +25,8 @@ export function UnifiedReplyInput(props: {* reads "Replying to thread"; otherwise it names the message's sender.*/threadHasReplies: () => boolean;+ /** Names a thread the input is pinned to, which can't be dismissed. */+ pinnedLabel?: () => JSX.Element;onNavigateToTarget: () => void;onExit: () => void;}) {@@ -33,24 +35,36 @@ export function UnifiedReplyInput(props: {data-keep-keyboardclass="relative w-full flex flex-col items-center gap-1">- <InputFlag- label={- <Show- when={!props.threadHasReplies() && props.getTargetMessage()}- keyed- fallback="Replying to thread"- >- {(target) => (- <>- Replying to <SenderName message={target} />- </>- )}- </Show>+ <Show+ when={props.pinnedLabel}+ fallback={+ <InputFlag+ label={+ <Show+ when={!props.threadHasReplies() && props.getTargetMessage()}+ keyed+ fallback="Replying to thread"+ >+ {(target) => (+ <>+ Replying to <SenderName message={target} />+ </>+ )}+ </Show>+ }+ dismissLabel="Stop replying"+ onActivate={() => props.onNavigateToTarget()}+ onDismiss={() => props.onExit()}+ />}- dismissLabel="Stop replying"- onActivate={() => props.onNavigateToTarget()}- onDismiss={() => props.onExit()}- />+ >+ {(label) => (+ <InputFlag+ label={label()()}+ onActivate={() => props.onNavigateToTarget()}+ />+ )}+ </Show><ThreadReplyChannelInputparent={{ type: 'channel', id: props.channelId }}threadId={props.threadId}diff --git a/apps/web/src/features/channel/Channel/create-channel-message-actions.ts b/apps/web/src/features/channel/Channel/create-channel-message-actions.tsindex 91cb237b71..733ca1870e 100644--- a/apps/web/src/features/channel/Channel/create-channel-message-actions.ts+++ b/apps/web/src/features/channel/Channel/create-channel-message-actions.ts@@ -124,7 +124,7 @@ export function createChannelMessageActions(return {onReply: canReply ? (options.onReply ?? emptyReplyHandler) : undefined,onReact:- writable && !isDeleted+ writable && !isDeleted && message.kind !== 'call_root'? (ctx) => {const userId = options.userId();if (!userId) return;diff --git a/apps/web/src/features/channel/Channel/message-list-meta.ts b/apps/web/src/features/channel/Channel/message-list-meta.tsindex 9126074a67..3f46a585a0 100644--- a/apps/web/src/features/channel/Channel/message-list-meta.ts+++ b/apps/web/src/features/channel/Channel/message-list-meta.ts@@ -8,6 +8,7 @@ import {/** One timeline row: a message, or system activity between messages. */type ChannelListEntry<T> =| { type: 'message'; message: T }+ | { type: 'call'; message: T }| { type: 'activity'; activity: { id: string; occurred_at: string } };/** List meta keyed by `timelineEntryKey`, oldest entry first. */@@ -43,6 +44,21 @@ export function buildChannelMessageListMeta<T extends GroupableMessage>(continue;}+ // A call's row stands apart from the messages around it, like activity.+ if (entry.type === 'call') {+ metaByKey[key] = {+ index,+ isNewMessage: false,+ isFirstNewMessage: false,+ previousTopLevelCreatedAt,+ isGroupedWithPrevious: false,+ reachedStart,+ };+ previousTopLevelCreatedAt = entry.message.created_at;+ previousMessage = undefined;+ continue;+ }+const message = entry.message;const isNewMessage = isNewMessageFn(message);const isFirstNewMessage = isNewMessage && !foundFirstNewMessage;diff --git a/apps/web/src/features/channel/Channel/tests/message-list-meta.test.ts b/apps/web/src/features/channel/Channel/tests/message-list-meta.test.tsindex 19cf7eacf0..3ffb6c435d 100644--- a/apps/web/src/features/channel/Channel/tests/message-list-meta.test.ts+++ b/apps/web/src/features/channel/Channel/tests/message-list-meta.test.ts@@ -39,6 +39,30 @@ const entries = (messages: MessageListItem[]) =>messages.map((message) => ({ type: 'message' as const, message }));describe('buildChannelMessageListMeta', () => {+ it('keeps a call row apart from the messages around it', () => {+ const first = createMessage('m1', '2026-02-20T09:00:00.000Z');+ const call = createMessage('call', '2026-02-20T09:00:30.000Z');+ const second = createMessage('m2', '2026-02-20T09:01:00.000Z');+ const meta = buildChannelMessageListMeta(+ [+ { type: 'message', message: first },+ { type: 'call', message: call },+ { type: 'message', message: second },+ ],+ () => true,+ true+ );+ expect(meta.call).toMatchObject({+ index: 1,+ isNewMessage: false,+ isGroupedWithPrevious: false,+ });+ expect(meta.m2).toMatchObject({+ previousTopLevelCreatedAt: '2026-02-20T09:00:30.000Z',+ isGroupedWithPrevious: false,+ });+ });+it('counts activity rows and breaks sender runs and rails at them', () => {const first = createMessage('m1', '2026-02-20T09:00:00.000Z');const second = createMessage('m2', '2026-02-20T09:01:00.000Z');diff --git a/apps/web/src/features/channel/Channel/tests/unified-input-manager.test.ts b/apps/web/src/features/channel/Channel/tests/unified-input-manager.test.tsindex 39ff08d260..c58526f443 100644--- a/apps/web/src/features/channel/Channel/tests/unified-input-manager.test.ts+++ b/apps/web/src/features/channel/Channel/tests/unified-input-manager.test.ts@@ -8,6 +8,21 @@ const reply = { id: 'reply-1', thread_id: 'root-1' } as MessageData;const otherRoot = { id: 'root-2', thread_id: null } as MessageData;describe('createUnifiedInputManager', () => {+ it('stays bound to its default thread, and returns there after a reply', () => {+ createRoot((dispose) => {+ const manager = createUnifiedInputManager({ defaultThreadId: 'call-1' });+ expect(manager.replyTarget()).toEqual({ threadId: 'call-1' });++ manager.bindReply(otherRoot);+ expect(manager.replyTarget()?.threadId).toBe('root-2');++ manager.closeReply();+ expect(manager.replyTarget()).toEqual({ threadId: 'call-1' });++ dispose();+ });+ });+it('binds a root message as a root-bound pointer', () => {createRoot((dispose) => {const manager = createUnifiedInputManager();diff --git a/apps/web/src/features/channel/Channel/unified-input-manager.ts b/apps/web/src/features/channel/Channel/unified-input-manager.tsindex 15b8a9b863..acfb122e7b 100644--- a/apps/web/src/features/channel/Channel/unified-input-manager.ts+++ b/apps/web/src/features/channel/Channel/unified-input-manager.ts@@ -24,6 +24,11 @@ export type UnifiedReplyTarget = UnifiedReplyTargetSnapshot & {export function createUnifiedInputManager(options?: {/** Binding restored from a history snapshot. */initialReplyTarget?: UnifiedReplyTargetSnapshot;+ /**+ * The thread the input returns to when no reply is bound. Without one, the+ * input is free to post to the channel itself.+ */+ defaultThreadId?: string;/*** Called when a thread stops being the reply target — the reply closed, or* the binding moved to another thread — so the caller can clear anything@@ -32,9 +37,16 @@ export function createUnifiedInputManager(options?: {*/onReplyThreadReleased?: (threadId: string) => void;}) {- const [replyTarget, setReplyTarget] = createSignal<+ const [boundReplyTarget, setReplyTarget] = createSignal<UnifiedReplyTarget | undefined>(options?.initialReplyTarget);+ const replyTarget = (): UnifiedReplyTarget | undefined => {+ const bound = boundReplyTarget();+ if (bound) return bound;+ return options?.defaultThreadId+ ? { threadId: options.defaultThreadId }+ : undefined;+ };const bindReply = (message: MessageData) => {const previous = replyTarget();diff --git a/apps/web/src/features/channel/Thread/ChannelThread.tsx b/apps/web/src/features/channel/Thread/ChannelThread.tsxindex 2e10c6dc5a..cf09d3c47f 100644--- a/apps/web/src/features/channel/Thread/ChannelThread.tsx+++ b/apps/web/src/features/channel/Thread/ChannelThread.tsx@@ -11,12 +11,15 @@ import type { Message as EntityMessage } from '@service-storage/messages';import {createEffect,createSignal,+ Match,on,onCleanup,type ParentProps,Show,+ Switch,untrack,} from 'solid-js';+import { DetachedCallRootLine } from '../Call/discussion/PastCallLine';import { createMessageSelection } from '../Channel/create-message-selection';import { ChannelMessage } from '../Message';import { createTargetReplyNavigationController } from './create-target-reply-navigation-controller';@@ -92,6 +95,7 @@ export function ChannelThread(props: ThreadProps) {preview: () => thread().preview,loaded: queryReplies,isExpanded: props.isExpanded,+ hideCollapsedPreview: props.hideCollapsedPreview,});// Thread-local reply selection@@ -196,6 +200,7 @@ export function ChannelThread(props: ThreadProps) {// Replying to this thread — inline input open, or the unified input bound.const isReplyingToThread = () =>props.isReplying() || unifiedReplyBinding() !== undefined;+ const hasRootSlot = () => !!props.rootSlot;const hasInlineReplyInput = () =>props.isReplying() && props.inputMode !== 'unified';const rootRailVisible = () =>@@ -204,7 +209,7 @@ export function ChannelThread(props: ThreadProps) {!isReplyingToThread() && !props.isExpanded() && collapsedRepliesCount() > 0;const replyAction = () => props.getMessageActions?.(props.data())?.onReply;const shouldShowReplyButton = () =>- hasReplies() &&+ (hasReplies() || hasRootSlot()) &&!!replyAction() &&!isReplyingToThread() &&!shouldShowCollapsedIndicator();@@ -296,6 +301,48 @@ export function ChannelThread(props: ThreadProps) {onCleanup(targetReplyNavigation.dispose);+ const actionsFooter = () => (+ <Show when={shouldShowCollapsedIndicator() || shouldShowReplyButton()}>+ <Thread.ActionsFooter>+ <Show when={shouldShowCollapsedIndicator()}>+ <Thread.CollapsedIndicator+ ref={(element) =>+ notifyElementOnMount(+ props.onDisclosureMount,+ props.data().id,+ element+ )+ }+ withoutPreview={props.hideCollapsedPreview}+ hasUnreadNotifications={collapsedRepliesHaveUnreadNotifications()}+ collapsedRepliesCount={collapsedRepliesCount()}+ participants={collapsedReplyUsers()}+ latestReplyAt={collapsedLatestReplyAt()}+ onClick={() => props.setIsExpanded(true)}+ hasNewMessages={collapsedRepliesContainsNewMessages()}+ />+ </Show>+ <Show when={shouldShowReplyButton()}>+ <Thread.ReplyButton+ getFocusTarget={() =>+ props.inputMode !== 'unified'+ ? (replyInputContainerRef?.querySelector<HTMLElement>(+ '[contenteditable]'+ ) ?? null)+ : document.querySelector<HTMLElement>(+ `[data-input-id="thread-reply-input-${props.data().id}"] [contenteditable]`+ )+ }+ onClick={(event) =>+ replyAction()?.({ message: props.data(), event })+ }+ aria-label="Reply"+ />+ </Show>+ </Thread.ActionsFooter>+ </Show>+ );+return (<ThreadReadBoundary available={!projectUnavailable()}><Thread.Row@@ -337,28 +384,38 @@ export function ChannelThread(props: ThreadProps) {parent={props.parent()}><DebugSuspense name="ChannelThread.message">- <ChannelMessage- renderContent={props.renderMessageContent}- hideTriggeredBy={props.hideTriggeredBy}- parent={props.parent()}- message={props.data()}- actions={props.getMessageActions?.(props.data())}- listMeta={props.listMeta}- inputMode={props.inputMode}- messageEditor={props.messageEditor}- onClick={selectThreadMessage}- selected={isSelected() && !isThreadFocused()}- targeted={- // The unified input's reply is bound to this root, or- // channel navigation landed on it.- unifiedReplyBinding()?.boundToRoot || isRootNavTargeted()+ <Switch+ fallback={+ <ChannelMessage+ renderContent={props.renderMessageContent}+ hideTriggeredBy={props.hideTriggeredBy}+ parent={props.parent()}+ message={props.data()}+ actions={props.getMessageActions?.(props.data())}+ listMeta={props.listMeta}+ inputMode={props.inputMode}+ messageEditor={props.messageEditor}+ onClick={selectThreadMessage}+ selected={isSelected() && !isThreadFocused()}+ targeted={+ // The unified input's reply is bound to this root, or+ // channel navigation landed on it.+ unifiedReplyBinding()?.boundToRoot ||+ isRootNavTargeted()+ }+ />}- />+ >+ <Match when={hasRootSlot()}>{props.rootSlot?.()}</Match>+ <Match when={props.data().kind === 'call_root'}>+ <DetachedCallRootLine message={props.data()} />+ </Match>+ </Switch></DebugSuspense></MarkMessageNotifications></div>{props.afterMessage}- <Show when={hasReplies() || hasInlineReplyInput()}>+ <Show when={hasReplies() || hasInlineReplyInput() || hasRootSlot()}><div class="relative w-full"><Show when={!props.hideRail}><Thread.RepliesBridgeRail />@@ -456,48 +513,7 @@ export function ChannelThread(props: ThreadProps) {</div></Show>- <Show- when={- shouldShowCollapsedIndicator() || shouldShowReplyButton()- }- >- <Thread.ActionsFooter>- <Show when={shouldShowCollapsedIndicator()}>- <Thread.CollapsedIndicator- ref={(element) =>- notifyElementOnMount(- props.onDisclosureMount,- props.data().id,- element- )- }- hasUnreadNotifications={collapsedRepliesHaveUnreadNotifications()}- collapsedRepliesCount={collapsedRepliesCount()}- participants={collapsedReplyUsers()}- latestReplyAt={collapsedLatestReplyAt()}- onClick={() => props.setIsExpanded(true)}- hasNewMessages={collapsedRepliesContainsNewMessages()}- />- </Show>- <Show when={shouldShowReplyButton()}>- <Thread.ReplyButton- getFocusTarget={() =>- props.inputMode !== 'unified'- ? (replyInputContainerRef?.querySelector<HTMLElement>(- '[contenteditable]'- ) ?? null)- : document.querySelector<HTMLElement>(- `[data-input-id="thread-reply-input-${props.data().id}"] [contenteditable]`- )- }- onClick={(event) =>- replyAction()?.({ message: props.data(), event })- }- aria-label="Reply"- />- </Show>- </Thread.ActionsFooter>- </Show>+ {actionsFooter()}</Thread.RepliesContainer></DebugSuspense></div>diff --git a/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx b/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsxindex 577dd439b8..8856f5d3c5 100644--- a/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx+++ b/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx@@ -12,6 +12,8 @@ type ThreadCollapsedIndicatorProps =latestReplyAt?: string;hasNewMessages?: boolean;hasUnreadNotifications?: boolean;+ /** No replies are previewed above this indicator. */+ withoutPreview?: boolean;};const MAX_VISIBLE_PARTICIPANTS = 4;@@ -24,6 +26,7 @@ export function ThreadCollapsedIndicator(props: ThreadCollapsedIndicatorProps) {'latestReplyAt','hasNewMessages','hasUnreadNotifications',+ 'withoutPreview',]);const visibleParticipants = () =>local.participants.slice(0, MAX_VISIBLE_PARTICIPANTS);@@ -76,7 +79,10 @@ export function ThreadCollapsedIndicator(props: ThreadCollapsedIndicatorProps) {/></Show><span class="text-accent font-medium whitespace-nowrap">- {getThreadReplyCountLabel(local.collapsedRepliesCount)}+ {getThreadReplyCountLabel(+ local.collapsedRepliesCount,+ !local.withoutPreview+ )}</span><Show when={local.hasUnreadNotifications}><span class="sr-only">Unread</span>diff --git a/apps/web/src/features/channel/Thread/create-thread-reply-view.ts b/apps/web/src/features/channel/Thread/create-thread-reply-view.tsindex ca3b4a5b2a..4eb8a5f4aa 100644--- a/apps/web/src/features/channel/Thread/create-thread-reply-view.ts+++ b/apps/web/src/features/channel/Thread/create-thread-reply-view.ts@@ -9,9 +9,13 @@ export function createThreadReplyView<T>(options: {preview: Accessor<T[]>;loaded: Accessor<T[] | undefined>;isExpanded: Accessor<boolean>;+ /** Collapse to the indicator alone, as a call's thread does. */+ hideCollapsedPreview?: boolean;}) {const previewCount = () =>- Math.min(options.preview().length, COLLAPSED_REPLY_PREVIEW_LIMIT);+ options.hideCollapsedPreview+ ? 0+ : Math.min(options.preview().length, COLLAPSED_REPLY_PREVIEW_LIMIT);const activeReplies = () => options.loaded() ?? options.preview();const displayReplies = createMemo(() =>options.isExpanded()diff --git a/apps/web/src/features/channel/Thread/types.ts b/apps/web/src/features/channel/Thread/types.tsindex 7e27f464bf..216a835894 100644--- a/apps/web/src/features/channel/Thread/types.ts+++ b/apps/web/src/features/channel/Thread/types.ts@@ -90,4 +90,8 @@ export type ThreadProps = {monorail?: boolean;/** Flat chat surfaces do not draw thread connector rails. */hideRail?: boolean;+ /** Draws the root as something other than a message, such as a call's row. */+ rootSlot?: () => JSX.Element;+ /** Collapse to the indicator alone rather than previewing replies. */+ hideCollapsedPreview?: boolean;} & ThreadState;diff --git a/apps/web/src/features/channel/Thread/utils/message-actions.ts b/apps/web/src/features/channel/Thread/utils/message-actions.tsindex 2d7b358902..2820c3fa53 100644--- a/apps/web/src/features/channel/Thread/utils/message-actions.ts+++ b/apps/web/src/features/channel/Thread/utils/message-actions.ts@@ -7,6 +7,7 @@ import {type ReplyTargetParent,stripLeadingReplyTargetMarkdown,} from '@macro-inc/lexical-core';+import type { Message } from '@service-storage/messages';import type { MessageData } from '../../Message';export const DEFAULT_REACTION_EMOJI = '👍';@@ -17,6 +18,7 @@ export type ActionableMessage = Pick<MessageData,'id' | 'sender_id' | 'deleted_at' | 'reactions' | 'content'> & {+ kind?: Message['kind'];thread_id?: string | null;};@@ -35,14 +37,15 @@ export function isBotMessage(}export function canEditMessage(- message: Pick<ActionableMessage, 'sender_id' | 'deleted_at'>,+ message: Pick<ActionableMessage, 'sender_id' | 'deleted_at' | 'kind'>,currentUserId: string | undefined): boolean {+ if (message.kind === 'call_root') return false;return isOwnMessage(message, currentUserId) && !message.deleted_at;}export function canDeleteMessage(- message: Pick<ActionableMessage, 'sender_id' | 'deleted_at'>,+ message: Pick<ActionableMessage, 'sender_id' | 'deleted_at' | 'kind'>,currentUserId: string | undefined,/*** Document owners may delete comments they did not write. Channel members@@ -50,7 +53,7 @@ export function canDeleteMessage(*/canModerate = false): boolean {- if (message.deleted_at) return false;+ if (message.deleted_at || message.kind === 'call_root') return false;return (canModerate || isOwnMessage(message, currentUserId) || isBotMessage(message));diff --git a/apps/web/src/features/channel/Thread/utils/thread-reply-indicator-helpers.ts b/apps/web/src/features/channel/Thread/utils/thread-reply-indicator-helpers.tsindex 7bc426886d..682926dbed 100644--- a/apps/web/src/features/channel/Thread/utils/thread-reply-indicator-helpers.ts+++ b/apps/web/src/features/channel/Thread/utils/thread-reply-indicator-helpers.ts@@ -33,9 +33,12 @@ export function getCollapsedRepliesCount(}export function getThreadReplyCountLabel(- collapsedRepliesCount: number+ collapsedRepliesCount: number,+ /** Whether replies are previewed above the count, so these are the rest. */+ previewed = true): string {- return `${collapsedRepliesCount} more repl${+ const more = previewed ? ' more' : '';+ return `${collapsedRepliesCount}${more} repl${collapsedRepliesCount === 1 ? 'y' : 'ies'}`;}diff --git a/apps/web/src/features/meetings/meeting-route.tsx b/apps/web/src/features/meetings/meeting-route.tsxindex 5975f783c3..5cea9ffd49 100644--- a/apps/web/src/features/meetings/meeting-route.tsx+++ b/apps/web/src/features/meetings/meeting-route.tsx@@ -1,9 +1,14 @@import { useCallContext } from '@channel/Call/CallContext';import { CallOverlay } from '@channel/Call/CallOverlay';import { getMeetingUrl } from '@channel/Call/call-link';+import { CallDiscussionContent } from '@channel/Call/discussion/CallDiscussionContent';+import { callDiscussionOf } from '@channel/Call/discussion/call-discussion';import { UserIcon } from '@core/component/UserIcon';import { useAuthor, useIsAuthenticated, useUserId } from '@core/context/user';import { readBackgroundImage } from '@core/media/read-background-image';+import { isMobile } from '@core/mobile/isMobile';+import { lazyNamed } from '@core/util/lazyNamed';+import { buildSimpleEntityUrl } from '@core/util/url';import { useCallRecordQuery } from '@queries/call/call';import {leaveMeeting,@@ -13,7 +18,7 @@ import {useUpdateMeetingMutation,} from '@queries/call/meetings';import { useLocation, useNavigate, useSearchParams } from '@solidjs/router';-import { Show } from 'solid-js';+import { createSignal, Show } from 'solid-js';import { browserMeetingMedia } from './browser/meeting-media';import { preloadMeetingRuntime } from './browser/meeting-runtime';import type { MeetingParticipantsState } from './components/meeting-participants';@@ -21,6 +26,11 @@ import type { MeetingPageState } from './context/meeting-session';import { useMeetingSessionLifecycle } from './context/meeting-session-lifecycle';import { MeetingPage } from './views/meeting-page';+const MeetingChannelHost = lazyNamed(+ () => import('./views/meeting-channel-host'),+ 'MeetingChannelHost'+);+export function MeetingRouteContent(props: {shareToken: string;onCallStateChange: (connected: boolean) => void;@@ -73,6 +83,9 @@ export function MeetingRouteContent(props: {return access === 'owner' || access === 'edit';};+ const discussion = () => callDiscussionOf(record, call.activeCallId());+ const [outsideCount, setOutsideCount] = createSignal(0);+const source = (): MeetingPageState => {if (meeting.isError) return { kind: 'unavailable' };if (!meeting.isSuccess) return { kind: 'loading' };@@ -145,6 +158,37 @@ export function MeetingRouteContent(props: {sharedWithTeam={record.isSuccess ? record.data.shareWithTeam : undefined}+ discussion={+ authenticated() === true+ ? {+ label: () =>+ discussion()?.kind === 'channel_thread' && record.isSuccess+ ? (record.data.channelName ?? undefined)+ : undefined,+ opensByDefault: () =>+ !isMobile() && discussion()?.kind === 'channel_thread',+ hasUpdates: () => outsideCount() > 0,+ render: (panel) => (+ <CallDiscussionContent+ discussion={discussion}+ panel={panel}+ onViewChannel={(channelId) =>+ navigate(+ buildSimpleEntityUrl({+ type: 'channel',+ id: channelId,+ })+ )+ }+ onOutsideCountChange={setOutsideCount}+ channelHost={(channel) => (+ <MeetingChannelHost>{channel}</MeetingChannelHost>+ )}+ />+ ),+ }+ : undefined+ }/>)}/>diff --git a/apps/web/src/features/meetings/views/meeting-channel-host.tsx b/apps/web/src/features/meetings/views/meeting-channel-host.tsxnew file mode 100644index 0000000000..39adb16b9d--- /dev/null+++ b/apps/web/src/features/meetings/views/meeting-channel-host.tsx@@ -0,0 +1,15 @@+import { AppProviders } from '@components/app/AppProviders';+import { ItemDndProvider } from '@components/app/ItemDragAndDrop';+import type { JSX } from 'solid-js';++/**+ * A meeting page renders without the app's providers, and a channel call's+ * panel is the channel itself. Mounted only when such a call's panel opens.+ */+export function MeetingChannelHost(props: { children: JSX.Element }) {+ return (+ <AppProviders>+ <ItemDndProvider>{props.children}</ItemDndProvider>+ </AppProviders>+ );+}diff --git a/apps/web/src/lib/core/messages/types.ts b/apps/web/src/lib/core/messages/types.tsindex f991d69d47..43b697c371 100644--- a/apps/web/src/lib/core/messages/types.ts+++ b/apps/web/src/lib/core/messages/types.ts@@ -6,6 +6,8 @@ import type {} from '@service-storage/messages';export type MessageData = {+ /** Set on a call's root, which stands for the call rather than a message. */+ kind?: 'message' | 'call_root';parent?: MessageParent;imported_author?: { name: string } | null;guest_name?: string | null;diff --git a/apps/web/src/lib/i18n/locales/en/calls.ts b/apps/web/src/lib/i18n/locales/en/calls.tsindex b2f8cf4fee..b63cb234d1 100644--- a/apps/web/src/lib/i18n/locales/en/calls.ts+++ b/apps/web/src/lib/i18n/locales/en/calls.ts@@ -1,6 +1,22 @@export default {panel: 'Call sidebar',chat: 'Chat',+ someone: 'Someone',+ outsideMessages: {+ one: '{{name}} sent a message in the channel',+ other: '{{name}} sent {{count}} messages in the channel',+ },+ viewChannel: 'View',+ activeCallMessages: {+ one: 'A call is active · {{count}} message',+ other: 'A call is active · {{count}} messages',+ },+ replyingInCallThread: 'Replying in the call thread',+ callThreadEmpty:+ "No messages yet. Anything you send here is saved to this call's thread in {{channel}}.",+ thisChannel: 'this channel',+ backToCallThread: 'Back to call thread',+ openInChannel: 'Open in channel',openPanel: 'Open chat and participants',closePanel: 'Close chat and participants',participants: 'Participants',diff --git a/apps/web/src/lib/queries/call/call.test.ts b/apps/web/src/lib/queries/call/call.test.tsindex a7eb981b31..9964fcdaeb 100644--- a/apps/web/src/lib/queries/call/call.test.ts+++ b/apps/web/src/lib/queries/call/call.test.ts@@ -115,6 +115,7 @@ describe('active call cache writers', () => {const record = (over: Partial<CallRecord>): CallRecord => ({callId: 'call-1',channelId: 'channel-1',+ discussion: { kind: 'call_chat', call_id: 'call-1' },createdBy: 'macro|[email protected]',isActive: false,participants: [],diff --git a/apps/web/src/lib/queries/messages/sync.ts b/apps/web/src/lib/queries/messages/sync.tsindex b4f88c8c50..83eb1f58bc 100644--- a/apps/web/src/lib/queries/messages/sync.ts+++ b/apps/web/src/lib/queries/messages/sync.ts@@ -27,6 +27,7 @@ import {getMessageTimelineQueryKey,getMessageTimelineQueryKeyPrefix,insertActivitiesIntoMessageTimeline,+ invalidateMessageTimeline,type MessageTimelineData,setMessageTimelineData,} from './timeline';@@ -249,6 +250,11 @@ export function handleMessageEvent(applyThreadState(parent, change.state);return;}+ if (change.type === 'call_root_posted') {+ // The call's row carries server-owned life facts, so it is read, not built.+ fireAndForget(invalidateMessageTimeline(parent), 'messages-sync');+ return;+ }const isRootPost = change.type === 'posted' && !change.message.thread_id;const isOwnEcho = consumeNonce(change.type === 'reaction_changed'diff --git a/apps/web/src/lib/queries/messages/tests/sync.test.ts b/apps/web/src/lib/queries/messages/tests/sync.test.tsindex 33fd8c6d57..2033242688 100644--- a/apps/web/src/lib/queries/messages/tests/sync.test.ts+++ b/apps/web/src/lib/queries/messages/tests/sync.test.ts@@ -761,9 +761,9 @@ describe('live timeline activity', () => {.getQueryData<MessageTimelineData>(key)!.pages.flatMap((page) =>page.entries.map((entry) =>- entry.type === 'message'- ? entry.message.id- : `activity:${entry.activity.id}`+ entry.type === 'activity'+ ? `activity:${entry.activity.id}`+ : entry.message.id));diff --git a/apps/web/src/lib/queries/messages/tests/timeline.test.ts b/apps/web/src/lib/queries/messages/tests/timeline.test.tsindex b63776b8a8..a120951e9f 100644--- a/apps/web/src/lib/queries/messages/tests/timeline.test.ts+++ b/apps/web/src/lib/queries/messages/tests/timeline.test.ts@@ -757,6 +757,22 @@ describe('channel activity entries', () => {expect(keys(result)).toEqual(['activity:a', 'msg-1']);});+ it('indexes a call row as a message people can reply to but not select', () => {+ const call = createMessage('call', '2026-09-10T14:00:00Z');+ const index = buildMessageIndex([+ {+ entries: [{ type: 'call', message: call, status: { state: 'live' } }],+ next_cursor: null,+ previous_cursor: null,+ },+ ]);++ expect(index.entryKeys).toEqual(['call']);+ expect(index.keys).toEqual([]);+ expect(index.byId.get('call')).toBe(call);+ expect(index.callStatusByKey.get('call')).toEqual({ state: 'live' });+ });+it('indexes rows oldest first and keeps activity out of message keys', () => {createRoot((dispose) => {const data = mixedPage();diff --git a/apps/web/src/lib/queries/messages/timeline-entries.ts b/apps/web/src/lib/queries/messages/timeline-entries.tsindex ea9f8a75e2..dca904312b 100644--- a/apps/web/src/lib/queries/messages/timeline-entries.ts+++ b/apps/web/src/lib/queries/messages/timeline-entries.ts@@ -9,19 +9,20 @@ import { match } from 'ts-pattern';type KeyedEntry =| { type: 'message'; message: { id: string } }+ | { type: 'call'; message: { id: string } }| { type: 'activity'; activity: { id: string } };/** Row identity; activity ids live in their own namespace. */export function timelineEntryKey(entry: KeyedEntry): string {return match(entry)- .with({ type: 'message' }, ({ message }) => message.id)+ .with({ type: 'message' }, { type: 'call' }, ({ message }) => message.id).with({ type: 'activity' }, ({ activity }) => `activity:${activity.id}`).exhaustive((unknown) => JSON.stringify(unknown));}function timelineEntryPosition(entry: MessageTimelineEntry) {return match(entry)- .with({ type: 'message' }, ({ message }) => ({+ .with({ type: 'message' }, { type: 'call' }, ({ message }) => ({id: message.id,createdAt: message.created_at,}))@@ -37,7 +38,7 @@ export function timelineMessages(page: Pick<MessageTimelinePage, 'entries'>): MessageListItem[] {return page.entries.flatMap((entry) =>- entry.type === 'message' ? [entry.message] : []+ entry.type === 'activity' ? [] : [entry.message]);}diff --git a/apps/web/src/lib/queries/messages/timeline.ts b/apps/web/src/lib/queries/messages/timeline.tsindex 3d76139475..3f8cad8fba 100644--- a/apps/web/src/lib/queries/messages/timeline.ts+++ b/apps/web/src/lib/queries/messages/timeline.ts@@ -2,6 +2,7 @@ import { analytics } from '@app/lib/analytics';import { compareTimelinePositions } from '@core/util/message-timeline';import { ThrownResultError, thrownResultErrorHasCode } from '@core/util/result';import type {+ CallEntryStatus,Message as EntityMessage,MessageListItem,MessageParent,@@ -441,7 +442,7 @@ export function mapMessageTimelineItems(const pages = data.pages.map((page) => {let pageChanged = false;const entries = page.entries.map((entry) => {- if (entry.type !== 'message') return entry;+ if (entry.type === 'activity') return entry;const message = updater(entry.message);if (message === entry.message) return entry;didChange = true;@@ -463,7 +464,7 @@ function filterMessageTimelineItems(const pages = data.pages.map((page) => {const entries = page.entries.filter((entry) => {- if (entry.type !== 'message') return true;+ if (entry.type === 'activity') return true;const message = entry.message;const keep = predicate(message);if (!keep) didChange = true;@@ -552,9 +553,9 @@ function getTopLevelMessageSnapshot(for (const page of data.pages) {const entry = page.entries.find(- (entry) => entry.type === 'message' && entry.message.id === messageId+ (entry) => entry.type !== 'activity' && entry.message.id === messageId);- if (entry?.type !== 'message') continue;+ if (!entry || entry.type === 'activity') continue;return { message: entry.message };}}@@ -762,9 +763,11 @@ export function buildMessageIndex(const entries: (MessageTimelineEntry & { id: string })[] = [];/** Every rendered row, messages and activity. */const entryKeys: string[] = [];- /** Message ids only: selection and navigation skip activity. */+ /** Message ids only: selection and navigation skip activity and calls. */const keys: string[] = [];const byId = new Map<string, MessageListItem>();+ /** The life of each row that is a call, keyed like `byId`. */+ const callStatusByKey = new Map<string, CallEntryStatus>();/** Each activity row's newest activity. */const activityByKey = new Map<string, TimelineActivity>();/** Every activity of a row that merged several, oldest first. */@@ -776,6 +779,7 @@ export function buildMessageIndex(entryKeys,keys,byId,+ callStatusByKey,activityByKey,activityGroupByKey,};@@ -813,12 +817,24 @@ export function buildMessageIndex(}entries.push({ ...entry, id: key });entryKeys.push(key);- keys.push(key);byId.set(key, entry.message);+ if (entry.type === 'call') {+ callStatusByKey.set(key, entry.status);+ continue;+ }+ keys.push(key);}}- return { entries, entryKeys, keys, byId, activityByKey, activityGroupByKey };+ return {+ entries,+ entryKeys,+ keys,+ byId,+ callStatusByKey,+ activityByKey,+ activityGroupByKey,+ };}/** A reactive index over a timeline query's cached pages. */diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussion.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussion.tsnew file mode 100644index 0000000000..d33e3d7e44--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussion.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { CallDiscussionOneOf } from './callDiscussionOneOf';+import type { CallDiscussionOneOfThree } from './callDiscussionOneOfThree';++/**+ * Where a call's discussion lives, decided once when the call is created.+`channel_id` cannot decide this: past channel calls keep their own thread.+ */+export type CallDiscussion = CallDiscussionOneOf | CallDiscussionOneOfThree;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOf.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOf.tsnew file mode 100644index 0000000000..a1c1a9dd3d--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOf.ts@@ -0,0 +1,18 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { CallDiscussionOneOfKind } from './callDiscussionOneOfKind';++/**+ * A thread in the call's channel, rooted at the message with the call's id.+ */+export type CallDiscussionOneOf = {+ /** The channel holding the thread. */+ channel_id: string;+ kind: CallDiscussionOneOfKind;+ /** The thread's root message. */+ root_id: string;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOfKind.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOfKind.tsnew file mode 100644index 0000000000..409f99d21e--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOfKind.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type CallDiscussionOneOfKind =+ (typeof CallDiscussionOneOfKind)[keyof typeof CallDiscussionOneOfKind];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const CallDiscussionOneOfKind = {+ channel_thread: 'channel_thread',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOfThree.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOfThree.tsnew file mode 100644index 0000000000..79accc76fb--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOfThree.ts@@ -0,0 +1,16 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { CallDiscussionOneOfThreeKind } from './callDiscussionOneOfThreeKind';++/**+ * The call's own thread on the call parent.+ */+export type CallDiscussionOneOfThree = {+ /** The call owning the thread. */+ call_id: string;+ kind: CallDiscussionOneOfThreeKind;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOfThreeKind.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOfThreeKind.tsnew file mode 100644index 0000000000..a073d291fb--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callDiscussionOneOfThreeKind.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type CallDiscussionOneOfThreeKind =+ (typeof CallDiscussionOneOfThreeKind)[keyof typeof CallDiscussionOneOfThreeKind];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const CallDiscussionOneOfThreeKind = {+ call_chat: 'call_chat',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatus.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatus.tsnew file mode 100644index 0000000000..73e36d7ce8--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatus.ts@@ -0,0 +1,17 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { CallEntryStatusOneOf } from './callEntryStatusOneOf';+import type { CallEntryStatusOneOfFive } from './callEntryStatusOneOfFive';+import type { CallEntryStatusOneOfThree } from './callEntryStatusOneOfThree';++/**+ * A channel call's life, as its timeline row shows it.+ */+export type CallEntryStatus =+ | CallEntryStatusOneOf+ | CallEntryStatusOneOfThree+ | CallEntryStatusOneOfFive;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOf.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOf.tsnew file mode 100644index 0000000000..adca797de9--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOf.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { CallEntryStatusOneOfState } from './callEntryStatusOneOfState';++/**+ * The call has not ended.+ */+export type CallEntryStatusOneOf = {+ state: CallEntryStatusOneOfState;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfFive.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfFive.tsnew file mode 100644index 0000000000..c707a42d9a--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfFive.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { CallEntryStatusOneOfFiveState } from './callEntryStatusOneOfFiveState';++/**+ * The call's record was deleted; its discussion stays in the channel.+ */+export type CallEntryStatusOneOfFive = {+ state: CallEntryStatusOneOfFiveState;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfFiveState.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfFiveState.tsnew file mode 100644index 0000000000..4cee21a1a8--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfFiveState.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type CallEntryStatusOneOfFiveState =+ (typeof CallEntryStatusOneOfFiveState)[keyof typeof CallEntryStatusOneOfFiveState];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const CallEntryStatusOneOfFiveState = {+ record_deleted: 'record_deleted',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfState.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfState.tsnew file mode 100644index 0000000000..76ff5f6033--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfState.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type CallEntryStatusOneOfState =+ (typeof CallEntryStatusOneOfState)[keyof typeof CallEntryStatusOneOfState];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const CallEntryStatusOneOfState = {+ live: 'live',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfThree.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfThree.tsnew file mode 100644index 0000000000..168b431090--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfThree.ts@@ -0,0 +1,18 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { CallEntryStatusOneOfThreeState } from './callEntryStatusOneOfThreeState';++/**+ * The call ended.+ */+export type CallEntryStatusOneOfThree = {+ /** How long it lasted. */+ duration_ms: number;+ /** When it ended. */+ ended_at: string;+ state: CallEntryStatusOneOfThreeState;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfThreeState.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfThreeState.tsnew file mode 100644index 0000000000..418a80c293--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callEntryStatusOneOfThreeState.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type CallEntryStatusOneOfThreeState =+ (typeof CallEntryStatusOneOfThreeState)[keyof typeof CallEntryStatusOneOfThreeState];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const CallEntryStatusOneOfThreeState = {+ ended: 'ended',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callRecord.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callRecord.tsindex 72953e9603..296775e108 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/callRecord.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/callRecord.ts@@ -4,6 +4,8 @@* document_storage_service* OpenAPI spec version: 0.1.0*/++import type { CallDiscussion } from './callDiscussion';import type { CallRecordChannelId } from './callRecordChannelId';import type { CallRecordChannelName } from './callRecordChannelName';import type { CallRecordCustomName } from './callRecordCustomName';@@ -39,6 +41,8 @@ export interface CallRecord {/** User-supplied or AI-generated display name for the call. Only set onarchived `call_records`; active calls always return `None`. */customName?: CallRecordCustomName;+ /** Where this call's discussion lives. */+ discussion: CallDiscussion;/** Call duration in milliseconds (None if still active). */durationMs?: CallRecordDurationMs;/** Recording egress ID, if any. */diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.tsindex 8757c5acc7..0f651c810c 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts@@ -274,6 +274,18 @@ export * from './calendarOccurrenceResponse';export * from './calendarOccurrenceResponseNextCursor';export * from './calendarSyncStatus';export * from './callActiveResponse';+export * from './callDiscussion';+export * from './callDiscussionOneOf';+export * from './callDiscussionOneOfKind';+export * from './callDiscussionOneOfThree';+export * from './callDiscussionOneOfThreeKind';+export * from './callEntryStatus';+export * from './callEntryStatusOneOf';+export * from './callEntryStatusOneOfFive';+export * from './callEntryStatusOneOfFiveState';+export * from './callEntryStatusOneOfState';+export * from './callEntryStatusOneOfThree';+export * from './callEntryStatusOneOfThreeState';export * from './callFilters';export * from './callFiltersAttended';export * from './callFiltersStatus';@@ -1416,9 +1428,11 @@ export * from './messageChangeOneOfFiveType';export * from './messageChangeOneOfNine';export * from './messageChangeOneOfNineType';export * from './messageChangeOneOfOneone';-export * from './messageChangeOneOfOneoneAgent';-export * from './messageChangeOneOfOneoneThreadId';export * from './messageChangeOneOfOneoneType';+export * from './messageChangeOneOfOnethree';+export * from './messageChangeOneOfOnethreeAgent';+export * from './messageChangeOneOfOnethreeThreadId';+export * from './messageChangeOneOfOnethreeType';export * from './messageChangeOneOfSeven';export * from './messageChangeOneOfSevenType';export * from './messageChangeOneOfThree';@@ -1432,6 +1446,7 @@ export * from './messageEvent';export * from './messageEventNonce';export * from './messageGuestName';export * from './messageImportedAuthor';+export * from './messageKind';export * from './messageListItem';export * from './messageListItemAllOf';export * from './messagePage';@@ -1461,6 +1476,8 @@ export * from './messageThreadPreviewLatestReplyAt';export * from './messageTimelineEntriesParams';export * from './messageTimelineEntry';export * from './messageTimelineEntryOneOf';+export * from './messageTimelineEntryOneOfFive';+export * from './messageTimelineEntryOneOfFiveType';export * from './messageTimelineEntryOneOfThree';export * from './messageTimelineEntryOneOfThreeType';export * from './messageTimelineEntryOneOfType';diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/message.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/message.tsindex d3995784ea..abbb9c4f05 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/message.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/message.ts@@ -12,6 +12,7 @@ import type { MessageDeletedAt } from './messageDeletedAt';import type { MessageEditedAt } from './messageEditedAt';import type { MessageGuestName } from './messageGuestName';import type { MessageImportedAuthor } from './messageImportedAuthor';+import type { MessageKind } from './messageKind';import type { MessageParent } from './messageParent';import type { MessageThreadId } from './messageThreadId';import type { MessageTriggeredBy } from './messageTriggeredBy';@@ -38,6 +39,8 @@ export interface Message {/** Message UUID. */id: string;imported_author?: MessageImportedAuthor;+ /** What this message is. */+ kind?: MessageKind;/** Tracked mentions, retained when a caller changes attachments only. */mentions: SimpleMention[];/** Entity that owns this conversation. */diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChange.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChange.tsindex d9ad641bee..5b07631f58 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChange.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChange.ts@@ -8,6 +8,7 @@ import type { MessageChangeOneOf } from './messageChangeOneOf';import type { MessageChangeOneOfFive } from './messageChangeOneOfFive';import type { MessageChangeOneOfNine } from './messageChangeOneOfNine';import type { MessageChangeOneOfOneone } from './messageChangeOneOfOneone';+import type { MessageChangeOneOfOnethree } from './messageChangeOneOfOnethree';import type { MessageChangeOneOfSeven } from './messageChangeOneOfSeven';import type { MessageChangeOneOfThree } from './messageChangeOneOfThree';@@ -20,4 +21,5 @@ export type MessageChange =| MessageChangeOneOfFive| MessageChangeOneOfSeven| MessageChangeOneOfNine- | MessageChangeOneOfOneone;+ | MessageChangeOneOfOneone+ | MessageChangeOneOfOnethree;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfNine.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfNine.tsindex d1d61d24a2..589d8898da 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfNine.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfNine.ts@@ -4,15 +4,16 @@* document_storage_service* OpenAPI spec version: 0.1.0*/-+import type { Message } from './message';import type { MessageChangeOneOfNineType } from './messageChangeOneOfNineType';-import type { ThreadState } from './threadState';/**- * Thread resolution, placement, or deletion changed.+ * A channel call's thread root was created. It stands for the call, so it+reaches viewers and moves the channel up without any of what a post+causes: no notifications, agents, routines, webhooks or search documents.*/export type MessageChangeOneOfNine = {- /** Persisted thread state. */- state: ThreadState;+ /** Persisted root. */+ message: Message;type: MessageChangeOneOfNineType;};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfNineType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfNineType.tsindex 5bd47c1e42..514714608e 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfNineType.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfNineType.ts@@ -10,5 +10,5 @@ export type MessageChangeOneOfNineType =// eslint-disable-next-line @typescript-eslint/no-redeclareexport const MessageChangeOneOfNineType = {- thread_updated: 'thread_updated',+ call_root_posted: 'call_root_posted',} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneone.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneone.tsindex f2b7ae8df6..e28c1c7600 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneone.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneone.ts@@ -4,18 +4,15 @@* document_storage_service* OpenAPI spec version: 0.1.0*/-import type { MessageChangeOneOfOneoneAgent } from './messageChangeOneOfOneoneAgent';-import type { MessageChangeOneOfOneoneThreadId } from './messageChangeOneOfOneoneThreadId';+import type { MessageChangeOneOfOneoneType } from './messageChangeOneOfOneoneType';+import type { ThreadState } from './threadState';/**- * Transient typing indication.+ * Thread resolution, placement, or deletion changed.*/export type MessageChangeOneOfOneone = {- /** Whether the user is currently typing. */- active: boolean;- agent?: MessageChangeOneOfOneoneAgent;- /** Root being replied to, or no root for the parent composer. */- thread_id?: MessageChangeOneOfOneoneThreadId;+ /** Persisted thread state. */+ state: ThreadState;type: MessageChangeOneOfOneoneType;};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneType.tsindex d5b4c8aa68..c075206f24 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneType.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneType.ts@@ -10,5 +10,5 @@ export type MessageChangeOneOfOneoneType =// eslint-disable-next-line @typescript-eslint/no-redeclareexport const MessageChangeOneOfOneoneType = {- typing: 'typing',+ thread_updated: 'thread_updated',} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethree.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethree.tsnew file mode 100644index 0000000000..3572fa7b3b--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethree.ts@@ -0,0 +1,21 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { MessageChangeOneOfOnethreeAgent } from './messageChangeOneOfOnethreeAgent';+import type { MessageChangeOneOfOnethreeThreadId } from './messageChangeOneOfOnethreeThreadId';+import type { MessageChangeOneOfOnethreeType } from './messageChangeOneOfOnethreeType';++/**+ * Transient typing indication.+ */+export type MessageChangeOneOfOnethree = {+ /** Whether the user is currently typing. */+ active: boolean;+ agent?: MessageChangeOneOfOnethreeAgent;+ /** Root being replied to, or no root for the parent composer. */+ thread_id?: MessageChangeOneOfOnethreeThreadId;+ type: MessageChangeOneOfOnethreeType;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneAgent.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethreeAgent.tssimilarity index 72%rename from apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneAgent.tsrename to apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethreeAgent.tsindex a73cca64b2..05027cc048 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneAgent.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethreeAgent.ts@@ -6,4 +6,4 @@*/import type { AgentTyping } from './agentTyping';-export type MessageChangeOneOfOneoneAgent = null | AgentTyping;+export type MessageChangeOneOfOnethreeAgent = null | AgentTyping;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneThreadId.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethreeThreadId.tssimilarity index 75%rename from apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneThreadId.tsrename to apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethreeThreadId.tsindex 0d54f5846f..b7f211bd0d 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOneoneThreadId.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethreeThreadId.ts@@ -8,4 +8,4 @@/*** Root being replied to, or no root for the parent composer.*/-export type MessageChangeOneOfOneoneThreadId = string | null;+export type MessageChangeOneOfOnethreeThreadId = string | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethreeType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethreeType.tsnew file mode 100644index 0000000000..e33fbe817f--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageChangeOneOfOnethreeType.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type MessageChangeOneOfOnethreeType =+ (typeof MessageChangeOneOfOnethreeType)[keyof typeof MessageChangeOneOfOnethreeType];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const MessageChangeOneOfOnethreeType = {+ typing: 'typing',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageKind.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageKind.tsnew file mode 100644index 0000000000..fdba533f87--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageKind.ts@@ -0,0 +1,17 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * What a persisted message is. Set by the server, never by a client.+ */+export type MessageKind = (typeof MessageKind)[keyof typeof MessageKind];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const MessageKind = {+ message: 'message',+ call_root: 'call_root',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntry.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntry.tsindex 8a44cb91bd..54e98b9aed 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntry.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntry.ts@@ -5,6 +5,7 @@* OpenAPI spec version: 0.1.0*/import type { MessageTimelineEntryOneOf } from './messageTimelineEntryOneOf';+import type { MessageTimelineEntryOneOfFive } from './messageTimelineEntryOneOfFive';import type { MessageTimelineEntryOneOfThree } from './messageTimelineEntryOneOfThree';/**@@ -12,4 +13,5 @@ import type { MessageTimelineEntryOneOfThree } from './messageTimelineEntryOneOf*/export type MessageTimelineEntry =| MessageTimelineEntryOneOf- | MessageTimelineEntryOneOfThree;+ | MessageTimelineEntryOneOfThree+ | MessageTimelineEntryOneOfFive;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntryOneOfFive.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntryOneOfFive.tsnew file mode 100644index 0000000000..a40147dcd3--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntryOneOfFive.ts@@ -0,0 +1,21 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++import type { CallEntryStatus } from './callEntryStatus';+import type { MessageListItem } from './messageListItem';+import type { MessageTimelineEntryOneOfFiveType } from './messageTimelineEntryOneOfFiveType';++/**+ * A channel call and its thread. The root message's id is the call id.+ */+export type MessageTimelineEntryOneOfFive = {+ /** The call's root message, its thread state and its reply preview. */+ message: MessageListItem;+ /** Where the call is in its life. */+ status: CallEntryStatus;+ type: MessageTimelineEntryOneOfFiveType;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntryOneOfFiveType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntryOneOfFiveType.tsnew file mode 100644index 0000000000..5026e3b7de--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/messageTimelineEntryOneOfFiveType.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type MessageTimelineEntryOneOfFiveType =+ (typeof MessageTimelineEntryOneOfFiveType)[keyof typeof MessageTimelineEntryOneOfFiveType];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const MessageTimelineEntryOneOfFiveType = {+ call: 'call',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts b/apps/web/src/lib/service-clients/service-storage/generated/zod.tsindex de453d4469..8761d765e1 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts@@ -2812,6 +2812,27 @@ export const getCallRecordResponse = zod.describe('User-supplied or AI-generated display name for the call. Only set on\narchived `call_records`; active calls always return `None`.'),+ discussion: zod+ .union([+ zod+ .object({+ channel_id: zod.uuid().describe('The channel holding the thread.'),+ kind: zod.enum(['channel_thread']),+ root_id: zod.uuid().describe("The thread's root message."),+ })+ .describe(+ "A thread in the call's channel, rooted at the message with the call's id."+ ),+ zod+ .object({+ call_id: zod.uuid().describe('The call owning the thread.'),+ kind: zod.enum(['call_chat']),+ })+ .describe("The call's own thread on the call parent."),+ ])+ .describe(+ "Where a call's discussion lives, decided once when the call is created.\n`channel_id` cannot decide this: past channel calls keep their own thread."+ ),durationMs: zod.number().nullish()@@ -52705,6 +52726,12 @@ export const messageTimelineResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -53040,6 +53067,12 @@ export const messageTimelineResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -53435,6 +53468,12 @@ export const entityMessageCreateResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -53603,6 +53642,12 @@ export const entityMessageGetMessageResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -53775,274 +53820,286 @@ export const entityMessageDeleteMessageResponse = zod),]).optional(),- mentions: zod- .array(- zod- .object({- entity_id: zod.string().describe('Mentioned entity identifier.'),- entity_type: zod.string().describe('Mentioned entity type.'),- })- .describe('A mention tracked in a message body.')- )- .describe(- 'Tracked mentions, retained when a caller changes attachments only.'- ),- parent: zod- .union([- zod- .object({- id: zod.uuid().describe('A channel, including direct messages.'),- type: zod.enum(['channel']),- })- .describe('A channel, including direct messages.'),- zod- .object({- id: zod- .string()- .describe(- 'A validated document identifier. Historical document ids need not be UUIDs.'- ),- type: zod.enum(['document']),- })- .describe('A document, including tasks and PDFs.'),- zod- .object({- id: zod- .uuid()- .describe(- 'An initiative, presented as a project in the application.'- ),- type: zod.enum(['initiative']),- })- .describe(- 'An initiative, presented as a project in the application.'- ),- zod- .object({- id: zod.uuid().describe('A CRM company.'),- type: zod.enum(['crm_company']),- })- .describe('A CRM company.'),- zod- .object({- id: zod.uuid().describe('A CRM contact.'),- type: zod.enum(['crm_contact']),- })- .describe('A CRM contact.'),- zod- .object({- id: zod- .uuid()- .describe('A video call and its persistent chat thread.'),- type: zod.enum(['call']),- })- .describe('A video call and its persistent chat thread.'),- ])- .describe('The entity whose permissions and lifecycle govern a message.'),- reactions: zod- .array(- zod- .object({- emoji: zod.string().describe('Emoji being reacted with.'),- users: zod.array(zod.string()).describe('User identifiers.'),- })- .describe('Reaction emoji and the users who added it.')- )- .describe('Aggregated reactions.'),- sender_id: zod- .string()- .describe('Authenticated actor or owner of imported content.'),- thread_id: zod- .uuid()- .nullish()- .describe('Root message UUID for replies; absent on roots.'),- triggered_by: zod- .string()- .nullish()- .describe('User who triggered a bot-authored message.'),- triggered_via: zod- .string()- .nullish()- .describe(- 'Self-reported name of the client the user triggered it through, such\nas \"Claude Code\"; a display label only.'- ),- updated_at: zod.iso.datetime({}).describe('Last persisted update.'),- })- .describe(- 'Shared message representation for channel timelines and entity discussions.'- );--/**- * @summary Edit an owned message.- */-export const entityMessageEditParams = zod.object({- parent_type: zod.string(),- parent_id: zod.string(),- id: zod.uuid(),-});--export const entityMessageEditBody = zod- .object({- attachments: zod- .union([- zod- .object({- type: zod.enum(['preserve']),- })- .describe('Keep current attachments.'),- zod- .object({- type: zod.enum(['replace']),- value: zod- .array(- zod- .object({- entity_id: zod- .string()- .describe('Attached entity identifier.'),- entity_type: zod.string().describe('Attached entity type.'),- height: zod- .number()- .nullish()- .describe('Optional media height.'),- width: zod- .number()- .nullish()- .describe('Optional media width.'),- })- .describe('An attachment to add to a message.')- )- .describe('Replace all attachments.'),- })- .describe('Replace all attachments.'),- zod- .object({- type: zod.enum(['delta']),- value: zod- .object({- add: zod- .array(- zod- .object({- entity_id: zod- .string()- .describe('Attached entity identifier.'),- entity_type: zod- .string()- .describe('Attached entity type.'),- height: zod- .number()- .nullish()- .describe('Optional media height.'),- width: zod- .number()- .nullish()- .describe('Optional media width.'),- })- .describe('An attachment to add to a message.')- )- .describe('New attachments to append.'),- remove: zod- .array(zod.uuid())- .describe('Existing attachment UUIDs to remove.'),- })- .describe(- 'Remove stored attachment identities and append new references.'- ),- })- .describe(- 'Remove stored attachment identities and append new references.'- ),- ])+ kind: zod+ .enum(['message', 'call_root']).optional().describe(- 'Attachment changes interpreted by the common command boundary.'- ),- content: zod- .string()- .nullish()- .describe('Replacement body; absent preserves current content.'),- mentions: zod- .array(- zod- .object({- entity_id: zod.string().describe('Mentioned entity identifier.'),- entity_type: zod.string().describe('Mentioned entity type.'),- })- .describe('A mention tracked in a message body.')- )- .nullish()- .describe(- 'Replacement authored mentions; absent preserves current mentions.'+ 'What a persisted message is. Set by the server, never by a client.'+ ),+ mentions: zod+ .array(+ zod+ .object({+ entity_id: zod.string().describe('Mentioned entity identifier.'),+ entity_type: zod.string().describe('Mentioned entity type.'),+ })+ .describe('A mention tracked in a message body.')+ )+ .describe(+ 'Tracked mentions, retained when a caller changes attachments only.'+ ),+ parent: zod+ .union([+ zod+ .object({+ id: zod.uuid().describe('A channel, including direct messages.'),+ type: zod.enum(['channel']),+ })+ .describe('A channel, including direct messages.'),+ zod+ .object({+ id: zod+ .string()+ .describe(+ 'A validated document identifier. Historical document ids need not be UUIDs.'+ ),+ type: zod.enum(['document']),+ })+ .describe('A document, including tasks and PDFs.'),+ zod+ .object({+ id: zod+ .uuid()+ .describe(+ 'An initiative, presented as a project in the application.'+ ),+ type: zod.enum(['initiative']),+ })+ .describe(+ 'An initiative, presented as a project in the application.'+ ),+ zod+ .object({+ id: zod.uuid().describe('A CRM company.'),+ type: zod.enum(['crm_company']),+ })+ .describe('A CRM company.'),+ zod+ .object({+ id: zod.uuid().describe('A CRM contact.'),+ type: zod.enum(['crm_contact']),+ })+ .describe('A CRM contact.'),+ zod+ .object({+ id: zod+ .uuid()+ .describe('A video call and its persistent chat thread.'),+ type: zod.enum(['call']),+ })+ .describe('A video call and its persistent chat thread.'),+ ])+ .describe('The entity whose permissions and lifecycle govern a message.'),+ reactions: zod+ .array(+ zod+ .object({+ emoji: zod.string().describe('Emoji being reacted with.'),+ users: zod.array(zod.string()).describe('User identifiers.'),+ })+ .describe('Reaction emoji and the users who added it.')+ )+ .describe('Aggregated reactions.'),+ sender_id: zod+ .string()+ .describe('Authenticated actor or owner of imported content.'),+ thread_id: zod+ .uuid()+ .nullish()+ .describe('Root message UUID for replies; absent on roots.'),+ triggered_by: zod+ .string()+ .nullish()+ .describe('User who triggered a bot-authored message.'),+ triggered_via: zod+ .string()+ .nullish()+ .describe(+ 'Self-reported name of the client the user triggered it through, such\nas \"Claude Code\"; a display label only.'+ ),+ updated_at: zod.iso.datetime({}).describe('Last persisted update.'),+ })+ .describe(+ 'Shared message representation for channel timelines and entity discussions.'+ );++/**+ * @summary Edit an owned message.+ */+export const entityMessageEditParams = zod.object({+ parent_type: zod.string(),+ parent_id: zod.string(),+ id: zod.uuid(),+});++export const entityMessageEditBody = zod+ .object({+ attachments: zod+ .union([+ zod+ .object({+ type: zod.enum(['preserve']),+ })+ .describe('Keep current attachments.'),+ zod+ .object({+ type: zod.enum(['replace']),+ value: zod+ .array(+ zod+ .object({+ entity_id: zod+ .string()+ .describe('Attached entity identifier.'),+ entity_type: zod.string().describe('Attached entity type.'),+ height: zod+ .number()+ .nullish()+ .describe('Optional media height.'),+ width: zod+ .number()+ .nullish()+ .describe('Optional media width.'),+ })+ .describe('An attachment to add to a message.')+ )+ .describe('Replace all attachments.'),+ })+ .describe('Replace all attachments.'),+ zod+ .object({+ type: zod.enum(['delta']),+ value: zod+ .object({+ add: zod+ .array(+ zod+ .object({+ entity_id: zod+ .string()+ .describe('Attached entity identifier.'),+ entity_type: zod+ .string()+ .describe('Attached entity type.'),+ height: zod+ .number()+ .nullish()+ .describe('Optional media height.'),+ width: zod+ .number()+ .nullish()+ .describe('Optional media width.'),+ })+ .describe('An attachment to add to a message.')+ )+ .describe('New attachments to append.'),+ remove: zod+ .array(zod.uuid())+ .describe('Existing attachment UUIDs to remove.'),+ })+ .describe(+ 'Remove stored attachment identities and append new references.'+ ),+ })+ .describe(+ 'Remove stored attachment identities and append new references.'+ ),+ ])+ .optional()+ .describe(+ 'Attachment changes interpreted by the common command boundary.'+ ),+ content: zod+ .string()+ .nullish()+ .describe('Replacement body; absent preserves current content.'),+ mentions: zod+ .array(+ zod+ .object({+ entity_id: zod.string().describe('Mentioned entity identifier.'),+ entity_type: zod.string().describe('Mentioned entity type.'),+ })+ .describe('A mention tracked in a message body.')+ )+ .nullish()+ .describe(+ 'Replacement authored mentions; absent preserves current mentions.'+ ),+ nonce: zod.string().nullish().describe('Client mutation nonce.'),+ })+ .describe(+ 'Partial updates share the same authorship, reference, and delivery rules as edits.'+ );++export const entityMessageEditResponse = zod+ .object({+ attachments: zod+ .array(+ zod+ .object({+ created_at: zod.iso+ .datetime({})+ .describe('When the attachment was added.'),+ entity_id: zod.string().describe('Attached entity identifier.'),+ entity_type: zod.string().describe('Attached entity type.'),+ height: zod.number().nullish().describe('Optional media height.'),+ id: zod.uuid().describe('Attachment UUID.'),+ width: zod.number().nullish().describe('Optional media width.'),+ })+ .describe('An entity attached to a message.')+ )+ .describe('Attached entities.'),+ bot_profile: zod+ .union([+ zod.null(),+ zod+ .object({+ avatar_url: zod.string().nullish().describe('Bot avatar URL.'),+ name: zod.string().describe('Bot display name.'),+ })+ .describe('Public bot profile attached to bot-authored messages.'),+ ])+ .optional(),+ content: zod.string().describe('Macro Markdown body.'),+ created_at: zod.iso.datetime({}).describe('Creation time.'),+ deleted_at: zod.iso+ .datetime({})+ .nullish()+ .describe('Message tombstone, independent of thread deletion.'),+ edited_at: zod.iso+ .datetime({})+ .nullish()+ .describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),+ id: zod.uuid().describe('Message UUID.'),+ imported_author: zod+ .union([+ zod.null(),+ zod+ .object({+ name: zod+ .string()+ .describe(+ 'Original author text; never interpreted as an authenticated principal.'+ ),+ })+ .describe(+ 'Display attribution for a comment imported from an external document.'+ ),+ ])+ .optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'),- nonce: zod.string().nullish().describe('Client mutation nonce.'),- })- .describe(- 'Partial updates share the same authorship, reference, and delivery rules as edits.'- );--export const entityMessageEditResponse = zod- .object({- attachments: zod- .array(- zod- .object({- created_at: zod.iso- .datetime({})- .describe('When the attachment was added.'),- entity_id: zod.string().describe('Attached entity identifier.'),- entity_type: zod.string().describe('Attached entity type.'),- height: zod.number().nullish().describe('Optional media height.'),- id: zod.uuid().describe('Attachment UUID.'),- width: zod.number().nullish().describe('Optional media width.'),- })- .describe('An entity attached to a message.')- )- .describe('Attached entities.'),- bot_profile: zod- .union([- zod.null(),- zod- .object({- avatar_url: zod.string().nullish().describe('Bot avatar URL.'),- name: zod.string().describe('Bot display name.'),- })- .describe('Public bot profile attached to bot-authored messages.'),- ])- .optional(),- content: zod.string().describe('Macro Markdown body.'),- created_at: zod.iso.datetime({}).describe('Creation time.'),- deleted_at: zod.iso- .datetime({})- .nullish()- .describe('Message tombstone, independent of thread deletion.'),- edited_at: zod.iso- .datetime({})- .nullish()- .describe('Last content edit, if any.'),- guest_name: zod- .string()- .nullish()- .describe(- 'Display name of a verified call guest, retained after the call ends.'- ),- id: zod.uuid().describe('Message UUID.'),- imported_author: zod- .union([- zod.null(),- zod- .object({- name: zod- .string()- .describe(- 'Original author text; never interpreted as an authenticated principal.'- ),- })- .describe(- 'Display attribution for a comment imported from an external document.'- ),- ])- .optional(),mentions: zod.array(zod@@ -54219,6 +54276,12 @@ export const entityMessageReactResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -54394,6 +54457,12 @@ export const entityMessageLegacyResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -54579,6 +54648,12 @@ export const entityMessageGetThreadResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -54754,6 +54829,12 @@ export const entityMessageGetThreadResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -55342,6 +55423,12 @@ export const messageTimelineEntriesResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -55707,6 +55794,12 @@ export const messageTimelineEntriesResponse = zod),]).optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),mentions: zod.array(zod@@ -55897,6 +55990,652 @@ export const messageTimelineEntriesResponse = zod.describe('A recorded fact about the parent, such as a rename or a finished call.'),+ zod+ .object({+ message: zod+ .object({+ attachments: zod+ .array(+ zod+ .object({+ created_at: zod.iso+ .datetime({})+ .describe('When the attachment was added.'),+ entity_id: zod+ .string()+ .describe('Attached entity identifier.'),+ entity_type: zod+ .string()+ .describe('Attached entity type.'),+ height: zod+ .number()+ .nullish()+ .describe('Optional media height.'),+ id: zod.uuid().describe('Attachment UUID.'),+ width: zod+ .number()+ .nullish()+ .describe('Optional media width.'),+ })+ .describe('An entity attached to a message.')+ )+ .describe('Attached entities.'),+ bot_profile: zod+ .union([+ zod.null(),+ zod+ .object({+ avatar_url: zod+ .string()+ .nullish()+ .describe('Bot avatar URL.'),+ name: zod.string().describe('Bot display name.'),+ })+ .describe(+ 'Public bot profile attached to bot-authored messages.'+ ),+ ])+ .optional(),+ content: zod.string().describe('Macro Markdown body.'),+ created_at: zod.iso.datetime({}).describe('Creation time.'),+ deleted_at: zod.iso+ .datetime({})+ .nullish()+ .describe(+ 'Message tombstone, independent of thread deletion.'+ ),+ edited_at: zod.iso+ .datetime({})+ .nullish()+ .describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),+ id: zod.uuid().describe('Message UUID.'),+ imported_author: zod+ .union([+ zod.null(),+ zod+ .object({+ name: zod+ .string()+ .describe(+ 'Original author text; never interpreted as an authenticated principal.'+ ),+ })+ .describe(+ 'Display attribution for a comment imported from an external document.'+ ),+ ])+ .optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),+ mentions: zod+ .array(+ zod+ .object({+ entity_id: zod+ .string()+ .describe('Mentioned entity identifier.'),+ entity_type: zod+ .string()+ .describe('Mentioned entity type.'),+ })+ .describe('A mention tracked in a message body.')+ )+ .describe(+ 'Tracked mentions, retained when a caller changes attachments only.'+ ),+ parent: zod+ .union([+ zod+ .object({+ id: zod+ .uuid()+ .describe(+ 'A channel, including direct messages.'+ ),+ type: zod.enum(['channel']),+ })+ .describe('A channel, including direct messages.'),+ zod+ .object({+ id: zod+ .string()+ .describe(+ 'A validated document identifier. Historical document ids need not be UUIDs.'+ ),+ type: zod.enum(['document']),+ })+ .describe('A document, including tasks and PDFs.'),+ zod+ .object({+ id: zod+ .uuid()+ .describe(+ 'An initiative, presented as a project in the application.'+ ),+ type: zod.enum(['initiative']),+ })+ .describe(+ 'An initiative, presented as a project in the application.'+ ),+ zod+ .object({+ id: zod.uuid().describe('A CRM company.'),+ type: zod.enum(['crm_company']),+ })+ .describe('A CRM company.'),+ zod+ .object({+ id: zod.uuid().describe('A CRM contact.'),+ type: zod.enum(['crm_contact']),+ })+ .describe('A CRM contact.'),+ zod+ .object({+ id: zod+ .uuid()+ .describe(+ 'A video call and its persistent chat thread.'+ ),+ type: zod.enum(['call']),+ })+ .describe(+ 'A video call and its persistent chat thread.'+ ),+ ])+ .describe(+ 'The entity whose permissions and lifecycle govern a message.'+ ),+ reactions: zod+ .array(+ zod+ .object({+ emoji: zod+ .string()+ .describe('Emoji being reacted with.'),+ users: zod+ .array(zod.string())+ .describe('User identifiers.'),+ })+ .describe(+ 'Reaction emoji and the users who added it.'+ )+ )+ .describe('Aggregated reactions.'),+ sender_id: zod+ .string()+ .describe(+ 'Authenticated actor or owner of imported content.'+ ),+ thread_id: zod+ .uuid()+ .nullish()+ .describe(+ 'Root message UUID for replies; absent on roots.'+ ),+ triggered_by: zod+ .string()+ .nullish()+ .describe('User who triggered a bot-authored message.'),+ triggered_via: zod+ .string()+ .nullish()+ .describe(+ 'Self-reported name of the client the user triggered it through, such\nas \"Claude Code\"; a display label only.'+ ),+ updated_at: zod.iso+ .datetime({})+ .describe('Last persisted update.'),+ })+ .describe(+ 'Shared message representation for channel timelines and entity discussions.'+ )+ .and(+ zod.object({+ state: zod+ .object({+ anchor: zod+ .union([+ zod.null(),+ zod+ .union([+ zod+ .object({+ mark_id: zod+ .uuid()+ .describe(+ 'Mark UUID serialized in the document.'+ ),+ marked_text: zod+ .string()+ .nullish()+ .describe(+ 'The marked text as it read when the discussion was created, already\ntrimmed and bounded. Absent on threads created or imported before\nsnapshots were captured: the text a mark covers cannot be recovered\nfrom the mark id alone.'+ ),+ type: zod.enum(['markdown']),+ })+ .describe(+ 'Stable Lexical mark identity, independent of transient node keys.'+ ),+ zod+ .object({+ anchor_id: zod+ .uuid()+ .describe('Highlight annotation UUID.'),+ marked_text: zod+ .string()+ .nullish()+ .describe(+ 'The text the highlight covers, trimmed and bounded like a markdown\nsnapshot. The highlight owns it and it can be edited there, so it is\nread from the highlight whenever the thread is, never stored on the\nthread. Absent when the highlight carries no text.'+ ),+ type: zod.enum(['pdf_highlight']),+ })+ .describe(+ 'An independently existing PDF highlight.'+ ),+ zod+ .object({+ anchor_id: zod+ .uuid()+ .describe('Placeable annotation UUID.'),+ type: zod.enum(['pdf_placeable']),+ })+ .describe(+ 'A comment-only placeable PDF annotation. It marks a point on a page,\nnot a span of text, so it has no marked text.'+ ),+ zod+ .object({+ range: zod+ .string()+ .describe(+ 'A1 cell or range, such as B4 or B4:C9.'+ ),+ sheetId: zod+ .string()+ .describe(+ 'Stable sheet identity within the workbook.'+ ),+ sheetName: zod+ .string()+ .describe(+ 'Sheet name when the discussion was created.'+ ),+ type: zod.enum(['spreadsheet']),+ })+ .describe(+ 'A cell or rectangular range in a native spreadsheet.'+ ),+ zod+ .object({+ nodeId: zod+ .string()+ .nullish()+ .describe(+ 'Layer the pin follows; absent for a pin on the bare canvas.'+ ),+ pageId: zod+ .string()+ .describe(+ 'Page (canvas) the pin is on.'+ ),+ type: zod.enum(['fig']),+ x: zod+ .number()+ .describe(+ "Horizontal offset from the layer's origin, or the page's when\nthe pin is on no layer, in design units."+ ),+ y: zod+ .number()+ .describe(+ 'Vertical offset, measured like `x`.'+ ),+ })+ .describe(+ 'A point pinned on a design (`.fig`): on a layer, or on the page\ncanvas when no layer was under it.'+ ),+ ])+ .describe(+ "A thread's location within its document. PDF geometry remains annotation-owned."+ ),+ ])+ .optional(),+ created_at: zod.iso+ .datetime({})+ .describe('Creation time of the discussion.'),+ deleted_at: zod.iso+ .datetime({})+ .nullish()+ .describe(+ 'Explicit deletion of the entire thread, distinct from root deletion.'+ ),+ resolved: zod+ .boolean()+ .describe(+ 'Whether this discussion has been resolved.'+ ),+ root_id: zod+ .uuid()+ .describe(+ 'Root message UUID; there is no separate thread identity.'+ ),+ updated_at: zod.iso+ .datetime({})+ .describe('Last state change.'),+ user_id: zod+ .string()+ .describe(+ 'User who owns this discussion, including imported discussions.'+ ),+ })+ .describe(+ 'State belonging to a whole thread, keyed by its root message.'+ ),+ thread: zod+ .object({+ latest_reply_at: zod.iso+ .datetime({})+ .nullish()+ .describe(+ 'Creation time of the latest live reply.'+ ),+ preview: zod+ .array(+ zod+ .object({+ attachments: zod+ .array(+ zod+ .object({+ created_at: zod.iso+ .datetime({})+ .describe(+ 'When the attachment was added.'+ ),+ entity_id: zod+ .string()+ .describe(+ 'Attached entity identifier.'+ ),+ entity_type: zod+ .string()+ .describe('Attached entity type.'),+ height: zod+ .number()+ .nullish()+ .describe('Optional media height.'),+ id: zod+ .uuid()+ .describe('Attachment UUID.'),+ width: zod+ .number()+ .nullish()+ .describe('Optional media width.'),+ })+ .describe(+ 'An entity attached to a message.'+ )+ )+ .describe('Attached entities.'),+ bot_profile: zod+ .union([+ zod.null(),+ zod+ .object({+ avatar_url: zod+ .string()+ .nullish()+ .describe('Bot avatar URL.'),+ name: zod+ .string()+ .describe('Bot display name.'),+ })+ .describe(+ 'Public bot profile attached to bot-authored messages.'+ ),+ ])+ .optional(),+ content: zod+ .string()+ .describe('Macro Markdown body.'),+ created_at: zod.iso+ .datetime({})+ .describe('Creation time.'),+ deleted_at: zod.iso+ .datetime({})+ .nullish()+ .describe(+ 'Message tombstone, independent of thread deletion.'+ ),+ edited_at: zod.iso+ .datetime({})+ .nullish()+ .describe('Last content edit, if any.'),+ guest_name: zod+ .string()+ .nullish()+ .describe(+ 'Display name of a verified call guest, retained after the call ends.'+ ),+ id: zod.uuid().describe('Message UUID.'),+ imported_author: zod+ .union([+ zod.null(),+ zod+ .object({+ name: zod+ .string()+ .describe(+ 'Original author text; never interpreted as an authenticated principal.'+ ),+ })+ .describe(+ 'Display attribution for a comment imported from an external document.'+ ),+ ])+ .optional(),+ kind: zod+ .enum(['message', 'call_root'])+ .optional()+ .describe(+ 'What a persisted message is. Set by the server, never by a client.'+ ),+ mentions: zod+ .array(+ zod+ .object({+ entity_id: zod+ .string()+ .describe(+ 'Mentioned entity identifier.'+ ),+ entity_type: zod+ .string()+ .describe('Mentioned entity type.'),+ })+ .describe(+ 'A mention tracked in a message body.'+ )+ )+ .describe(+ 'Tracked mentions, retained when a caller changes attachments only.'+ ),+ parent: zod+ .union([+ zod+ .object({+ id: zod+ .uuid()+ .describe(+ 'A channel, including direct messages.'+ ),+ type: zod.enum(['channel']),+ })+ .describe(+ 'A channel, including direct messages.'+ ),+ zod+ .object({+ id: zod+ .string()+ .describe(+ 'A validated document identifier. Historical document ids need not be UUIDs.'+ ),+ type: zod.enum(['document']),+ })+ .describe(+ 'A document, including tasks and PDFs.'+ ),+ zod+ .object({+ id: zod+ .uuid()+ .describe(+ 'An initiative, presented as a project in the application.'+ ),+ type: zod.enum(['initiative']),+ })+ .describe(+ 'An initiative, presented as a project in the application.'+ ),+ zod+ .object({+ id: zod+ .uuid()+ .describe('A CRM company.'),+ type: zod.enum(['crm_company']),+ })+ .describe('A CRM company.'),+ zod+ .object({+ id: zod+ .uuid()+ .describe('A CRM contact.'),+ type: zod.enum(['crm_contact']),+ })+ .describe('A CRM contact.'),+ zod+ .object({+ id: zod+ .uuid()+ .describe(+ 'A video call and its persistent chat thread.'+ ),+ type: zod.enum(['call']),+ })+ .describe(+ 'A video call and its persistent chat thread.'+ ),+ ])+ .describe(+ 'The entity whose permissions and lifecycle govern a message.'+ ),+ reactions: zod+ .array(+ zod+ .object({+ emoji: zod+ .string()+ .describe(+ 'Emoji being reacted with.'+ ),+ users: zod+ .array(zod.string())+ .describe('User identifiers.'),+ })+ .describe(+ 'Reaction emoji and the users who added it.'+ )+ )+ .describe('Aggregated reactions.'),+ sender_id: zod+ .string()+ .describe(+ 'Authenticated actor or owner of imported content.'+ ),+ thread_id: zod+ .uuid()+ .nullish()+ .describe(+ 'Root message UUID for replies; absent on roots.'+ ),+ triggered_by: zod+ .string()+ .nullish()+ .describe(+ 'User who triggered a bot-authored message.'+ ),+ triggered_via: zod+ .string()+ .nullish()+ .describe(+ 'Self-reported name of the client the user triggered it through, such\nas \"Claude Code\"; a display label only.'+ ),+ updated_at: zod.iso+ .datetime({})+ .describe('Last persisted update.'),+ })+ .describe(+ 'Shared message representation for channel timelines and entity discussions.'+ )+ )+ .describe(+ 'Bounded preview using the canonical message shape.'+ ),+ reply_count: zod+ .number()+ .describe('Total live reply count.'),+ })+ .describe(+ 'Thread counts and its oldest three live replies.'+ ),+ })+ )+ .describe(+ 'Root message with its small thread preview, independent of its parent type.'+ ),+ status: zod+ .union([+ zod+ .object({+ state: zod.enum(['live']),+ })+ .describe('The call has not ended.'),+ zod+ .object({+ duration_ms: zod+ .number()+ .describe('How long it lasted.'),+ ended_at: zod.iso+ .datetime({})+ .describe('When it ended.'),+ state: zod.enum(['ended']),+ })+ .describe('The call ended.'),+ zod+ .object({+ state: zod.enum(['record_deleted']),+ })+ .describe(+ "The call's record was deleted; its discussion stays in the channel."+ ),+ ])+ .describe(+ "A channel call's life, as its timeline row shows it."+ ),+ type: zod.enum(['call']),+ })+ .describe(+ "A channel call and its thread. The root message's id is the call id."+ ),]).describe("One chronological entry in a parent's timeline."))diff --git a/apps/web/src/lib/service-clients/service-storage/messages.ts b/apps/web/src/lib/service-clients/service-storage/messages.tsindex 23e20277e9..88d2a1e98b 100644--- a/apps/web/src/lib/service-clients/service-storage/messages.ts+++ b/apps/web/src/lib/service-clients/service-storage/messages.ts@@ -48,9 +48,13 @@ export type MessageListPage = Omit<import('./generated/schemas/messagePage').MessagePage,'items'> & { items: MessageListItem[] };+export type CallEntryStatus =+ import('./generated/schemas/callEntryStatus').CallEntryStatus;export type MessageTimelineEntry =| { type: 'message'; message: MessageListItem }- | { type: 'activity'; activity: TimelineActivity };+ | { type: 'activity'; activity: TimelineActivity }+ /** A channel call and its thread; the root message's id is the call id. */+ | { type: 'call'; message: MessageListItem; status: CallEntryStatus };/** Messages and the parent's activity in one server-ordered, newest-first list. */export type MessageTimelinePage = Omit<import('./generated/schemas/messageTimelinePage').MessageTimelinePage,@@ -70,7 +74,11 @@ import type { MessageTimelineQuery } from './generated/schemas/messageTimelineQufunction isKnownEntry(entry: MessageTimelineEntry | { type: string }): entry is MessageTimelineEntry {- return entry.type === 'message' || entry.type === 'activity';+ return (+ entry.type === 'message' ||+ entry.type === 'activity' ||+ entry.type === 'call'+ );}function path(parent: MessageParent) {diff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.jsonindex ad5f14e9f2..1d1c2d9822 100644--- a/apps/web/src/lib/service-clients/service-storage/openapi.json+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json@@ -24560,6 +24560,96 @@}}},+ "CallDiscussion": {+ "oneOf": [+ {+ "type": "object",+ "description": "A thread in the call's channel, rooted at the message with the call's id.",+ "required": ["channel_id", "root_id", "kind"],+ "properties": {+ "channel_id": {+ "type": "string",+ "format": "uuid",+ "description": "The channel holding the thread."+ },+ "kind": {+ "type": "string",+ "enum": ["channel_thread"]+ },+ "root_id": {+ "type": "string",+ "format": "uuid",+ "description": "The thread's root message."+ }+ }+ },+ {+ "type": "object",+ "description": "The call's own thread on the call parent.",+ "required": ["call_id", "kind"],+ "properties": {+ "call_id": {+ "type": "string",+ "format": "uuid",+ "description": "The call owning the thread."+ },+ "kind": {+ "type": "string",+ "enum": ["call_chat"]+ }+ }+ }+ ],+ "description": "Where a call's discussion lives, decided once when the call is created.\n`channel_id` cannot decide this: past channel calls keep their own thread."+ },+ "CallEntryStatus": {+ "oneOf": [+ {+ "type": "object",+ "description": "The call has not ended.",+ "required": ["state"],+ "properties": {+ "state": {+ "type": "string",+ "enum": ["live"]+ }+ }+ },+ {+ "type": "object",+ "description": "The call ended.",+ "required": ["ended_at", "duration_ms", "state"],+ "properties": {+ "duration_ms": {+ "type": "integer",+ "format": "int64",+ "description": "How long it lasted."+ },+ "ended_at": {+ "type": "string",+ "format": "date-time",+ "description": "When it ended."+ },+ "state": {+ "type": "string",+ "enum": ["ended"]+ }+ }+ },+ {+ "type": "object",+ "description": "The call's record was deleted; its discussion stays in the channel.",+ "required": ["state"],+ "properties": {+ "state": {+ "type": "string",+ "enum": ["record_deleted"]+ }+ }+ }+ ],+ "description": "A channel call's life, as its timeline row shows it."+ },"CallFilters": {"type": "object","description": "Filters for call records.",@@ -24612,6 +24702,7 @@"description": "Full record of a call, unifying rows from `calls` (active) and\n`call_records` (archived) into a single response shape.","required": ["callId",+ "discussion","createdBy","startedAt","shareWithTeam",@@ -24643,6 +24734,10 @@"type": ["string", "null"],"description": "User-supplied or AI-generated display name for the call. Only set on\narchived `call_records`; active calls always return `None`."},+ "discussion": {+ "$ref": "#/components/schemas/CallDiscussion",+ "description": "Where this call's discussion lives."+ },"durationMs": {"type": ["integer", "null"],"format": "int64",@@ -37457,6 +37552,10 @@}]},+ "kind": {+ "$ref": "#/components/schemas/MessageKind",+ "description": "What this message is."+ },"mentions": {"type": "array","items": {@@ -37713,6 +37812,21 @@}}},+ {+ "type": "object",+ "description": "A channel call's thread root was created. It stands for the call, so it\nreaches viewers and moves the channel up without any of what a post\ncauses: no notifications, agents, routines, webhooks or search documents.",+ "required": ["message", "type"],+ "properties": {+ "message": {+ "$ref": "#/components/schemas/Message",+ "description": "Persisted root."+ },+ "type": {+ "type": "string",+ "enum": ["call_root_posted"]+ }+ }+ },{"type": "object","description": "Thread resolution, placement, or deletion changed.",@@ -37867,6 +37981,11 @@}}},+ "MessageKind": {+ "type": "string",+ "description": "What a persisted message is. Set by the server, never by a client.",+ "enum": ["message", "call_root"]+ },"MessageListItem": {"allOf": [{@@ -38307,6 +38426,25 @@"enum": ["activity"]}}+ },+ {+ "type": "object",+ "description": "A channel call and its thread. The root message's id is the call id.",+ "required": ["message", "status", "type"],+ "properties": {+ "message": {+ "$ref": "#/components/schemas/MessageListItem",+ "description": "The call's root message, its thread state and its reply preview."+ },+ "status": {+ "$ref": "#/components/schemas/CallEntryStatus",+ "description": "Where the call is in its life."+ },+ "type": {+ "type": "string",+ "enum": ["call"]+ }+ }}],"description": "One chronological entry in a parent's timeline."diff --git a/crates/agent_harness/src/outbound/channel_announcer/test.rs b/crates/agent_harness/src/outbound/channel_announcer/test.rsindex 050479d931..b11056d3a9 100644--- a/crates/agent_harness/src/outbound/channel_announcer/test.rs+++ b/crates/agent_harness/src/outbound/channel_announcer/test.rs@@ -376,6 +376,7 @@ async fn an_answer_the_thread_may_not_carry_points_at_the_session() {let mut messages = messages::domain::api::MockMessageCommands::new();let seen = Arc::clone(&patched);let replied = Message {+ kind: messages::domain::models::MessageKind::Message,id: reply_id,parent: parent.clone(),thread_id: Some(Uuid::from_u128(2)),@@ -495,6 +496,7 @@ async fn shared_thread_and_dm_snapshots_omit_raw_tool_details() {assert_eq!(post.thread_id, thread);assert_eq!(post.content, "safe activity");Ok(Message {+ kind: messages::domain::models::MessageKind::Message,id,parent: message_parent.clone(),thread_id: thread,diff --git a/crates/agent_harness/src/outbound/channel_prompt_context/test.rs b/crates/agent_harness/src/outbound/channel_prompt_context/test.rsindex 23d2f71355..dc994136a6 100644--- a/crates/agent_harness/src/outbound/channel_prompt_context/test.rs+++ b/crates/agent_harness/src/outbound/channel_prompt_context/test.rs@@ -58,6 +58,7 @@ fn posted(minute: i64,) -> Message {Message {+ kind: messages::domain::models::MessageKind::Message,id: Uuid::from_u128(id),parent: parent.clone(),thread_id: thread.map(Uuid::from_u128),diff --git a/crates/agent_session/src/outbound/postgres/test.rs b/crates/agent_session/src/outbound/postgres/test.rsindex 4c014a6ecd..2606481744 100644--- a/crates/agent_session/src/outbound/postgres/test.rs+++ b/crates/agent_session/src/outbound/postgres/test.rs@@ -2741,6 +2741,7 @@ async fn a_document_session_preserves_its_origin_and_inherits_live_document_accelet parent = MessageParent::parse("document", &document_id).unwrap();let root = messages.create(CreateMessage {+ kind: messages::domain::models::MessageKind::Message,guest_name: None,canonical_root_id: None,parent: parent.clone(),diff --git a/crates/agent_trigger/src/domain/task_assignment/test.rs b/crates/agent_trigger/src/domain/task_assignment/test.rsindex 99872f31f5..3ecbabd615 100644--- a/crates/agent_trigger/src/domain/task_assignment/test.rs+++ b/crates/agent_trigger/src/domain/task_assignment/test.rs@@ -150,6 +150,7 @@ fn access(fn discussion(assignment: &TaskAssignment) -> messages::domain::models::Message {messages::domain::models::Message {+ kind: messages::domain::models::MessageKind::Message,id: discussion_id(assignment.event_id, BotId::TEST_A),parent: assignment.parent.clone(),thread_id: None,diff --git a/crates/agent_trigger/src/outbound/discussion_context/test.rs b/crates/agent_trigger/src/outbound/discussion_context/test.rsindex e0b8081c1d..573c78d321 100644--- a/crates/agent_trigger/src/outbound/discussion_context/test.rs+++ b/crates/agent_trigger/src/outbound/discussion_context/test.rs@@ -123,6 +123,7 @@ fn posted(minute: i64,) -> Message {Message {+ kind: messages::domain::models::MessageKind::Message,id: Uuid::from_u128(id),parent: parent.clone(),thread_id: thread.map(Uuid::from_u128),diff --git a/crates/agent_trigger/src/outbound/message_thread_history/test.rs b/crates/agent_trigger/src/outbound/message_thread_history/test.rsindex 9ac993d0e1..28eefe5f57 100644--- a/crates/agent_trigger/src/outbound/message_thread_history/test.rs+++ b/crates/agent_trigger/src/outbound/message_thread_history/test.rs@@ -41,6 +41,7 @@ fn root() -> Uuid {fn message(id: Uuid, deleted: bool) -> Message {let now = chrono::Utc::now();Message {+ kind: messages::domain::models::MessageKind::Message,id,parent: parent(),thread_id: (id != root()).then_some(root()),diff --git a/crates/bots/src/inbound/channel_webhook_router/tests.rs b/crates/bots/src/inbound/channel_webhook_router/tests.rsindex 5f3ad4e3f2..a578796e7b 100644--- a/crates/bots/src/inbound/channel_webhook_router/tests.rs+++ b/crates/bots/src/inbound/channel_webhook_router/tests.rs@@ -569,6 +569,7 @@ impl messages::domain::api::MessageCommands for TestChannelPoster {});match self.mode {TestPostMode::Ok => Ok(messages::domain::models::Message {+ kind: messages::domain::models::MessageKind::Message,id: Uuid::new_v4(),parent: messages::domain::models::MessageParent::Channel(channel_id),thread_id: input.thread_id,diff --git a/crates/call/AGENTS.md b/crates/call/AGENTS.mdindex 367d188bbe..ecad7dcc02 100644--- a/crates/call/AGENTS.md+++ b/crates/call/AGENTS.md@@ -49,6 +49,9 @@ in-call chat.## Gotchas+- A call's discussion is stored in `call_entities.discussion` when it is created, and can't be+ inferred from `channel_id`: past channel calls keep `call_chat`. See+ `docs/design/call-chat-in-channel.md`.- Declining a call on one device must stop ringing on every other device — thisregressed once (#7092); route the decline through the shared call state, nota per-device signal.diff --git a/crates/call/Cargo.toml b/crates/call/Cargo.tomlindex 6df92e06a7..cb53da1e17 100644--- a/crates/call/Cargo.toml+++ b/crates/call/Cargo.toml@@ -25,6 +25,7 @@ outbound = ["dep:cloudfront_sign","channels/outbound","dep:entity_access_db_utils",+ "dep:feature_flags","dep:futures","dep:livekit-api","dep:livekit-protocol",@@ -75,6 +76,7 @@ macro_event_broker = { path = "../macro_event_broker", default-features = falsemacro_event_topics = { path = "../macro_event_topics" }macro_user_id = { path = "../macro_user_id" }macro_uuid = { path = "../macro_uuid" }+feature_flags = { path = "../feature_flags", optional = true }messages = { path = "../messages", default-features = false, features = ["ports"], optional = true }model-entity = { path = "../model-entity" }model-error-response = { path = "../model-error-response", optional = true }diff --git a/crates/call/src/domain/activity.rs b/crates/call/src/domain/activity.rsindex ef9d030ac4..64093a76a8 100644--- a/crates/call/src/domain/activity.rs+++ b/crates/call/src/domain/activity.rs@@ -41,6 +41,23 @@ impl DomainActivity for CallStartedActivity {}}+/// Completion of a call whose channel row already shows the ending, so it is+/// recorded against the call and stays out of the channel's timeline.+struct CallThreadEndedActivity {+ call_id: String,+ end: ::activity::domain::models::CallEnd,+}++impl DomainActivity for CallThreadEndedActivity {+ const ENTITY_TYPE: EntityType = EntityType::Call;+ fn entity_id(&self) -> &str {+ &self.call_id+ }+ fn into_action(self) -> Action {+ Action::CallEnded(self.end)+ }+}+/// Channel-targeted completion of a call.struct CallEndedActivity {channel_id: String,@@ -65,6 +82,25 @@ impl ActivitySource for CallTopicEvent {fn ingest(&self, event_id: Uuid) -> Ingest {match self {// Only channel calls have a timeline to record the ending in.+ CallTopicEvent::RecordArchived(m) if m.channel_thread => {+ Ingest::Insert(vec![Activity::from_domain(+ event_id,+ 0,+ Actor::new_from_user(m.created_by.clone()),+ None,+ CallThreadEndedActivity {+ call_id: m.call_id.to_string(),+ end: ::activity::domain::models::CallEnd {+ call_id: m.call_id.to_string(),+ duration_ms: m+ .duration_ms+ .unwrap_or_else(|| (m.ended_at - m.started_at).num_milliseconds())+ .max(0),+ },+ },+ m.ended_at,+ )])+ }CallTopicEvent::RecordArchived(m) => match m.channel_id {None => Ingest::Ignore,Some(channel_id) => Ingest::Insert(vec![Activity::from_domain(diff --git a/crates/call/src/domain/activity/test.rs b/crates/call/src/domain/activity/test.rsindex 0375124bb6..776d2e78a4 100644--- a/crates/call/src/domain/activity/test.rs+++ b/crates/call/src/domain/activity/test.rs@@ -29,10 +29,28 @@ fn archived(],has_recording: false,archive_reason: crate::domain::events::CallArchiveReason::LastParticipantLeft,+ channel_thread: false,}),)}+#[test]+fn a_channel_thread_calls_ending_stays_out_of_the_channels_timeline() {+ let mut event = archived(Some(Uuid::from_u128(9)), Some(480_000), Utc::now());+ let CallTopicEvent::RecordArchived(metadata) = &mut event.event else {+ panic!("expected an archived call");+ };+ metadata.channel_thread = true;++ let Ingest::Insert(activities) = event.event.ingest(event.event_id) else {+ panic!("expected the ending to be recorded");+ };++ assert_eq!(activities.len(), 1);+ assert_eq!(activities[0].entity_type, EntityType::Call);+ assert_eq!(activities[0].entity_id, Uuid::from_u128(5).to_string());+}+#[test]fn archived_calls_without_a_channel_have_no_timeline() {let event = archived(None, Some(480_000), Utc::now());diff --git a/crates/call/src/domain/events.rs b/crates/call/src/domain/events.rsindex f9004abc35..1317319f8c 100644--- a/crates/call/src/domain/events.rs+++ b/crates/call/src/domain/events.rs@@ -64,6 +64,10 @@ pub struct CallRecordArchivedMetadata {pub has_recording: bool,/// Reason the call was archived.pub archive_reason: CallArchiveReason,+ /// Whether the call's discussion is a thread in its channel, whose row+ /// already shows the ending. False in events published before this existed.+ #[serde(default)]+ pub channel_thread: bool,}/// Metadata for [`CallTopicEvent::RecordUpdated`].diff --git a/crates/call/src/domain/events/test.rs b/crates/call/src/domain/events/test.rsindex 906465b059..c89e9f580c 100644--- a/crates/call/src/domain/events/test.rs+++ b/crates/call/src/domain/events/test.rs@@ -48,6 +48,7 @@ fn topic_events() -> Vec<(CallTopicEvent, Value)> {),(CallTopicEvent::RecordArchived(CallRecordArchivedMetadata {+ channel_thread: false,call_id: uuid(CALL_ID),channel_id: Some(uuid(CHANNEL_ID)),created_by: user_id("macro|[email protected]"),@@ -75,6 +76,7 @@ fn topic_events() -> Vec<(CallTopicEvent, Value)> {"participants": ["macro|[email protected]", "macro|[email protected]"],"has_recording": true,"archive_reason": "last_participant_left",+ "channel_thread": false,},}),),diff --git a/crates/call/src/domain/models.rs b/crates/call/src/domain/models.rsindex 7f1e0a449f..b0cad59d98 100644--- a/crates/call/src/domain/models.rs+++ b/crates/call/src/domain/models.rs@@ -32,6 +32,40 @@ pub struct Call {pub egress_id: Option<String>,}+/// Where a call's discussion lives, decided once when the call is created.+/// `channel_id` cannot decide this: past channel calls keep their own thread.+#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]+#[serde(tag = "kind", rename_all = "snake_case")]+pub enum CallDiscussion {+ /// A thread in the call's channel, rooted at the message with the call's id.+ ChannelThread {+ /// The channel holding the thread.+ channel_id: Uuid,+ /// The thread's root message.+ root_id: Uuid,+ },+ /// The call's own thread on the call parent.+ CallChat {+ /// The call owning the thread.+ call_id: Uuid,+ },+}++impl CallDiscussion {+ /// Read the stored value. A channel thread whose channel is gone has nothing+ /// left to show, and reads as a call with no chat.+ pub fn from_stored(stored: &str, call_id: Uuid, channel_id: Option<Uuid>) -> Self {+ match (stored, channel_id) {+ ("channel_thread", Some(channel_id)) => Self::ChannelThread {+ channel_id,+ root_id: call_id,+ },+ _ => Self::CallChat { call_id },+ }+ }+}+/// Facts committed when an active call is archived.#[derive(Debug, Clone, PartialEq, Eq)]pub struct ArchivedCall {@@ -51,6 +85,8 @@ pub struct ArchivedCall {pub has_recording: bool,/// Macro accounts that joined the call over its lifetime, once each.pub participants: Vec<String>,+ /// Whether the call's discussion is a thread in its channel.+ pub channel_thread: bool,}/// The people known to have been on, or invited to, an archived call.@@ -480,6 +516,8 @@ pub struct CallRecord {pub call_id: Uuid,/// The channel this call belongs to.pub channel_id: Option<Uuid>,+ /// Where this call's discussion lives.+ pub discussion: CallDiscussion,/// The RTC room name. `None` for imported calls, which never had a room.pub room_name: Option<String>,/// User who created the call.diff --git a/crates/call/src/domain/ports.rs b/crates/call/src/domain/ports.rsindex a0287f7892..b9693b9dd2 100644--- a/crates/call/src/domain/ports.rs+++ b/crates/call/src/domain/ports.rs@@ -157,6 +157,7 @@ pub trait CallRepository: Send + Sync + 'static {channel_id: &Uuid,room_name: &str,created_by: MacroUserIdStr<'a>,+ channel_thread: bool,) -> impl Future<Output = Result<Option<Call>, CallError>> + Send;/// Read the persisted RTC room for a particular active call session.@@ -1218,3 +1219,13 @@ impl VoiceRepository for NoOpVoiceRepository {Ok(None)}}++/// Whether new channel calls discuss in a channel thread, and creating that thread.+#[async_trait::async_trait]+pub trait ChannelThreads: Send + Sync + 'static {+ /// Whether a call this person starts gets a thread in its channel. A failed+ /// read answers no: the call then behaves as calls always have.+ async fn enabled_for(&self, caller: MacroUserIdStr<'_>) -> bool;+ /// Create the call's thread root, once.+ async fn ensure_root(&self, call_id: Uuid) -> Result<(), rootcause::Report>;+}diff --git a/crates/call/src/domain/service.rs b/crates/call/src/domain/service.rsindex 2055fc5066..7c8dabdffd 100644--- a/crates/call/src/domain/service.rs+++ b/crates/call/src/domain/service.rs@@ -92,6 +92,7 @@ pub struct CallServiceImpl<voice_repo: Vr,ring_status_base_url: Option<String>,event_broker: B,+ channel_threads: Option<Arc<dyn crate::domain::ports::ChannelThreads>>,}impl<@@ -129,6 +130,7 @@ impl<voice_repo: NoOpVoiceRepository,ring_status_base_url: None,event_broker: NoopMacroEventBroker,+ channel_threads: None,}}}@@ -146,6 +148,15 @@ impl<B: MacroEventBroker,> CallServiceImpl<R, C, Cn, E, N, S, Sm, V, Vr, B>{+ /// Let new channel calls discuss in a thread in their channel.+ pub fn with_channel_threads(+ mut self,+ channel_threads: Arc<dyn crate::domain::ports::ChannelThreads>,+ ) -> Self {+ self.channel_threads = Some(channel_threads);+ self+ }+/// Enable auto-recording with the given S3 configuration.pub fn with_egress(mut self, s3_config: EgressS3Config) -> Self {self.egress_s3_config = Some(s3_config);@@ -194,6 +205,7 @@ impl<voice_repo: self.voice_repo,ring_status_base_url: self.ring_status_base_url,event_broker: self.event_broker,+ channel_threads: self.channel_threads,}}@@ -217,6 +229,7 @@ impl<voice_repo,ring_status_base_url: self.ring_status_base_url,event_broker: self.event_broker,+ channel_threads: self.channel_threads,}}@@ -240,6 +253,7 @@ impl<voice_repo: self.voice_repo,ring_status_base_url: self.ring_status_base_url,event_broker,+ channel_threads: self.channel_threads,}}@@ -327,6 +341,7 @@ impl<participants,has_recording: archived.has_recording,archive_reason,+ channel_thread: archived.channel_thread,},));}@@ -864,14 +879,42 @@ impl<.await.map_err(CallError::Internal)?;+ // Decided before the row exists, so nobody can read this call+ // and see a discussion it will not keep.+ let channel_thread = match &self.channel_threads {+ Some(channel_threads) => channel_threads.enabled_for(user_id.copied()).await,+ None => false,+ };+// Try to create call record; if another request won the race// the ON CONFLICT returns None — re-read the existing call.match self.repo- .create_call(&call_id, channel_id, &room_name, user_id.copied())+ .create_call(+ &call_id,+ channel_id,+ &room_name,+ user_id.copied(),+ channel_thread,+ ).await?{Some(call) => {+ // Never blocks the call: the first reply retries it.+ if channel_thread && let Some(channel_threads) = &self.channel_threads {+ channel_threads+ .ensure_root(call.id)+ .await+ .inspect_err(|error| {+ tracing::error!(+ error = ?error,+ call_id = %call.id,+ "failed to create the call's thread root"+ );+ })+ .ok();+ }+match MacroUserIdStr::parse_from_str(&call.created_by) {Ok(created_by) => {self.publish_call_event(&CallMacroEvent::started(diff --git a/crates/call/src/domain/service/test.rs b/crates/call/src/domain/service/test.rsindex 95c89c148a..19d9e1cc30 100644--- a/crates/call/src/domain/service/test.rs+++ b/crates/call/src/domain/service/test.rs@@ -449,6 +449,15 @@ fn started_event_call(created_by: &str) -> Call {}fn mock_get_or_create_repo(scenario: GetOrCreateScenario, call: Call) -> MockCallRepository {+ mock_get_or_create_repo_storing(scenario, call, Arc::default())+}++/// The same scenarios, recording whether the call was stored with a channel thread.+fn mock_get_or_create_repo_storing(+ scenario: GetOrCreateScenario,+ call: Call,+ channel_thread_stored: Arc<Mutex<Option<bool>>>,+) -> MockCallRepository {let mut repo = MockCallRepository::new();match scenario {@@ -458,7 +467,8 @@ fn mock_get_or_create_repo(scenario: GetOrCreateScenario, call: Call) -> MockCal.returning(|_| Box::pin(async { Ok(None) }));repo.expect_create_call().times(1).return_once(- move |call_id, channel_id, room_name, _| {+ move |call_id, channel_id, room_name, _, channel_thread| {+ *channel_thread_stored.lock().unwrap() = Some(channel_thread);assert_eq!(room_name, call_id.to_string());assert_ne!(room_name, channel_id.to_string());Box::pin(async move { Ok(Some(call)) })@@ -477,7 +487,7 @@ fn mock_get_or_create_repo(scenario: GetOrCreateScenario, call: Call) -> MockCal.return_once(move |_| Box::pin(async move { Ok(Some(call)) }));repo.expect_create_call().times(1)- .returning(|_, _, _, _| Box::pin(async { Ok(None) }));+ .returning(|_, _, _, _, _| Box::pin(async { Ok(None) }));}GetOrCreateScenario::ExistingCall => {repo.expect_get_call_by_channel_id()@@ -588,6 +598,83 @@ async fn get_or_create_call(result}+/// Answers the flag with `enabled`, and records and answers root requests.+struct FakeChannelThreads {+ enabled: bool,+ root_fails: bool,+ roots: Arc<Mutex<Vec<Uuid>>>,+}++#[async_trait::async_trait]+impl crate::domain::ports::ChannelThreads for FakeChannelThreads {+ async fn enabled_for(&self, _: MacroUserIdStr<'_>) -> bool {+ self.enabled+ }++ async fn ensure_root(&self, call_id: Uuid) -> Result<(), rootcause::Report> {+ self.roots.lock().unwrap().push(call_id);+ if self.root_fails {+ return Err(rootcause::report!("message service unavailable"));+ }+ Ok(())+ }+}++/// Start a call as the race winner and report what the repository was asked to store.+async fn start_flagged_call(enabled: bool, root_fails: bool) -> (Vec<Uuid>, bool) {+ let stored = Arc::new(Mutex::new(None));+ let repo = mock_get_or_create_repo_storing(+ GetOrCreateScenario::CreatorWins,+ started_event_call(STARTED_EVENT_CREATOR),+ stored.clone(),+ );+ let roots = Arc::new(Mutex::new(Vec::new()));+ let service = build_get_or_create_service(+ repo,+ StubConnectionService,+ RecordingEventBroker::default(),+ false,+ )+ .with_channel_threads(Arc::new(FakeChannelThreads {+ enabled,+ root_fails,+ roots: roots.clone(),+ }));++ service+ .get_or_create_call(&STARTED_EVENT_CHANNEL_ID, user("[email protected]"))+ .await+ .unwrap();++ let stored = stored.lock().unwrap().unwrap();+ let roots = roots.lock().unwrap().clone();+ (roots, stored)+}++#[tokio::test]+async fn a_flagged_caller_gets_a_channel_thread_with_its_root() {+ let (roots, stored) = start_flagged_call(true, false).await;++ assert!(stored);+ assert_eq!(roots, [STARTED_EVENT_CALL_ID]);+}++#[tokio::test]+async fn an_unflagged_caller_keeps_the_calls_own_chat() {+ let (roots, stored) = start_flagged_call(false, false).await;++ assert!(!stored);+ assert!(roots.is_empty());+}++#[tokio::test]+async fn a_failed_root_never_stops_the_call() {+ let (roots, stored) = start_flagged_call(true, true).await;++ assert!(stored);+ assert_eq!(roots, [STARTED_EVENT_CALL_ID]);+}+#[tokio::test]async fn get_or_create_call_publishes_started_event() {let broker = RecordingEventBroker::default();@@ -999,6 +1086,7 @@ fn archived_call_for_event(has_recording: bool,) -> ArchivedCall {ArchivedCall {+ channel_thread: false,call_id: ARCHIVED_EVENT_CALL_ID,channel_id: Some(ARCHIVED_EVENT_CHANNEL_ID),created_by: created_by.to_string(),@@ -1135,6 +1223,7 @@ fn assert_archived_event("participants": participants,"has_recording": has_recording,"archive_reason": archive_reason,+ "channel_thread": false,},}));@@ -1567,6 +1656,9 @@ const MUTATED_EVENT_ACTOR: &str = "macro|[email protected]";fn call_record_for_mutation() -> CallRecord {CallRecord {+ discussion: crate::domain::models::CallDiscussion::CallChat {+ call_id: Uuid::nil(),+ },call_id: MUTATED_EVENT_CALL_ID,channel_id: Some(MUTATED_EVENT_CHANNEL_ID),room_name: Some("mutation-event-room".to_string()),@@ -2711,6 +2803,9 @@ enum NamePersistence {fn summarized_call_record(custom_name: Option<&str>) -> CallRecord {CallRecord {+ discussion: crate::domain::models::CallDiscussion::CallChat {+ call_id: Uuid::nil(),+ },call_id: SUMMARIZED_EVENT_CALL_ID,channel_id: Some(SUMMARIZED_EVENT_CHANNEL_ID),room_name: Some(SUMMARIZED_EVENT_CHANNEL_ID.to_string()),diff --git a/crates/call/src/outbound/channel_threads.rs b/crates/call/src/outbound/channel_threads.rsnew file mode 100644index 0000000000..e126b07d84--- /dev/null+++ b/crates/call/src/outbound/channel_threads.rs@@ -0,0 +1,57 @@+//! Gates channel threads on a per-caller flag and creates their roots through+//! the message service.+use std::sync::{Arc, OnceLock};++use feature_flags::FeatureFlags;+use macro_user_id::user_id::MacroUserIdStr;+use messages::domain::api::CallRootPoster;+use uuid::Uuid;++use crate::domain::ports::ChannelThreads;++/// PostHog flag naming who gets a channel thread when they start a channel call.+const ENABLE_CALL_CHANNEL_THREAD: &str = "enable-call-channel-thread";++/// The message service is built after the call service it sends to, so its+/// composition root fills this in once both exist.+pub type LateCallRootPoster = Arc<OnceLock<Arc<dyn CallRootPoster>>>;++/// [`ChannelThreads`] over a feature flag and the message service.+pub struct FlaggedChannelThreads<F> {+ flags: F,+ roots: LateCallRootPoster,+}++impl<F> FlaggedChannelThreads<F> {+ /// Compose the flag source with the message service it will send to.+ pub fn new(flags: F, roots: LateCallRootPoster) -> Self {+ Self { flags, roots }+ }+}++#[async_trait::async_trait]+impl<F: FeatureFlags + 'static> ChannelThreads for FlaggedChannelThreads<F> {+ async fn enabled_for(&self, caller: MacroUserIdStr<'_>) -> bool {+ match self.flags.load(&caller).await {+ Ok(flags) => flags.is_enabled(ENABLE_CALL_CHANNEL_THREAD),+ Err(error) => {+ tracing::warn!(+ error = ?error,+ "failed to load call flags; this call keeps its own chat"+ );+ false+ }+ }+ }++ async fn ensure_root(&self, call_id: Uuid) -> Result<(), rootcause::Report> {+ let roots = self+ .roots+ .get()+ .ok_or_else(|| rootcause::report!("the message service is not ready"))?;+ roots+ .ensure_call_root(call_id)+ .await+ .map_err(|error| rootcause::report!("failed to create the call root: {error}"))+ }+}diff --git a/crates/call/src/outbound/mod.rs b/crates/call/src/outbound/mod.rsindex c37699a06e..f49736b253 100644--- a/crates/call/src/outbound/mod.rs+++ b/crates/call/src/outbound/mod.rs@@ -1,5 +1,7 @@/// AI-backed summarizer implementing [`CallSummarizer`](crate::domain::ports::CallSummarizer).pub mod ai_call_summarizer;+/// Flag-gated channel threads implementing [`ChannelThreads`](crate::domain::ports::ChannelThreads).+pub mod channel_threads;/// LiveKit RTC client adapter implementing [`CallRtcClient`](crate::domain::ports::CallRtcClient).pub mod livekit_rtc_client;/// Postgres-backed repository implementing [`CallRepository`](crate::domain::ports::CallRepository).diff --git a/crates/call/src/outbound/pg_call_repo.rs b/crates/call/src/outbound/pg_call_repo.rsindex 2ab296a439..4e49807a95 100644--- a/crates/call/src/outbound/pg_call_repo.rs+++ b/crates/call/src/outbound/pg_call_repo.rs@@ -354,6 +354,7 @@ impl CallRepository for PgCallRepo {channel_id: &Uuid,room_name: &str,created_by: MacroUserIdStr<'_>,+ channel_thread: bool,) -> Result<Option<Call>, CallError> {let mut tx = self.pool.begin().await?;@@ -436,6 +437,16 @@ impl CallRepository for PgCallRepo {return Ok(None);};+ // The insert above created the durable entity through its trigger.+ if channel_thread {+ sqlx::query!(+ "UPDATE call_entities SET discussion = 'channel_thread' WHERE id = $1",+ call_id,+ )+ .execute(tx.as_mut())+ .await?;+ }+tx.commit().await?;Ok(Some(Call {@@ -1270,8 +1281,10 @@ impl CallRepository for PgCallRepo {SELECT c.id, c.channel_id, c.room_name, c.created_by, c.created_at, c.egress_id, c.recording_key, c.preview_url, c.recording_started_at,(SELECT title FROM call_meetings WHERE id = c.meeting_id) AS custom_name,c.share_with_team,+ ce.discussion,sp.team_share_access_level AS "team_share_access_level?: AccessLevel"FROM calls c+ JOIN call_entities ce ON ce.id = c.idJOIN "SharePermission" sp ON sp.id = c.share_permission_idWHERE c.id = $1"#,@@ -1348,6 +1361,11 @@ impl CallRepository for PgCallRepo {call_id: active.id,user_access_level: None,channel_id: active.channel_id,+ discussion: crate::domain::models::CallDiscussion::from_stored(+ &active.discussion,+ active.id,+ active.channel_id,+ ),room_name: Some(active.room_name),created_by: active.created_by,started_at: active.created_at,@@ -1380,8 +1398,10 @@ impl CallRepository for PgCallRepo {let Some(archived) = sqlx::query!(r#"SELECT cr.id, cr.channel_id, cr.room_name, cr.created_by, cr.started_at, cr.ended_at, cr.duration_ms, cr.egress_id, cr.recording_key, cr.preview_url, cr.recording_started_at, cr.custom_name, cr.summary,+ ce.discussion,sp.team_share_access_level AS "team_share_access_level?: AccessLevel"FROM call_records cr+ JOIN call_entities ce ON ce.id = cr.idJOIN "SharePermission" sp ON sp.id = cr.share_permission_idWHERE cr.id = $1"#,@@ -1464,6 +1484,11 @@ impl CallRepository for PgCallRepo {call_id: archived.id,user_access_level: None,channel_id: archived.channel_id,+ discussion: crate::domain::models::CallDiscussion::from_stored(+ &archived.discussion,+ archived.id,+ archived.channel_id,+ ),room_name: Some(archived.room_name),created_by: archived.created_by,started_at: archived.started_at,@@ -1968,6 +1993,17 @@ impl CallRepository for PgCallRepo {guests_by_call.extend(imported::imported_guests(&mut conn, &imported_ids).await?);drop(conn);+ let call_ids: Vec<Uuid> = rows.iter().map(|row| row.call_id).collect();+ let discussions: HashMap<Uuid, String> = sqlx::query!(+ "SELECT id, discussion FROM call_entities WHERE id = ANY($1)",+ &call_ids,+ )+ .fetch_all(&self.pool)+ .await?+ .into_iter()+ .map(|row| (row.id, row.discussion))+ .collect();+let mut records = Vec::with_capacity(rows.len());for row in rows {let participants = participants_by_call@@ -1979,6 +2015,13 @@ impl CallRepository for PgCallRepo {call_id: row.call_id,user_access_level: None,channel_id: row.channel_id,+ discussion: crate::domain::models::CallDiscussion::from_stored(+ discussions+ .get(&row.call_id)+ .map_or("call_chat", String::as_str),+ row.call_id,+ row.channel_id,+ ),room_name: row.room_name,created_by: row.created_by,started_at: row.started_at,diff --git a/crates/call/src/outbound/pg_call_repo/imported.rs b/crates/call/src/outbound/pg_call_repo/imported.rsindex af93f03886..ae048f449f 100644--- a/crates/call/src/outbound/pg_call_repo/imported.rs+++ b/crates/call/src/outbound/pg_call_repo/imported.rs@@ -138,6 +138,7 @@ pub(super) async fn read_imported_call_record(call_id: call.id,user_access_level: None,channel_id: None,+ discussion: crate::domain::models::CallDiscussion::CallChat { call_id: call.id },room_name: None,created_by: call.user_id,started_at,diff --git a/crates/call/src/outbound/pg_call_repo/lifecycle.rs b/crates/call/src/outbound/pg_call_repo/lifecycle.rsindex 8ea261fa1c..da2f7c60cf 100644--- a/crates/call/src/outbound/pg_call_repo/lifecycle.rs+++ b/crates/call/src/outbound/pg_call_repo/lifecycle.rs@@ -196,6 +196,14 @@ impl PgCallRepo {.execute(tx.as_mut()).await?;+ let channel_thread = sqlx::query_scalar!(+ r#"SELECT discussion = 'channel_thread' AS "channel_thread!" FROM call_entities WHERE id = $1"#,+ call_id,+ )+ .fetch_optional(tx.as_mut())+ .await?+ .unwrap_or(false);+// Delete the ephemeral call (cascades to call_participants and call_transcripts).sqlx::query!(r#"@@ -215,6 +223,7 @@ impl PgCallRepo {duration_ms,has_recording,participants,+ channel_thread,};tx.commit().await?;diff --git a/crates/call/src/outbound/pg_call_repo/team_share/test.rs b/crates/call/src/outbound/pg_call_repo/team_share/test.rsindex 216301ee27..a7d404cdc2 100644--- a/crates/call/src/outbound/pg_call_repo/team_share/test.rs+++ b/crates/call/src/outbound/pg_call_repo/team_share/test.rs@@ -338,7 +338,7 @@ async fn create_call_starts_with_toggle_on_and_no_canonical_state(give_user_a_team(&pool, USER_A.as_ref(), &TEAM_ID).await?;let id = Uuid::now_v7();- repo.create_call(&id, &CH2, "room-ch2", USER_A.copied())+ repo.create_call(&id, &CH2, "room-ch2", USER_A.copied(), false).await?.expect("call created");@@ -365,7 +365,7 @@ async fn create_call_lost_race_leaves_no_permission_or_grant_rows(// CH1 already has an active call (the fixture's CALL1).let created = repo- .create_call(&id, &CH1, "room-dup", USER_A.copied())+ .create_call(&id, &CH1, "room-dup", USER_A.copied(), false).await?;assert!(created.is_none());@@ -536,7 +536,7 @@ async fn archive_adopts_legacy_view_grant_and_leaves_other_levels(// An older archive (or `shareWithTeam` edit) already wrote the View row.let adopted = Uuid::now_v7();- repo.create_call(&adopted, &CH2, "adopted", USER_A.copied())+ repo.create_call(&adopted, &CH2, "adopted", USER_A.copied(), false).await?.expect("call created");insert_legacy_team_row(&pool, adopted, AccessLevel::View).await?;diff --git a/crates/call/src/outbound/pg_call_repo/test.rs b/crates/call/src/outbound/pg_call_repo/test.rsindex 7a8be5d39c..39587306f7 100644--- a/crates/call/src/outbound/pg_call_repo/test.rs+++ b/crates/call/src/outbound/pg_call_repo/test.rs@@ -146,6 +146,44 @@ pub(super) async fn insert_user_mapping(// -- create_call --------------------------------------------------------------+#[sqlx::test(+ fixtures(path = "../../../fixtures", scripts("call_repo")),+ migrator = "MACRO_DB_MIGRATIONS"+)]+async fn a_calls_discussion_is_stored_with_it_and_outlives_archival(+ pool: Pool<Postgres>,+) -> anyhow::Result<()> {+ let repo = repo(pool.clone());+ let threaded = Uuid::now_v7();+ repo.create_call(&threaded, &CH2, "room-ch2", USER_B.deref().copied(), true)+ .await?+ .expect("should create new call");++ let live = repo.get_call_record_by_call_id(&threaded).await?.unwrap();+ assert_eq!(+ live.discussion,+ crate::domain::models::CallDiscussion::ChannelThread {+ channel_id: CH2,+ root_id: threaded,+ }+ );++ let archived = repo.archive_call(&threaded).await?;+ assert!(archived.channel_thread);+ let record = repo.get_call_record_by_call_id(&threaded).await?.unwrap();+ assert_eq!(record.discussion, live.discussion);++ let existing = repo+ .get_call_record_by_call_id(&CALL1)+ .await?+ .expect("the fixture call exists");+ assert_eq!(+ existing.discussion,+ crate::domain::models::CallDiscussion::CallChat { call_id: CALL1 }+ );+ Ok(())+}+#[sqlx::test(fixtures(path = "../../../fixtures", scripts("call_repo")),migrator = "MACRO_DB_MIGRATIONS"@@ -154,7 +192,7 @@ async fn create_call_returns_call(pool: Pool<Postgres>) -> anyhow::Result<()> {let repo = repo(pool.clone());let id = Uuid::now_v7();let call = repo- .create_call(&id, &CH2, "room-ch2", USER_B.deref().copied())+ .create_call(&id, &CH2, "room-ch2", USER_B.deref().copied(), false).await?.expect("should create new call");@@ -199,7 +237,13 @@ async fn create_call_returns_none_on_duplicate_channel(pool: Pool<Postgres>) ->let repo = repo(pool);// CH1 already has an active call from the fixture.let result = repo- .create_call(&Uuid::now_v7(), &CH1, "room-dup", USER_A.deref().copied())+ .create_call(+ &Uuid::now_v7(),+ &CH1,+ "room-dup",+ USER_A.deref().copied(),+ false,+ ).await?;assert!(result.is_none(), "should return None on conflict");@@ -501,7 +545,7 @@ async fn add_participant_rejects_user_already_active_in_other_call(let repo = repo(pool);// Seed a second active call in ch2 (the fixture leaves ch2 empty).- repo.create_call(&CALL2, &CH2, "room-ch2", USER_C.deref().copied())+ repo.create_call(&CALL2, &CH2, "room-ch2", USER_C.deref().copied(), false).await?.expect("should create call2 in ch2");@@ -549,7 +593,7 @@ async fn add_participant_allows_join_other_call_after_leave() -> anyhow::Result<()> {let repo = repo(pool);- repo.create_call(&CALL2, &CH2, "room-ch2", USER_C.deref().copied())+ repo.create_call(&CALL2, &CH2, "room-ch2", USER_C.deref().copied(), false).await?.expect("should create call2 in ch2");diff --git a/crates/channel_bots/src/domain/test.rs b/crates/channel_bots/src/domain/test.rsindex a2ebcd1757..5a4850b931 100644--- a/crates/channel_bots/src/domain/test.rs+++ b/crates/channel_bots/src/domain/test.rs@@ -60,6 +60,7 @@ pub(super) fn parent() -> MessageParent {}pub(crate) fn message(id: u128, thread: Option<Uuid>, body: &str) -> Message {Message {+ kind: messages::domain::models::MessageKind::Message,id: Uuid::from_u128(id),parent: parent(),thread_id: thread,diff --git a/crates/channels/src/domain/message_delivery.rs b/crates/channels/src/domain/message_delivery.rsindex 3e0e795a7d..e470f00df0 100644--- a/crates/channels/src/domain/message_delivery.rs+++ b/crates/channels/src/domain/message_delivery.rs@@ -376,6 +376,11 @@ whereside_effect_error = Some(repo_error(error));}}+ if matches!(event.change, MessageChange::CallRootPosted { .. })+ && let Err(error) = self.repo.touch_channel_updated_at(channel_id).await+ {+ side_effect_error = Some(repo_error(error));+ }// Notifications derive from a post, or from an edit that must notify like one.let posted = match &event.change {MessageChange::Posted {@@ -434,6 +439,7 @@ whereMessageChange::Edited { .. }| MessageChange::MessageDeleted { .. }| MessageChange::Typing { .. }+ | MessageChange::CallRootPosted { .. }| MessageChange::ThreadUpdated { .. } => None,};if let Some((message, mentions, notification_policy)) = posted {diff --git a/crates/channels/src/domain/message_delivery/test.rs b/crates/channels/src/domain/message_delivery/test.rsindex 5d72ddcfe7..c533b16226 100644--- a/crates/channels/src/domain/message_delivery/test.rs+++ b/crates/channels/src/domain/message_delivery/test.rs@@ -178,6 +178,7 @@ fn repo() -> MockChannelRepo {fn message() -> Message {Message {+ kind: messages::domain::models::MessageKind::Message,id: Uuid::from_u128(1),parent: MessageParent::Channel(CHANNEL),thread_id: None,diff --git a/crates/channels/src/domain/side_effects.rs b/crates/channels/src/domain/side_effects.rsindex e2ec60d756..b70342b537 100644--- a/crates/channels/src/domain/side_effects.rs+++ b/crates/channels/src/domain/side_effects.rs@@ -135,6 +135,10 @@ pub struct ThreadNotificationContext {pub participants: Vec<MacroUserIdStr<'static>>,/// Sender of the thread parent message.pub parent_sender_id: Option<MacroUserIdStr<'static>>,+ /// People connected to the call, when the thread belongs to a live call.+ /// They read it in the call, so its notifications are dropped for them.+ /// They stay followers, and later replies reach them once they leave.+ pub connected_call_participants: Vec<MacroUserIdStr<'static>>,}/// Notification requested by the channel domain.@@ -696,6 +700,12 @@ where.map(|user_id| user_id.as_ref().to_string()).into_iter().chain(user_mentions.iter().cloned())+ .chain(+ thread_context+ .connected_call_participants+ .iter()+ .map(|user_id| user_id.as_ref().to_string()),+ ).collect::<Vec<_>>();let recipients_without_sender = recipients_excluding(participants@@ -786,7 +796,12 @@ where},recipient_ids: recipients_excluding(context.user_mentions.iter().map(String::as_str),- context.sender.as_user().map(|user_id| user_id.as_ref()),+ context+ .sender+ .as_user()+ .map(|user_id| user_id.as_ref())+ .into_iter()+ .chain(context.connected_in_thread()),).collect(),})@@ -816,7 +831,12 @@ where.participants.iter().map(|participant| participant.as_ref()),- context.sender.as_user().map(|user_id| user_id.as_ref()),+ context+ .sender+ .as_user()+ .map(|user_id| user_id.as_ref())+ .into_iter()+ .chain(context.connected_in_thread()),).collect(),None => context.recipients_without_sender.clone(),@@ -1038,6 +1058,16 @@ struct PostedMessageNotificationContext {is_first_top_level_message: bool,}+impl PostedMessageNotificationContext {+ /// Who the thread's call is showing this message to already.+ fn connected_in_thread(&self) -> impl Iterator<Item = &str> {+ self.thread_context+ .connected_call_participants+ .iter()+ .map(|user_id| user_id.as_ref())+ }+}+/// Whether a participant principal id refers to a bot (e.g. `bot|<uuid>`)./// Bots are not user recipients and are not valid `MacroUserIdStr`s, so they are/// skipped before parsing to avoid spurious parse warnings.diff --git a/crates/channels/src/domain/side_effects/test.rs b/crates/channels/src/domain/side_effects/test.rsindex b57672353b..c493dbdd85 100644--- a/crates/channels/src/domain/side_effects/test.rs+++ b/crates/channels/src/domain/side_effects/test.rs@@ -740,6 +740,7 @@ async fn bot_thread_reply_sends_reply_notification() {let service = ChannelSideEffectService::new(FakeContext {thread_context: ThreadNotificationContext {+ connected_call_participants: vec![],participants: vec![recipient.clone(), parent_sender.clone()],parent_sender_id: Some(parent_sender.clone()),},@@ -781,6 +782,99 @@ async fn bot_thread_reply_sends_reply_notification() {assert!(recipient_ids.contains(&parent_sender));}+#[tokio::test]+async fn people_connected_to_the_threads_call_get_no_reply_notification() {+ let channel_id = Uuid::new_v4();+ let connected = user("[email protected]");+ let away = user("[email protected]");+ let notifications = FakeNotifications::default();+ let service = ChannelSideEffectService::new(+ FakeContext {+ thread_context: ThreadNotificationContext {+ connected_call_participants: vec![connected.clone()],+ participants: vec![connected.clone(), away.clone()],+ parent_sender_id: None,+ },+ ..FakeContext::default()+ },+ FakeRealtime::default(),+ notifications.clone(),+ FakeContacts::default(),+ );++ service+ .handle(bot_message_posted_event(+ channel_id,+ Uuid::new_v4(),+ Some(Uuid::new_v4()),+ &[connected.as_ref(), away.as_ref()],+ ))+ .await;++ let notification_effects = notifications.effects.lock().unwrap();+ let ChannelNotificationEffect::Reply { recipient_ids, .. } = ¬ification_effects[0] else {+ panic!("expected a reply notification");+ };+ assert_eq!(recipient_ids, &HashSet::from([away]));+}++#[tokio::test]+async fn a_mention_of_someone_connected_to_the_threads_call_is_dropped() {+ let channel_id = Uuid::new_v4();+ let now = Utc::now();+ let sender = user("[email protected]");+ let connected = user("[email protected]");+ let away = user("[email protected]");+ let notifications = FakeNotifications::default();+ let service = ChannelSideEffectService::new(+ FakeContext {+ thread_context: ThreadNotificationContext {+ connected_call_participants: vec![connected.clone()],+ participants: vec![sender.clone()],+ parent_sender_id: None,+ },+ ..FakeContext::default()+ },+ FakeRealtime::default(),+ notifications.clone(),+ FakeContacts::default(),+ );++ service+ .handle(ChannelEvent::MessagePosted {+ channel_id,+ metadata: ChannelMetadata {+ channel_type: ChannelType::Private,+ channel_name: "Product".to_string(),+ },+ participants: vec![],+ message: MutatedMessage {+ id: Uuid::new_v4(),+ channel_id,+ thread_id: Some(Uuid::new_v4()),+ sender_id: Sender::new_from_user(sender),+ triggered_by: None,+ triggered_via: None,+ content: "look at this".to_string(),+ created_at: now,+ updated_at: now,+ edited_at: None,+ deleted_at: None,+ },+ mentions: vec![SimpleMention::user(&connected), SimpleMention::user(&away)],+ has_attachments: false,+ notification_policy: PostMessageNotificationPolicy::MentionsOnly,+ })+ .await;++ let notification_effects = notifications.effects.lock().unwrap();+ let ChannelNotificationEffect::UserMention { recipient_ids, .. } = ¬ification_effects[0]+ else {+ panic!("expected a mention notification");+ };+ assert_eq!(recipient_ids, &HashSet::from([away]));+}+#[tokio::test]async fn bot_participant_is_never_a_notification_recipient() {let channel_id = Uuid::new_v4();@@ -928,6 +1022,7 @@ async fn document_mentions_in_a_reply_notify_only_thread_participants() {sub_type: None,}],thread_context: ThreadNotificationContext {+ connected_call_participants: vec![],participants: vec![sender.clone(), participant.clone()],parent_sender_id: Some(participant.clone()),},diff --git a/crates/channels/src/inbound/toolset/test.rs b/crates/channels/src/inbound/toolset/test.rsindex 3a0b1f2e64..1232e93718 100644--- a/crates/channels/src/inbound/toolset/test.rs+++ b/crates/channels/src/inbound/toolset/test.rs@@ -80,6 +80,7 @@ impl RecordingMessages {reactions: Vec<messages::domain::models::CountedReaction>,) -> messages::domain::models::Message {messages::domain::models::Message {+ kind: messages::domain::models::MessageKind::Message,id,parent: messages::domain::models::MessageParent::parse("channel", channel_id).unwrap(),thread_id: None,@@ -149,6 +150,7 @@ impl messages::domain::api::MessageCommands for RecordingMessages {_ => Sender::new_from_user(user_id()),};let message = messages::domain::models::Message {+ kind: messages::domain::models::MessageKind::Message,id: Uuid::new_v4(),parent,thread_id: input.thread_id,diff --git a/crates/channels/src/inbound/toolset/types/test.rs b/crates/channels/src/inbound/toolset/types/test.rsindex 4400564479..934daf2ba3 100644--- a/crates/channels/src/inbound/toolset/types/test.rs+++ b/crates/channels/src/inbound/toolset/types/test.rs@@ -6,6 +6,7 @@ fn dt(seconds: i64) -> DateTime<Utc> {fn reply(seconds: i64) -> Message {Message {+ kind: messages::domain::models::MessageKind::Message,id: Uuid::new_v4(),parent: messages::domain::models::MessageParent::Channel(Uuid::nil()),thread_id: Some(Uuid::from_u128(1)),diff --git a/crates/channels/src/outbound/pg_channels_repo.rs b/crates/channels/src/outbound/pg_channels_repo.rsindex 0a91c38388..386fc98af9 100644--- a/crates/channels/src/outbound/pg_channels_repo.rs+++ b/crates/channels/src/outbound/pg_channels_repo.rs@@ -228,6 +228,7 @@ async fn get_channel_participants_for_thread_id(ON m.parent_entity_type = 'channel' AND m.parent_entity_id = cp.channel_id::text AND cp.user_id = m.sender_idWHERE (m.id = $1 OR m.thread_id = $1)AND m.deleted_at IS NULL+ AND m.kind = 'message'AND cp.left_at IS NULLUNIONSELECT em.entity_id AS id@@ -941,16 +942,19 @@ fn push_channel_thread_participant_filter_expr(}/// Whether `participant` sent or is @-mentioned in the message aliased `message`.+/// Starting a call doesn't count as sending: a call's root stands for the call.#[cfg(feature = "list")]fn push_channel_message_participation_expr(builder: &mut QueryBuilder<'static, Postgres>,message: &'static str,participant: &str,) {- builder.push(format!("({message}.sender_id = "));+ builder.push(format!(+ "(({message}.kind = 'message' AND {message}.sender_id = "+ ));builder.push_bind(participant.to_owned());builder.push(format!(- r#"+ r#")OR EXISTS (SELECT 1FROM comms_entity_mentions emdiff --git a/crates/channels/src/outbound/pg_side_effect_context.rs b/crates/channels/src/outbound/pg_side_effect_context.rsindex c981d18090..8321656884 100644--- a/crates/channels/src/outbound/pg_side_effect_context.rs+++ b/crates/channels/src/outbound/pg_side_effect_context.rs@@ -124,10 +124,22 @@ impl ChannelSideEffectContext for PgChannelSideEffectContext {.ok().map(|id| id.into_owned())});+ // Failing to read this must notify people rather than lose it for them.+ let connected_call_participants = get_connected_call_participants(&self.pool, thread_id)+ .await+ .inspect_err(|error| {+ tracing::warn!(+ error = ?error,+ %thread_id,+ "failed to read who is connected to the thread's call"+ );+ })+ .unwrap_or_default();Ok(ThreadNotificationContext {participants,parent_sender_id,+ connected_call_participants,})}@@ -197,7 +209,7 @@ async fn get_message_owner(pool: &PgPool, message_id: Uuid) -> anyhow::Result<Str#"SELECT sender_idFROM comms_messages- WHERE id = $1+ WHERE id = $1 AND kind = 'message'ORDER BY created_at ASC"#,message_id,@@ -214,6 +226,7 @@ async fn get_channel_message_count(pool: &PgPool, channel_id: Uuid) -> anyhow::RSELECT COUNT(id) AS "count!"FROM comms_messagesWHERE parent_entity_type = 'channel' AND parent_entity_id = $1::uuid::text+ AND kind = 'message'"#,channel_id,)@@ -222,6 +235,32 @@ async fn get_channel_message_count(pool: &PgPool, channel_id: Uuid) -> anyhow::ROk(count)}+async fn get_connected_call_participants(+ pool: &PgPool,+ thread_id: Uuid,+) -> anyhow::Result<Vec<MacroUserIdStr<'static>>> {+ let rows = sqlx::query_as!(+ UserIdRow,+ r#"+ SELECT cp.user_id AS "user_id!"+ FROM comms_messages root+ JOIN call_participants cp ON cp.call_id = root.id+ WHERE root.id = $1 AND root.kind = 'call_root' AND cp.left_at IS NULL+ "#,+ thread_id,+ )+ .fetch_all(pool)+ .await?;+ Ok(rows+ .into_iter()+ .filter_map(|row| {+ MacroUserIdStr::parse_from_str(&row.user_id)+ .ok()+ .map(MacroUserIdStr::into_owned)+ })+ .collect())+}+async fn get_channel_participants_for_thread_id(pool: &PgPool,thread_id: Uuid,@@ -236,6 +275,7 @@ async fn get_channel_participants_for_thread_id(ON m.parent_entity_type = 'channel' AND m.parent_entity_id = cp.channel_id::text AND cp.user_id = m.sender_idWHERE (m.id = $1 OR m.thread_id = $1)AND m.deleted_at IS NULL+ AND m.kind = 'message'AND cp.left_at IS NULLUNIONSELECT em.entity_id AS iddiff --git a/crates/crm/src/inbound/call_archived/test.rs b/crates/crm/src/inbound/call_archived/test.rsindex 846f9880ed..3bbae0d8fc 100644--- a/crates/crm/src/inbound/call_archived/test.rs+++ b/crates/crm/src/inbound/call_archived/test.rs@@ -102,6 +102,7 @@ fn consumer(fn archived() -> CallTopicEvent {CallTopicEvent::RecordArchived(CallRecordArchivedMetadata {+ channel_thread: false,call_id: CALL_RECORD_ID,channel_id: None,created_by: MacroUserIdStr::try_from_email("[email protected]").unwrap(),diff --git a/crates/crm/src/outbound/lookup/test/message_store.rs b/crates/crm/src/outbound/lookup/test/message_store.rsindex ba1c0617e7..36db615306 100644--- a/crates/crm/src/outbound/lookup/test/message_store.rs+++ b/crates/crm/src/outbound/lookup/test/message_store.rs@@ -224,6 +224,7 @@ async fn crm_discussion_lifecycle_cascades_on_company_deletion(pool: PgPool) {&& !residual.mentions);let late = CreateMessage {+ kind: messages::domain::models::MessageKind::Message,guest_name: None,canonical_root_id: None,parent: company,diff --git a/crates/documents/src/domain/comments/test.rs b/crates/documents/src/domain/comments/test.rsindex f6ba76686f..e6b0fe453a 100644--- a/crates/documents/src/domain/comments/test.rs+++ b/crates/documents/src/domain/comments/test.rs@@ -44,6 +44,7 @@ fn id(n: u128) -> Uuid {fn message(n: u128, root: Option<u128>, content: &str) -> Message {Message {+ kind: messages::domain::models::MessageKind::Message,id: id(n),parent: MessageParent::parse("document", DOCUMENT).unwrap(),thread_id: root.map(id),diff --git a/crates/documents/src/inbound/toolset/comment_test.rs b/crates/documents/src/inbound/toolset/comment_test.rsindex 8fa67cd6de..e6aba5b500 100644--- a/crates/documents/src/inbound/toolset/comment_test.rs+++ b/crates/documents/src/inbound/toolset/comment_test.rs@@ -110,6 +110,7 @@ impl MessageCommands for FakeMessages {}let at = Utc.with_ymd_and_hms(2026, 9, 23, 12, 0, 0).unwrap();let message = Message {+ kind: messages::domain::models::MessageKind::Message,id: Uuid::from_u128(99),parent: MessageParent::parse("document", &access.entity().entity_id).unwrap(),thread_id: input.thread_id,diff --git a/crates/macro_db_client/migrations/20261105170000_call_channel_threads.sql b/crates/macro_db_client/migrations/20261105170000_call_channel_threads.sqlnew file mode 100644index 0000000000..b80694cfc3--- /dev/null+++ b/crates/macro_db_client/migrations/20261105170000_call_channel_threads.sql@@ -0,0 +1,16 @@+-- A channel call's discussion is either its own thread on the call parent or a+-- thread in its channel, decided once when the call is created. Existing calls+-- keep their own thread and are not migrated.+-- Defer validation until this DDL transaction releases its stronger locks.+SET LOCAL lock_timeout = '5s';++ALTER TABLE call_entities+ ADD COLUMN discussion TEXT NOT NULL DEFAULT 'call_chat',+ ADD CONSTRAINT call_entities_discussion_check+ CHECK (discussion IN ('call_chat', 'channel_thread')) NOT VALID;++-- A call root is the message a channel thread hangs from; its row is the call.+ALTER TABLE comms_messages+ ADD COLUMN kind TEXT NOT NULL DEFAULT 'message',+ ADD CONSTRAINT comms_messages_kind_check+ CHECK (kind IN ('message', 'call_root')) NOT VALID;diff --git a/crates/macro_db_client/migrations/20261105170100_validate_call_channel_threads.sql b/crates/macro_db_client/migrations/20261105170100_validate_call_channel_threads.sqlnew file mode 100644index 0000000000..5043a75e2c--- /dev/null+++ b/crates/macro_db_client/migrations/20261105170100_validate_call_channel_threads.sql@@ -0,0 +1,2 @@+ALTER TABLE call_entities VALIDATE CONSTRAINT call_entities_discussion_check;+ALTER TABLE comms_messages VALIDATE CONSTRAINT comms_messages_kind_check;diff --git a/crates/macro_db_client/src/annotations/create_anchor/test.rs b/crates/macro_db_client/src/annotations/create_anchor/test.rsindex 01e578c38d..9d723d774b 100644--- a/crates/macro_db_client/src/annotations/create_anchor/test.rs+++ b/crates/macro_db_client/src/annotations/create_anchor/test.rs@@ -28,6 +28,7 @@ async fn standalone_highlight_remains_unthreaded_until_a_message_attaches_it(poolet repo = messages::outbound::pg_message_repo::PgMessageRepository::new(pool.clone());let root = repo.create(CreateMessage {+ kind: messages::domain::models::MessageKind::Message,guest_name: None,canonical_root_id: None,parent: MessageParent::parse("document", "document-with-comments").unwrap(),diff --git a/crates/messages/AGENTS.md b/crates/messages/AGENTS.mdindex 29a9117b5a..12775e9c57 100644--- a/crates/messages/AGENTS.md+++ b/crates/messages/AGENTS.md@@ -76,6 +76,8 @@ grant users another agent invocation's edit, deletion, or reaction authority.## Gotchas+- `MessageKind::CallRoot` messages stand for a channel call. Only `ensure_call_root` creates them, and+ they announce themselves with `MessageChange::CallRootPosted`, which reaches viewers and nothing else.- Most modules are feature-gated (`ai_tools`, `annotations`, `broker`,`delivery`, `inbound`, `outbound`, `ports`, `schema`); a caller enabling the wrongcombination gets a missing-module compile error, not a runtime one — checkdiff --git a/crates/messages/src/domain/api.rs b/crates/messages/src/domain/api.rsindex a046b4b142..15212adc2b 100644--- a/crates/messages/src/domain/api.rs+++ b/crates/messages/src/domain/api.rs@@ -189,6 +189,22 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageReader for MessageSe}}+/// Creates a channel call's thread root, for the call domain.+#[async_trait::async_trait]+pub trait CallRootPoster: Send + Sync + 'static {+ /// Create the root once, however often it is asked for.+ async fn ensure_call_root(&self, call_id: Uuid) -> Result<(), MessageError>;+}++#[async_trait::async_trait]+impl<R: MessageRepository, E: MessageEventPublisher> CallRootPoster for MessageService<R, E> {+ async fn ensure_call_root(&self, call_id: Uuid) -> Result<(), MessageError> {+ MessageService::ensure_call_root(self, call_id)+ .await+ .map(drop)+ }+}+#[async_trait::async_trait]impl<R: MessageRepository, E: MessageEventPublisher> MessageCommands for MessageService<R, E> {async fn post(diff --git a/crates/messages/src/domain/delivery/test.rs b/crates/messages/src/domain/delivery/test.rsindex b743ba2685..70d526115b 100644--- a/crates/messages/src/domain/delivery/test.rs+++ b/crates/messages/src/domain/delivery/test.rs@@ -71,6 +71,7 @@ fn event() -> MessageEvent {let actor = "macro|[email protected]".to_owned();let parent = MessageParent::parse("document", "legacy-document").unwrap();let message = Message {+ kind: MessageKind::Message,id: Uuid::from_u128(3),parent: parent.clone(),thread_id: Some(Uuid::from_u128(2)),diff --git a/crates/messages/src/domain/models.rs b/crates/messages/src/domain/models.rsindex 9ad3d0f23f..f7816a0de1 100644--- a/crates/messages/src/domain/models.rs+++ b/crates/messages/src/domain/models.rs@@ -432,6 +432,20 @@ impl std::fmt::Display for SimpleMention {}}+/// What a persisted message is. Set by the server, never by a client.+#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]+#[serde(rename_all = "snake_case")]+pub enum MessageKind {+ /// Something someone wrote.+ #[default]+ Message,+ /// The root of a channel call's thread. Its id is the call id, and it+ /// stands for the call rather than for anything the caller said.+ CallRoot,+}+/// Shared message representation for channel timelines and entity discussions.#[derive(Debug, Clone, Serialize, Deserialize)]#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]@@ -443,6 +457,9 @@ pub struct Message {pub parent: MessageParent,/// Root message UUID for replies; absent on roots.pub thread_id: Option<Uuid>,+ /// What this message is.+ #[serde(default)]+ pub kind: MessageKind,/// Authenticated actor or owner of imported content.#[cfg_attr(feature = "schema", schema(value_type = String))]#[cfg_attr(feature = "json-schema", schemars(with = "String"))]diff --git a/crates/messages/src/domain/ports.rs b/crates/messages/src/domain/ports.rsindex a05d2c7c92..575b36d093 100644--- a/crates/messages/src/domain/ports.rs+++ b/crates/messages/src/domain/ports.rs@@ -3,6 +3,7 @@ use activity::{ActionTag, domain::timeline::TimelineSelection};use channel_sender::ChannelSender;use chrono::{DateTime, Utc};use serde::{Deserialize, Serialize};+use std::collections::HashMap;use uuid::Uuid;#[cfg(test)]@@ -106,13 +107,49 @@ pub enum MessageTimelineEntry {/// The recorded activity.activity: activity::domain::timeline::TimelineActivity,},+ /// A channel call and its thread. The root message's id is the call id.+ Call {+ /// The call's root message, its thread state and its reply preview.+ message: Box<MessageListItem>,+ /// Where the call is in its life.+ status: CallEntryStatus,+ },+}++/// A channel call's life, as its timeline row shows it.+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]+#[serde(tag = "state", rename_all = "snake_case")]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+pub enum CallEntryStatus {+ /// The call has not ended.+ Live,+ /// The call ended.+ Ended {+ /// When it ended.+ ended_at: DateTime<Utc>,+ /// How long it lasted.+ duration_ms: i64,+ },+ /// The call's record was deleted; its discussion stays in the channel.+ RecordDeleted,+}++/// What a channel call's record says about the thread that belongs to it.+#[derive(Debug, Clone, PartialEq, Eq)]+pub struct CallThreadFacts {+ /// Channel holding the thread.+ pub channel_id: Uuid,+ /// The caller, who is the root's sender.+ pub created_by: String,}impl MessageTimelineEntry {/// Position on the `(timestamp, id)` keyset shared by both kinds.pub fn position(&self) -> (DateTime<Utc>, Uuid) {match self {- Self::Message { message } => (message.message.created_at, message.message.id),+ Self::Message { message } | Self::Call { message, .. } => {+ (message.message.created_at, message.message.id)+ }Self::Activity { activity } => (activity.occurred_at, activity.id),}}@@ -165,6 +202,9 @@ pub struct CreateMessage {pub actor: ChannelSender<'static>,/// Server-verified guest display name; absent for account authors.pub guest_name: Option<String>,+ /// What this message is. Only the server's call root path sets anything+ /// other than [`MessageKind::Message`].+ pub kind: MessageKind,/// User who triggered a bot message, if applicable.pub triggered_by: Option<String>,/// Label of the client the user triggered it through, if any.@@ -282,6 +322,13 @@ pub enum MessageChange {/// Whether the reaction was added (`true`) or removed (`false`).added: bool,},+ /// A channel call's thread root was created. It stands for the call, so it+ /// reaches viewers and moves the channel up without any of what a post+ /// causes: no notifications, agents, routines, webhooks or search documents.+ CallRootPosted {+ /// Persisted root.+ message: Message,+ },/// Thread resolution, placement, or deletion changed.ThreadUpdated {/// Persisted thread state.@@ -371,6 +418,16 @@ pub trait MessageRepository: Send + Sync + 'static {&self,parent: &MessageParent,) -> impl Future<Output = Result<bool, MessageError>> + Send;+ /// The channel thread a call owns, when its discussion is one.+ fn call_thread_facts(+ &self,+ call_id: Uuid,+ ) -> impl Future<Output = Result<Option<CallThreadFacts>, MessageError>> + Send;+ /// Each call's life, for those whose record still exists.+ fn call_entry_statuses(+ &self,+ call_ids: &[Uuid],+ ) -> impl Future<Output = Result<HashMap<Uuid, CallEntryStatus>, MessageError>> + Send;/// File type of a live document, for document-specific anchor validation.fn document_file_type(&self,diff --git a/crates/messages/src/domain/service.rs b/crates/messages/src/domain/service.rsindex 9e6e35e4c4..31776bb7aa 100644--- a/crates/messages/src/domain/service.rs+++ b/crates/messages/src/domain/service.rs@@ -126,7 +126,8 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {"activity timelines cannot be combined with message filters",));}- self.activity_timeline(&parent, source, query).await+ let page = self.activity_timeline(&parent, source, query).await?;+ self.with_call_entries(page).await}.await.inspect_err(log_read_error)@@ -378,11 +379,19 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {"call messages belong to the call thread",));}++ // A stale client must not write to a chat nobody will see.+ if self.repo.call_thread_facts(call_id).await?.is_some() {+ return Err(MessageError::Invalid(+ "this call's discussion is in its channel",+ ));+ }+Some(call_id)}_ => {if let Some(root) = input.thread_id {- self.active_thread(&parent, root).await?;+ self.active_thread_or_call_root(&parent, root).await?;}None}@@ -397,6 +406,7 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {parent: parent.clone(),actor: actor.clone(),guest_name: None,+ kind: MessageKind::Message,triggered_by: access.acting_user_id().filter(|_| actor.as_bot().is_some() && input.attribution.has_acting_user())@@ -426,6 +436,72 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {Ok(message)}+ /// Create a channel call's thread root once, however often it is asked for.+ ///+ /// Takes no receipt because nothing here is the caller's to choose: the+ /// channel, sender and text all come from the call's own record, which only+ /// the call domain writes after checking channel access.+ #[tracing::instrument(err, skip(self), name = "call.discussion.create_root")]+ pub async fn ensure_call_root(&self, call_id: Uuid) -> Result<Message, MessageError> {+ let facts = self+ .repo+ .call_thread_facts(call_id)+ .await?+ .ok_or(MessageError::NotFound)?;+ let parent = MessageParent::Channel(facts.channel_id);+ if let Some(root) = self.repo.get(&parent, call_id).await? {+ return Ok(root);+ }++ let actor = ChannelSender::try_from(facts.created_by)+ .map_err(|_| MessageError::Invalid("the call has an invalid creator"))?;+ let created = self+ .repo+ .create(CreateMessage {+ canonical_root_id: None,+ parent: parent.clone(),+ actor: actor.clone(),+ guest_name: None,+ kind: MessageKind::CallRoot,+ triggered_by: None,+ triggered_via: None,+ input: PostMessage {+ attribution: MessageAttribution::default(),+ notification_policy: PostMessageNotificationPolicy::Silent,+ id: Some(call_id),+ content: CALL_ROOT_TEXT.to_owned(),+ thread_id: None,+ anchor: None,+ mentions: vec![],+ attachments: vec![],+ nonce: None,+ },+ })+ .await;+ let message = match created {+ // The other request created it and delivers it.+ Err(MessageError::Conflict) => {+ return self+ .repo+ .get(&parent, call_id)+ .await?+ .ok_or(MessageError::Conflict);+ }+ result => result?,+ };++ self.publish(MessageEvent {+ parent,+ actor: actor.as_ref().to_owned(),+ nonce: None,+ change: MessageChange::CallRootPosted {+ message: message.clone(),+ },+ })+ .await;+ Ok(message)+ }+/// Apply partial updates without requiring callers to reconstruct a message.#[tracing::instrument(err, skip(self, access, patch))]pub async fn patch(@@ -438,6 +514,7 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {let actor = actor_from_receipt(&access, &parent)?;self.ensure_parent(&parent).await?;let current = self.active_message(&parent, id, false).await?;+ reject_call_root(¤t)?;if current.sender_id != actor&& !(matches!(parent, MessageParent::Channel(_))&& can_moderate(access.entity_permission()))@@ -537,6 +614,7 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {let actor = actor_from_receipt(&access, &parent)?;self.ensure_parent(&parent).await?;let current = self.active_message(&parent, id, false).await?;+ reject_call_root(¤t)?;// A comment's replies and its place in the document belong to the comment,// not to its first message, so the root carries the whole discussion with// it. Channel roots are one message in a conversation that continues@@ -581,7 +659,8 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {let parent = parent_from_receipt(&access)?;let actor = actor_from_receipt(&access, &parent)?;self.ensure_parent(&parent).await?;- self.active_message(&parent, id, false).await?;+ let current = self.active_message(&parent, id, false).await?;+ reject_call_root(¤t)?;if emoji.is_empty() || emoji.chars().count() > 32 || emoji.chars().any(char::is_control) {return Err(MessageError::Invalid("invalid reaction"));}@@ -890,6 +969,29 @@ impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {Ok(thread)}+ /// A reply's root, creating a call's root first if posting it failed when+ /// the call started.+ async fn active_thread_or_call_root(+ &self,+ parent: &MessageParent,+ root: Uuid,+ ) -> Result<ThreadState, MessageError> {+ match self.active_thread(parent, root).await {+ Err(MessageError::NotFound) => {+ let facts = self.repo.call_thread_facts(root).await?;+ let in_this_channel =+ facts.is_some_and(|facts| MessageParent::Channel(facts.channel_id) == *parent);+ if !in_this_channel {+ return Err(MessageError::NotFound);+ }++ self.ensure_call_root(root).await?;+ self.active_thread(parent, root).await+ }+ result => result,+ }+ }+async fn active_message(&self,parent: &MessageParent,@@ -974,6 +1076,15 @@ fn parent_from_receipt<P: RequiredPermission>(.map_err(|_| MessageError::Invalid("invalid message parent"))}+/// A call's root stands for the call, so nobody can change it, its author+/// included. People talk about the call in its thread.+fn reject_call_root(message: &Message) -> Result<(), MessageError> {+ if message.kind == MessageKind::CallRoot {+ return Err(MessageError::Forbidden);+ }+ Ok(())+}+fn actor_from_receipt<P: RequiredPermission>(access: &EntityAccessReceipt<P>,_parent: &MessageParent,@@ -1041,6 +1152,10 @@ fn validate_post(parent: &MessageParent, input: &PostMessage) -> Result<(), Mess/// Longest page or layer id a design anchor may carry. Figma ids are short/// (`12:34`, or a `;`-joined path for a layer inside nested instances).+/// What a call's root says to anything that reads it as a plain message: search+/// results, notification previews, agents and the channel list.+const CALL_ROOT_TEXT: &str = "started a call";+const FIG_ANCHOR_ID_LIMIT: usize = 512;/// The document file type an anchor kind belongs to, with the error for anydiff --git a/crates/messages/src/domain/service/guest_chat.rs b/crates/messages/src/domain/service/guest_chat.rsindex c33e6e9298..51fcfce8bd 100644--- a/crates/messages/src/domain/service/guest_chat.rs+++ b/crates/messages/src/domain/service/guest_chat.rs@@ -162,6 +162,7 @@ impl<R: MessageRepository, E: MessageEventPublisher> GuestChatApi for GuestChatSparent: parent.clone(),actor: actor.clone(),guest_name: Some(access.name),+ kind: MessageKind::Message,triggered_via: None,triggered_by: None,input: PostMessage {diff --git a/crates/messages/src/domain/service/test.rs b/crates/messages/src/domain/service/test.rsindex 6fc3ae4cf3..a71de7ae03 100644--- a/crates/messages/src/domain/service/test.rs+++ b/crates/messages/src/domain/service/test.rs@@ -1,9 +1,11 @@use super::*;use chrono::Utc;use entity_access::domain::models::{AccessLevel, EntityAccessAuth};+use std::collections::HashMap;use std::sync::{Arc, Mutex};mod call_retries;+mod call_roots;mod event_posts;mod guest_chat;mod initiative;@@ -21,6 +23,8 @@ struct Repo {file_type: Option<String>,concurrent_create: bool,client_message_id: Option<Uuid>,+ call_thread: Option<CallThreadFacts>,+ call_statuses: HashMap<Uuid, CallEntryStatus>,}impl Repo {@@ -32,6 +36,17 @@ impl Repo {}impl MessageRepository for Repo {+ async fn call_thread_facts(&self, _: Uuid) -> Result<Option<CallThreadFacts>, MessageError> {+ Ok(self.call_thread.clone())+ }++ async fn call_entry_statuses(+ &self,+ _: &[Uuid],+ ) -> Result<HashMap<Uuid, CallEntryStatus>, MessageError> {+ Ok(self.call_statuses.clone())+ }+async fn document_file_type(&self, _: &str) -> Result<Option<String>, MessageError> {Ok(self.file_type.clone())}@@ -244,6 +259,7 @@ fn fixture() -> Repo {let user = "macro|[email protected]";Repo {message: Message {+ kind: MessageKind::Message,id,parent: MessageParent::parse("document", "doc").unwrap(),thread_id: None,@@ -285,6 +301,8 @@ fn fixture() -> Repo {file_type: Some("md".into()),concurrent_create: false,client_message_id: None,+ call_thread: None,+ call_statuses: HashMap::new(),}}@@ -1313,6 +1331,17 @@ struct StrictRepo {}impl MessageRepository for StrictRepo {+ async fn call_thread_facts(&self, id: Uuid) -> Result<Option<CallThreadFacts>, MessageError> {+ self.inner.call_thread_facts(id).await+ }++ async fn call_entry_statuses(+ &self,+ ids: &[Uuid],+ ) -> Result<HashMap<Uuid, CallEntryStatus>, MessageError> {+ self.inner.call_entry_statuses(ids).await+ }+async fn document_file_type(&self, id: &str) -> Result<Option<String>, MessageError> {self.inner.document_file_type(id).await}diff --git a/crates/messages/src/domain/service/test/call_roots.rs b/crates/messages/src/domain/service/test/call_roots.rsnew file mode 100644index 0000000000..e951353ded--- /dev/null+++ b/crates/messages/src/domain/service/test/call_roots.rs@@ -0,0 +1,210 @@+use super::*;++const CHANNEL: Uuid = Uuid::from_u128(0xc0);+const CALLER: &str = "macro|[email protected]";++fn channel_access(user: &str) -> EntityAccessReceipt<MessageWrite> {+ EntityAccessReceipt::try_new(+ EntityAccessAuth::Authenticated(user.to_owned().try_into().unwrap()),+ entity_access::domain::models::Entity {+ entity_id: CHANNEL.to_string(),+ entity_type: EntityType::Channel,+ },+ EntityPermission::AccessLevel {+ access_level: AccessLevel::Owner,+ },+ )+ .unwrap()+}++/// A channel call whose root has been posted.+fn posted_root() -> (Repo, Uuid) {+ let call_id = macro_uuid::generate_uuid_v7();+ let mut repo = fixture();+ repo.message.id = call_id;+ repo.message.parent = MessageParent::Channel(CHANNEL);+ repo.message.kind = MessageKind::CallRoot;+ repo.message.sender_id = ChannelSender::try_from(CALLER.to_owned()).unwrap();+ repo.state.root_id = call_id;+ repo.state.anchor = None;+ repo.call_thread = Some(CallThreadFacts {+ channel_id: CHANNEL,+ created_by: CALLER.into(),+ });+ (repo, call_id)+}++#[tokio::test]+async fn a_call_root_is_created_from_the_calls_record_and_announced_only_as_itself() {+ let (mut repo, call_id) = posted_root();+ // No root exists yet; this repo's message stands for a different id.+ repo.message.id = Uuid::from_u128(9);+ let events = Events::default();+ let service = MessageService::new(repo.clone(), events.clone());++ service.ensure_call_root(call_id).await.unwrap();++ let creates = repo.creates.lock().unwrap();+ assert_eq!(creates.len(), 1);+ assert_eq!(creates[0].kind, MessageKind::CallRoot);+ assert_eq!(creates[0].input.id, Some(call_id));+ assert_eq!(creates[0].parent, MessageParent::Channel(CHANNEL));+ assert_eq!(creates[0].actor.as_ref(), CALLER);+ let events = events.0.lock().unwrap();+ assert_eq!(events.len(), 1);+ assert!(matches!(+ events[0].change,+ MessageChange::CallRootPosted { .. }+ ));+ assert!(events[0].agent_trigger().is_none());+}++#[tokio::test]+async fn asking_for_an_existing_root_again_creates_and_announces_nothing() {+ let (repo, call_id) = posted_root();+ let events = Events::default();+ let service = MessageService::new(repo.clone(), events.clone());++ let root = service.ensure_call_root(call_id).await.unwrap();++ assert_eq!(root.id, call_id);+ assert!(repo.creates.lock().unwrap().is_empty());+ assert!(events.0.lock().unwrap().is_empty());+}++#[tokio::test]+async fn a_call_without_a_channel_thread_has_no_root_to_create() {+ let (mut repo, call_id) = posted_root();+ repo.call_thread = None;+ let service = MessageService::new(repo.clone(), Events::default());++ assert!(matches!(+ service.ensure_call_root(call_id).await,+ Err(MessageError::NotFound)+ ));+ assert!(repo.creates.lock().unwrap().is_empty());+}++#[tokio::test]+async fn nobody_can_change_a_call_root_including_its_sender_and_a_channel_owner() {+ let (repo, call_id) = posted_root();+ let service = MessageService::new(repo, Events::default());++ for user in [CALLER, "macro|[email protected]"] {+ assert!(matches!(+ service+ .patch(+ channel_access(user),+ call_id,+ MessagePatch {+ content: Some("edited".into()),+ ..Default::default()+ }+ )+ .await,+ Err(MessageError::Forbidden)+ ));+ assert!(matches!(+ service.delete(channel_access(user), call_id, None).await,+ Err(MessageError::Forbidden)+ ));+ assert!(matches!(+ service+ .react(channel_access(user), call_id, "👍".into(), true, None)+ .await,+ Err(MessageError::Forbidden)+ ));+ }+}++#[tokio::test]+async fn a_stale_client_cannot_post_to_the_call_parent_of_a_channel_thread_call() {+ let (mut repo, call_id) = posted_root();+ repo.message.parent = MessageParent::Call(call_id);+ let service = MessageService::new(repo.clone(), Events::default());++ let result = service+ .post(+ call_receipt("macro|[email protected]", call_id, AccessLevel::Comment).unwrap(),+ post_input(),+ )+ .await;++ assert!(matches!(result, Err(MessageError::Invalid(_))));+ assert!(repo.creates.lock().unwrap().is_empty());+}++#[tokio::test]+async fn a_call_root_page_entry_carries_the_calls_life_and_a_deleted_record_reads_as_such() {+ let (mut repo, call_id) = posted_root();+ let ended_call = macro_uuid::generate_uuid_v7();+ let ended_at = Utc::now();+ repo.call_statuses.insert(+ ended_call,+ CallEntryStatus::Ended {+ ended_at,+ duration_ms: 1_000,+ },+ );+ let service = MessageService::new(repo.clone(), Events::default());+ let item = |id| MessageListItem {+ message: Message {+ id,+ ..repo.message.clone()+ },+ state: repo.state.clone(),+ thread: MessageThreadPreview {+ reply_count: 0,+ latest_reply_at: None,+ preview: vec![],+ },+ };+ let plain = MessageListItem {+ message: Message {+ kind: MessageKind::Message,+ ..item(Uuid::from_u128(5)).message+ },+ ..item(Uuid::from_u128(5))+ };++ let page = service+ .with_call_entries(MessageTimelinePage {+ entries: vec![+ MessageTimelineEntry::Message {+ message: Box::new(item(ended_call)),+ },+ MessageTimelineEntry::Message {+ message: Box::new(item(call_id)),+ },+ MessageTimelineEntry::Message {+ message: Box::new(plain),+ },+ ],+ next_cursor: None,+ previous_cursor: None,+ })+ .await+ .unwrap();++ assert!(matches!(+ page.entries[0],+ MessageTimelineEntry::Call {+ status: CallEntryStatus::Ended {+ duration_ms: 1_000,+ ..+ },+ ..+ }+ ));+ assert!(matches!(+ page.entries[1],+ MessageTimelineEntry::Call {+ status: CallEntryStatus::RecordDeleted,+ ..+ }+ ));+ assert!(matches!(+ page.entries[2],+ MessageTimelineEntry::Message { .. }+ ));+}diff --git a/crates/messages/src/domain/service/timeline.rs b/crates/messages/src/domain/service/timeline.rsindex d3559ad07a..b82c182de4 100644--- a/crates/messages/src/domain/service/timeline.rs+++ b/crates/messages/src/domain/service/timeline.rs@@ -57,6 +57,47 @@ fn merge(}impl<R: MessageRepository, E: MessageEventPublisher> MessageService<R, E> {+ /// Turn call roots into call entries, reading every call on the page at once.+ pub(super) async fn with_call_entries(+ &self,+ mut page: MessageTimelinePage,+ ) -> Result<MessageTimelinePage, MessageError> {+ let call_ids: Vec<Uuid> = page+ .entries+ .iter()+ .filter_map(|entry| match entry {+ MessageTimelineEntry::Message { message }+ if message.message.kind == MessageKind::CallRoot =>+ {+ Some(message.message.id)+ }+ _ => None,+ })+ .collect();+ if call_ids.is_empty() {+ return Ok(page);+ }++ let statuses = self.repo.call_entry_statuses(&call_ids).await?;+ page.entries = page+ .entries+ .into_iter()+ .map(|entry| match entry {+ MessageTimelineEntry::Message { message }+ if message.message.kind == MessageKind::CallRoot =>+ {+ let status = statuses+ .get(&message.message.id)+ .copied()+ .unwrap_or(CallEntryStatus::RecordDeleted);+ MessageTimelineEntry::Call { message, status }+ }+ entry => entry,+ })+ .collect();+ Ok(page)+ }+pub(super) async fn activity_timeline(&self,parent: &MessageParent,diff --git a/crates/messages/src/domain/service/timeline/test.rs b/crates/messages/src/domain/service/timeline/test.rsindex af122e286f..a1efe6e3d0 100644--- a/crates/messages/src/domain/service/timeline/test.rs+++ b/crates/messages/src/domain/service/timeline/test.rs@@ -16,6 +16,7 @@ fn message(id: u128) -> MessageListItem {let id = Uuid::from_u128(id);MessageListItem {message: Message {+ kind: MessageKind::Message,guest_name: None,id,parent: MessageParent::Channel(Uuid::from_u128(100)),diff --git a/crates/messages/src/inbound/toolset/test.rs b/crates/messages/src/inbound/toolset/test.rsindex 214938b02f..13874badf3 100644--- a/crates/messages/src/inbound/toolset/test.rs+++ b/crates/messages/src/inbound/toolset/test.rs@@ -59,6 +59,7 @@ fn bot_sender() -> ChannelSender<'static> {fn message(id: Uuid, thread_id: Option<Uuid>, sender: ChannelSender<'static>) -> Message {Message {+ kind: crate::domain::models::MessageKind::Message,id,parent: initiative(),thread_id,diff --git a/crates/messages/src/outbound/broker.rs b/crates/messages/src/outbound/broker.rsindex 0b91df067f..96144eb426 100644--- a/crates/messages/src/outbound/broker.rs+++ b/crates/messages/src/outbound/broker.rs@@ -248,7 +248,8 @@ pub fn topic_events(event: &crate::domain::ports::MessageEvent) -> Vec<MessageMadeleted_at: message.deleted_at,})]}- MessageChange::ReactionChanged { .. }+ MessageChange::CallRootPosted { .. }+ | MessageChange::ReactionChanged { .. }| MessageChange::ThreadUpdated { .. }| MessageChange::Typing { .. } => Vec::new(),}diff --git a/crates/messages/src/outbound/broker/test.rs b/crates/messages/src/outbound/broker/test.rsindex 682fe2cc13..69cf0254e1 100644--- a/crates/messages/src/outbound/broker/test.rs+++ b/crates/messages/src/outbound/broker/test.rs@@ -43,6 +43,7 @@ fn attachment(id: u128) -> MessageAttachment {fn reply(parent: MessageParent, attachments: Vec<MessageAttachment>) -> Message {Message {+ kind: crate::domain::models::MessageKind::Message,id: REPLY,parent,thread_id: Some(ROOT),diff --git a/crates/messages/src/outbound/pg_message_repo.rs b/crates/messages/src/outbound/pg_message_repo.rsindex 2aa39cb69a..f125f77011 100644--- a/crates/messages/src/outbound/pg_message_repo.rs+++ b/crates/messages/src/outbound/pg_message_repo.rs@@ -26,6 +26,7 @@ struct StoredMessage {parent_entity_type: String,parent_entity_id: String,thread_id: Option<Uuid>,+ kind: MessageKind,sender_id: String,guest_name: Option<String>,imported_author: Option<String>,@@ -259,6 +260,7 @@ impl PgMessageRepository {.try_into().map_err(|e| MessageError::Repository(rootcause::Report::new(e).into()))?,imported_author: r.imported_author.map(|name| ImportedAuthor { name }),+ kind: r.kind,guest_name: r.guest_name,triggered_by: r.triggered_by_user_id,triggered_via: r.triggered_via,@@ -536,6 +538,56 @@ impl PgMessageRepository {}impl MessageRepository for PgMessageRepository {+ async fn call_thread_facts(+ &self,+ call_id: Uuid,+ ) -> Result<Option<CallThreadFacts>, MessageError> {+ let row = sqlx::query!(+ r#"SELECT channel_id AS "channel_id!", user_id FROM call_entities+ WHERE id = $1 AND discussion = 'channel_thread' AND channel_id IS NOT NULL"#,+ call_id,+ )+ .fetch_optional(&self.pool)+ .await+ .map_err(database_error)?;+ Ok(row.map(|row| CallThreadFacts {+ channel_id: row.channel_id,+ created_by: row.user_id,+ }))+ }++ #[tracing::instrument(err, skip_all, name = "messages.call_entries", fields(calls = call_ids.len()))]+ async fn call_entry_statuses(+ &self,+ call_ids: &[Uuid],+ ) -> Result<HashMap<Uuid, CallEntryStatus>, MessageError> {+ let rows = sqlx::query!(+ "SELECT id, started_at, ended_at, duration_ms FROM call_entities WHERE id = ANY($1)",+ call_ids,+ )+ .fetch_all(&self.pool)+ .await+ .map_err(database_error)?;+ Ok(rows+ .into_iter()+ .map(|row| {+ let status = match row.ended_at {+ None => CallEntryStatus::Live,+ Some(ended_at) => {+ let measured = row+ .started_at+ .map(|started_at| (ended_at - started_at).num_milliseconds());+ CallEntryStatus::Ended {+ ended_at,+ duration_ms: row.duration_ms.or(measured).unwrap_or(0).max(0),+ }+ }+ };+ (row.id, status)+ })+ .collect())+ }+async fn replies(&self,parent: &MessageParent,@@ -744,8 +796,8 @@ impl MessageRepository for PgMessageRepository {sqlx::query!(r#"INSERT INTO comms_messages(id, parent_entity_type, parent_entity_id, thread_id,sender_id, triggered_by_user_id, triggered_via, content, client_message_id,- guest_name)- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)"#,+ guest_name, kind)+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)"#,id,command.parent.entity_type(),command.parent.entity_id(),@@ -756,6 +808,10 @@ impl MessageRepository for PgMessageRepository {command.input.content,command.canonical_root_id.and(command.input.id),command.guest_name,+ match command.kind {+ MessageKind::Message => "message",+ MessageKind::CallRoot => "call_root",+ },).execute(&mut *tx).awaitdiff --git a/crates/messages/src/outbound/pg_message_repo/test.rs b/crates/messages/src/outbound/pg_message_repo/test.rsindex a3d8e73b4a..43ec6e225f 100644--- a/crates/messages/src/outbound/pg_message_repo/test.rs+++ b/crates/messages/src/outbound/pg_message_repo/test.rs@@ -32,6 +32,7 @@ async fn setup(pool: &PgPool) {fn command(document: &str, root: Option<Uuid>, content: &str) -> CreateMessage {CreateMessage {+ kind: MessageKind::Message,guest_name: None,canonical_root_id: None,parent: MessageParent::parse("document", document).unwrap(),diff --git a/crates/models_soup/src/call_record/test.rs b/crates/models_soup/src/call_record/test.rsindex f24e5d7609..1f85e3aba6 100644--- a/crates/models_soup/src/call_record/test.rs+++ b/crates/models_soup/src/call_record/test.rs@@ -9,6 +9,9 @@ use uuid::Uuid;fn record_with_participants(user_ids: &[&str]) -> CallRecord {let now = Utc::now();CallRecord {+ discussion: call::domain::models::CallDiscussion::CallChat {+ call_id: uuid::Uuid::nil(),+ },call_id: Uuid::now_v7(),channel_id: Some(Uuid::now_v7()),room_name: Some("room".to_string()),diff --git a/crates/scheduled_action/src/outbound/event_content/routine_event/test.rs b/crates/scheduled_action/src/outbound/event_content/routine_event/test.rsindex 21e2dc2f0f..c0be23a5f6 100644--- a/crates/scheduled_action/src/outbound/event_content/routine_event/test.rs+++ b/crates/scheduled_action/src/outbound/event_content/routine_event/test.rs@@ -70,6 +70,9 @@ fn segment(speaker_id: &str, content: &str, minute: u32) -> CallRecordTranscriptfn ended_call(transcript: Vec<CallRecordTranscriptSegment>) -> CallRecord {CallRecord {+ discussion: call::domain::models::CallDiscussion::CallChat {+ call_id: Uuid::parse_str(CALL_ID).unwrap(),+ },call_id: Uuid::parse_str(CALL_ID).unwrap(),channel_id: Some(Uuid::parse_str("01928f3e-6a2b-7c3d-8e4f-0000000c4a77").unwrap()),room_name: Some("room".into()),@@ -476,6 +479,7 @@ fn a_channel_reply_carries_its_thread_through_the_message() {.unwrap();let at = |minute| Utc.with_ymd_and_hms(2026, 10, 8, 14, minute, 0).unwrap();let prompt = Message {+ kind: messages::domain::models::MessageKind::Message,id: prompt_id,parent: MessageParent::Channel(channel_id),thread_id: Some(root_id),@@ -512,6 +516,7 @@ fn a_channel_reply_carries_its_thread_through_the_message() {deleted_at: None,},root: Message {+ kind: messages::domain::models::MessageKind::Message,id: root_id,parent: MessageParent::Channel(channel_id),thread_id: None,@@ -532,6 +537,7 @@ fn a_channel_reply_carries_its_thread_through_the_message() {},replies: vec.+## Channel list previewsMessage text in channel rows and Home cards is display-only, including quoteddiff --git a/docs/design/call-chat-in-channel.md b/docs/design/call-chat-in-channel.mdnew file mode 100644index 0000000000..b5612371b3--- /dev/null+++ b/docs/design/call-chat-in-channel.md@@ -0,0 +1,342 @@+# Call chat in the channel++Status: implemented behind the server flag `enable-call-channel-thread`, off by default.++Mockup: [Call chat in the channel](https://claude.ai/artifact/V1h77fWX2oMtqLihZbuaeA)+(every artboard is clickable; start at the first one).++## Summary++A new call in a channel gets a real thread in that channel. The call's row in the+channel is the thread's root, and the call panel shows the channel, opened on that+thread. The separate call chat does not exist for these calls.++| Call | Discussion | Experience |+| --- | --- | --- |+| New call with a channel | Thread in the channel | New |+| Past channel call, or one running at launch | Call parent, not migrated | As today, including its ended row and chat on the record |+| Call with no channel (quick, scheduled) | Call parent | As today |++Nothing is migrated. We accept maintaining two chat experiences.++## Keeping the branch high++The split must not become nullable fields and conditionals in rendered components.+There is one type, decided once and stored:++```rust+pub enum CallDiscussion {+ /// A thread in the call's channel. `root_id` equals the call id.+ ChannelThread { channel_id: Uuid, root_id: Uuid },+ /// The call's own discussion on `MessageParent::Call`.+ CallChat { call_id: Uuid },+}+```++- **Stored, not inferred.** Past channel calls have a `channel_id` and still use+ `CallChat`, so `channel_id` cannot decide this.+- **Two client paths, not three.** Past channel calls and calls with no channel look+ the same to the client.+- **One client branch for the panel.** The host picks the discussion component and hands+ `CallOverlay` a slot.+- **One branch for the timeline.** The call is its own timeline entry kind, not+ optional fields on a message or activity row.+- **Live and ended are separate components**, chosen from a status union, rather than+ one row full of conditions.++## Behavior++### In the channel++The row sits at the call's start time and replies do not move it. It looks similar to+today's system line: icon, bold name, time, no avatar or message hover.++| State | Row | Under it |+| --- | --- | --- |+| Live, not in the call | `<name> started a call`, call time, live avatars, **Join** | Thread indicator with updates (if any messages), or `+` with none |+| Live, in the call | Same, with **Return to call** | Same |+| Live, expanded | Same | Messages on the thread rail, `+` |+| Ended | `<name> started a call that lasted <duration>` | Thread indicator (if any messages), or `+` with none |+| Record deleted | `<name> started a call`, no link to the record | Thread unchanged |++The thread is collapsed by default in every state, and replies like any other thread: no input is open until someone asks for one.++While the row is scrolled out of view during a live call, the `ActiveCallMessage`+banner shows, with a live message count. Clicking it scrolls to the row.++### In the call panel++- Open by default on desktop and tablet, closed on phones. Calls without a channel keep+ today's closed default.+- The first tab is labelled with the channel name.+- An empty thread opens on a full-height blank slate under the action line. A thread+ with messages opens at the newest message. The channel history is above in both cases.+- Channel rows newer than the call's root are not shown in the panel.+- The composer always has a thread target, the call thread by default. It cannot post a+ top-level channel message.+- Scrolling up shows **Back to call thread**.+- A popup above the composer counts top-level channel messages from anyone else, newer+ than the later of the user's join and their last visit to the channel from the popup.+ Thread replies do not count, because they do not appear after the call in the channel.+- **View** swaps to the Messages tab at the latest message, with a New divider. The call+ stays connected, and toggling tabs works as it does today. On the meeting page, which+ has no channel tabs, **View** navigates to the channel.+- While the panel is closed, a dot on the panel button shows there is something to see.++iOS keeps its native call screen, and people reply through the channel.++### Replies++Threads are one level deep, and the service rejects a reply to a reply. So a reply to a+message in the call thread is a quote reply: a new message in the same thread with a+leading `m-reply-target`. There is no new reply type.++| The user replies to | `thread_id` | Quote |+| --- | --- | --- |+| Nothing (default composer) | The call's root | No |+| A message in the call thread | The call's root | Yes |+| A top-level channel message | That message | No |+| A reply in another channel thread | Its root | Yes |++Everything is on the channel parent, so `buildReplyTargetValue` already behaves this way.+A quote always stays in the quoted message's thread.++The panel reuses `createUnifiedInputManager`, which already models a thread root plus an+optional reply. Closing a target returns to the call thread rather than to no target.++### Notifications++Normal thread rules apply, with two differences for call threads:++- **Connected people get nothing.** Followers are computed as usual, including through+ mentions, and notifications are dropped at send time for anyone connected to the call.+ When they leave, the next reply reaches them. The only thing they are never notified+ about is a message sent while the thread was in their call.+- **The caller is not a follower for starting the call.** People follow by sending a+ message or being mentioned.++A normal channel mention still reaches someone during a call.++### Access and deletion++- Chat on the record of a `ChannelThread` call is visible only to people with access to+ the channel, read-only, with **Open in channel**. Sharing a call record does not open+ part of a channel. Without channel access the section is absent, not an error.+- Deleting a call record removes the transcript and recording. The discussion stays.+- Past calls render as they do today, and their chat stays on the call record.++## Backend++### Schema++One migration, with its constraints validated in a second, runs before any code uses it:++- `call_entities.discussion`: `text NOT NULL DEFAULT 'call_chat'`, with `'channel_thread'` as+ the other value. `call_entities` is the durable identity of a call through archival, so+ archiving needs no copy.+- `comms_messages.kind`: `text NOT NULL DEFAULT 'message'`, with `'call_root'` as the other+ value.++`cleanup_call_messages` only deletes `parent_entity_type = 'call'`, so deleting a record+already leaves a channel thread alone.++### Creating the thread++`get_or_create_call` is the only place a channel call is created. `Meeting.channel_id`+exists only for links to existing channel calls, so the meeting path always creates calls+with no channel.++Before creating the call, the service reads the flag for the caller through the `ChannelThreads`+port. Off, or a failed load, stores `call_chat`. The value is written in the transaction that+creates the call, so nobody can read the call with a discussion it will not keep.++The race winner then calls `ChannelThreads::ensure_root`, which reaches+`MessageService::ensure_call_root(call_id)`. It takes no receipt, because everything it writes+comes from the call's record: the channel, the sender and the text. It is idempotent on the+call id.++A failed post never blocks the call. The first reply retries it: when a channel post names a+`thread_id` with no thread and that id is a `channel_thread` call of this channel, the service+creates the root first.++### Call root kind++`MessageKind` is on `Message`. Only `ensure_call_root` writes anything other than+`MessageKind::Message`, and no client input reaches it. A `call_root` message:++- is announced by its own `MessageChange::CallRootPosted`. The match on that enum is exhaustive,+ so every consumer decided what a root does: viewers get it live and the channel moves up the+ list, while notifications, interaction tracking, agents, routines, webhooks and search documents+ never see it,+- is left out of `get_channel_message_count`, so the first real message still sends+ first-message invites,+- rejects edit, delete and reactions in `MessageService`, for every caller including bots and+ agent tools. Channels have no thread delete or thread patch.++Its thread replies are ordinary messages and trigger everything normally. Agents in call+threads therefore follow channel rules, not the owner-based call rules.++The plain text `started a call` is what notification previews, agents and the channel list read.+A surface that shows a root outside the timeline (a standalone thread, the Threads view, the call+record) draws it as the action line from `kind`.++### Timeline++`MessageTimelineEntry` gains a third kind. `timeline_entries` turns `call_root` messages into it+as the last step, with one batched read of `call_entities` per page, so paging and windows are+unchanged. Clients already ignore entry kinds they do not know.++```rust+Call {+ /// The root message, its thread state and its reply preview.+ message: Box<MessageListItem>,+ status: CallEntryStatus,+}++pub enum CallEntryStatus {+ Live,+ Ended { ended_at: DateTime<Utc>, duration_ms: i64 },+ RecordDeleted,+}+```++`RecordArchived` carries `channel_thread`. For those calls the ending is recorded against the call+entity rather than the channel, so the activity feed keeps the fact and the channel timeline shows+no second row. Past calls keep their channel-targeted `CallEnded`.++### Notifications++In `crates/channels/src/domain/side_effects.rs`, connected participants are left out of the+recipients of all three effects: `Reply`, `UserMention` and document mention.+`get_thread_notification_context` reads them from active `call_participants` rows, only when the+thread's root is a `call_root`. A failed read notifies rather than loses the notification.++Followers exclude a `call_root`'s sender: `get_channel_participants_for_thread_id` (both+copies) counts only `kind = 'message'` senders, `parent_sender_id` is empty for call roots,+and the Soup thread filters (`channelThreadParticipantId`, `channelThreadRootSenderId`) match.++### Rejecting stale writes++`MessageService::post` rejects `MessageParent::Call` posts on a `channel_thread` call, so a+stale client cannot write to a chat nobody will see.++### Flag++`enable-call-channel-thread`, through `crates/feature_flags`, evaluated for the caller when+the call is created and targeted by team in PostHog. The stored type then applies to everyone+on that call, so people on one call cannot end up in different discussions. There is no client+flag. `document_storage_service` requires `POSTHOG_API_KEY` at startup and always wires+`PostHogFeatureFlags`. Evaluation has a 300 ms timeout; a failed load keeps that call+`call_chat` for its lifetime. Joining an existing call does not evaluate the flag again.++## Frontend++New UI goes in `features/channel/Call/discussion/`, following the layered feature layout,+with user-visible text through `t()`.++### Discussion type++- `CallRecord.discussion` carries `CallDiscussion`. The live record query is already mounted for an+ active call, so nothing else on the wire needs it.+- `ChannelCallTab` and the meeting route hand `CallOverlay` a `discussion` slot, which supplies the+ panel content, the tab label and the default open state. `CallDiscussionContent` is the one place+ a signed-in call chooses between `ChannelCallPanel` and `CallChat`.+- Guests have no discussion slot and keep `GuestCallChat`. A new meeting has no channel and keeps+ `CallChat`.+- The meeting page renders without the app's providers, so it mounts `MeetingChannelHost` around the+ channel panel, only when such a panel opens.+- `CallDiscussionHistory` is the one place a call record chooses between `CallChatHistory` and the+ read-only channel thread section.++### Channel timeline++- `buildMessageIndex` keeps a `callStatusByKey` beside `byId`, and call rows are left out of `keys`,+ so keyboard selection skips them as it skips activity.+- `Channel.tsx` passes `ChannelThread` a `rootSlot` for those rows, rendering `CallRootLine`, which+ picks a live or past line from `status`. Everything else about the row is the ordinary thread:+ `ThreadCollapsedIndicator`, `ThreadReplyButton`, the rail, `threadManager` and quote replies.+- `hideCollapsedPreview` on `ChannelThread` collapses the row to its indicator.+- `call_root_posted` and `call_ended` invalidate the channel's timeline, because the row carries+ facts only the server has.+- `ActiveCallMessage` hides while the live row is on screen, and adds the count for `ChannelThread`+ calls. A `CallChat` call running at launch keeps today's banner.++### Call panel++- `ChannelCallPanel` renders `Channel` with a `callPanel` prop, which is the only branch in that+ component: rows are cut off at the root, older pages load until the root is found, the row's+ minimum height is the scroll viewport so its first frame is the blank slate, and channel view+ tracking is off so what's new stays new.+- The panel always uses the unified composer. `createUnifiedInputManager` takes a `defaultThreadId`,+ so closing a reply returns to the call thread, and the top-level composer is unreachable.+- The popup comes from `outsideMessages` over the channel's timeline index, following the count+ rules above. `MessageReadVisibility` already requires a message to be on screen, so nothing is+ marked read from the panel.++### Links++A message in a call thread is an ordinary channel message, so `buildMessageLink` and channel+message targets cover it. `buildCallMessageLink` stays for `CallChat`.++## Edge cases++| Case | Behavior |+| --- | --- |+| Call running at launch | Stays `call_chat`, with today's panel and row. |+| Root post fails and nobody replies | No row for that call. Logged at error level. |+| Flag load fails | `call_chat`. The call behaves as today. |+| Stale client on a `channel_thread` call | Its post is rejected and the existing "could not be sent" message shows. |+| Member removed from the channel | Loses the thread at once, because access is the channel's. |+| Person with the record but not the channel | Sees the transcript and summary, no chat section. |+| Channel deleted | Thread goes with the channel, and the record keeps its transcript and recording. |+| Every thread message deleted | Row remains, with no indicator. |+| Mentioned while connected, then leaves | Not notified of that message; receives later replies. |+| Connection state is stale | Someone just disconnected may lose one notification. Accepted. |++## Observability++- Backend: `call.discussion.create_root` with the call id and outcome, and `messages.call_entries`+ for the timeline read with a row count.+- Web: `channel.call-panel.view` is its own flow. Opening from the popup is a `beginInteraction`,+ `call.panel.view_channel`, recording the call, channel and count.+- Never record message content or quote text.++## Rollout++Everything ships together, with the flag at 0%, so no call becomes `channel_thread` until the client+that reads `discussion` has reached people.++1. Provision `POSTHOG_API_KEY` in `cloud-storage-service`'s Doppler `dev` and `prd`+ configs and `local/lcl_personal` before deployment. `--no-doppler` uses a boot+ placeholder, which cannot enable remote flags.+2. Merge and deploy. All calls are still `call_chat` while the flag is at 0%.+3. Wait for the web bundle to reach clients.+4. Enable `enable-call-channel-thread` in dev, then by team.+5. Clean up: remove the flag and `CallEnded` handling once no past-call row needs it. `CallChat`,+ `GuestCallChat` and `CallChatHistory` remain for calls with no channel and past calls.++## Tests++- `crates/call`: flag on, off and failing; winner-only root creation; the discussion type survives+ archival; deleting a record keeps the thread.+- `crates/messages`: root rejects edit, delete, thread delete and reactions for users, bots and agent+ tools; a client cannot set `kind`; first-reply retry creates the root once under races; call-parent+ posts are rejected on `channel_thread`; timeline entries for each status, with one query per page.+- `crates/channels`: connected people get nothing on all three effects, and normal thread rules for+ everyone else; the caller is not a follower for starting the call; a call root does not suppress+ first-message invites; normal channel mentions during a call still notify.+- `crates/agent_trigger`, `crates/scheduled_action`: a root triggers nothing, and a reply triggers+ normally.+- `apps/web`: the reply table through real interactions; no path posts top-level from the panel; popup+ count rules; the record section with and without channel access.+- Browser, backend-free, desktop and phone: blank slate fills the panel, a thread with messages opens+ at the newest, history scrolls up, the popup opens the channel at the latest message, a draft survives+ a target change, and a collapsed row does not jump when a message arrives. Extend+ `lib/core/messages/browser-test`, which already covers discussion scrolling.+- Live: a member outside the call replies from the channel and people in the call see it without a+ notification, and the reverse.++## Docs++Done in this change: `docs/agent-guide/calls.md`, `channels.md`, the `AGENTS.md` of `crates/call`,+`crates/messages` and `services/document_storage_service`, and `docs/design/entity-messages.md`.diff --git a/docs/design/entity-messages.md b/docs/design/entity-messages.mdindex 8a309700e3..fe021d7173 100644--- a/docs/design/entity-messages.md+++ b/docs/design/entity-messages.md@@ -32,6 +32,10 @@ The store re-checks the live-root rule inside the write transaction. The schemaa composite thread foreign key, a `CHECK` that forbids anchors on channel threads, anda partial unique index for one live Markdown discussion per mark per document.+A channel root may have `kind = 'call_root'`, standing for a channel call; see+[call chat in the channel](call-chat-in-channel.md). Nobody can change one, and it triggers nothing a+post does.+### Transitional shapeUntil the last PR of the rollout removes them, the schema keeps:diff --git a/packages/sdk/generated/storage/index.ts b/packages/sdk/generated/storage/index.tsindex 4fd52a3159..cb8f2a0d2b 100644--- a/packages/sdk/generated/storage/index.ts+++ b/packages/sdk/generated/storage/index.ts@@ -1,4 +1,4 @@// This file is auto-generated by @hey-api/openapi-tsexport { type Options, Sdk } from './sdk.gen';-export type { AccentColor, AccessiblePipeline, AccessLevel, AccessRequest, AccessRequestsCancelData, AccessRequestsCancelErrors, AccessRequestsCancelResponses, AccessRequestsDirectData, AccessRequestsDirectErrors, AccessRequestsDirectResponse, AccessRequestsDirectResponses, AccessRequestsRemoveDirectData, AccessRequestsRemoveDirectErrors, AccessRequestsRemoveDirectResponses, AccessRequestsResolveData, AccessRequestsResolveErrors, AccessRequestsResolveResponse, AccessRequestsResolveResponses, AccessRequestsSetDirectData, AccessRequestsSetDirectErrors, AccessRequestsSetDirectResponses, AccessRequestsStateData, AccessRequestsStateErrors, AccessRequestsStateResponse, AccessRequestsStateResponses, AccessRequestsSubmitData, AccessRequestsSubmitErrors, AccessRequestsSubmitResponse, AccessRequestsSubmitResponses, AccessRequestState, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddChannelBotData, AddChannelBotError, AddChannelBotErrors, AddChannelBotRequest, AddChannelBotResponse, AddChannelBotResponses, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentDmProfile, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionArchiveCause, AgentSessionFilters, AgentSessionLifecycleEvent, AgentSessionSource, AgentSessionVisibility, AgentTyping, AgentTypingPhase, AiAdmissionErrorBody, Anchor, AnchorId, AnchorResponse, AnnotationIncrementalUpdate, Answer, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentCommentReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelParticipant, ApiChannelWithLatest, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, AppliedOps, ApplyCrmPipelineOpsData, ApplyCrmPipelineOpsResponse, ApplyCrmPipelineOpsResponses, ApplyDatabaseOpsData, ApplyDatabaseOpsError, ApplyDatabaseOpsErrors, ApplyDatabaseOpsResponse, ApplyDatabaseOpsResponses, ApplyOpsRequest, ApplyOpsResponse, ApproveHarnessPairingData, ApproveHarnessPairingError, ApproveHarnessPairingErrors, ApproveHarnessPairingResponse, ApproveHarnessPairingResponses, ApprovePairingRequest, AttachmentChange, AttendeeResponseStatus, Audience, Awareness, AwarenessRelay, BasicDocument, BasicDocumentSubType, BlockCrmDomainData, BlockCrmDomainError, BlockCrmDomainErrors, BlockCrmDomainResponse, BlockCrmDomainResponses, BomPart, BookingTarget, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotOwnerProfile, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarJoinRequest, CalendarJoinRequestApiError, CalendarJoinRequestErrorCode, CalendarJoinRequestsResponse, CalendarJoinRequestStatus, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarMentionViewerCopy, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallFilters, CallProvider, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordSource, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, CancelChannelAccessRequestData, CancelChannelAccessRequestError, CancelChannelAccessRequestErrors, CancelChannelAccessRequestResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponse, CancelSlackImportResponses, CardPosition, CastVerdict, CellValue, CellWrite, ChangedFileDto, ChangesetDto, ChangesetSourceDto, Channel, ChannelAccessDecision, ChannelAccessRequest, ChannelAccessRequestedMetadata, ChannelAccessRequestState, ChannelAccessRequestStatus, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelScopeSelection, ChannelLabelsList, ChannelMessage, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPictureChangedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollaborateFormData, CollaborateFormError, CollaborateFormErrors, CollaborateFormResponse, CollaborateFormResponses, CollabSurfaceResponse, CollabSurfaceTokenResponse, Column, ColumnCast, ColumnChange, ColumnChangeKind, ColumnConfig, ColumnConversion, ColumnConversionRequest, ColumnDetail, ColumnId, ColumnKind, ColumnProtection, ColumnResult, CommandFailure, CommandRejectedMetadata, CommittedChange, CompleteSlackImportUploadsData, CompleteSlackImportUploadsErrors, CompleteSlackImportUploadsResponse, CompleteSlackImportUploadsResponses, CompleteUploads, ConferenceProvider, Conjunction, ConversationId, ConversationKind, ConversationMetadata, ConversationProgress, ConversationSeal, ConversationStatus, ConvertDatabaseColumnData, ConvertDatabaseColumnError, ConvertDatabaseColumnErrors, ConvertDatabaseColumnResponse, ConvertDatabaseColumnResponses, ConvertedCell, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CountedReaction, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentRequest, CreateAgentResponse, CreateAgentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBotData, CreateBotError, CreateBotErrors, CreateBotRequest, CreateBotResponse, CreateBotResponses, CreateBotTokenData, CreateBotTokenError, CreateBotTokenErrors, CreateBotTokenRequest, CreateBotTokenResponse, CreateBotTokenResponse2, CreateBotTokenResponses, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateCanvasDocumentRequest, CreateCanvasDocumentResponse, CreateCanvasHandlerData, CreateCanvasHandlerError, CreateCanvasHandlerErrors, CreateCanvasHandlerResponse, CreateCanvasHandlerResponses, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelError, CreateChannelLabelErrors, CreateChannelLabelRequest, CreateChannelLabelResponse, CreateChannelLabelResponses, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenError, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponse, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateCrmPipelineData, CreateCrmPipelineResponse, CreateCrmPipelineResponses, CreateCrmTeamContactData, CreateCrmTeamContactError, CreateCrmTeamContactErrors, CreateCrmTeamContactRequest, CreateCrmTeamContactResponse, CreateCrmTeamContactResponses, CreateDatabaseData, CreateDatabaseError, CreateDatabaseErrors, CreateDatabaseRequest, CreateDatabaseResponse, CreateDatabaseResponses, CreateDatabaseWebhookData, CreateDatabaseWebhookError, CreateDatabaseWebhookErrors, CreateDatabaseWebhookRequest, CreateDatabaseWebhookResponse, CreateDatabaseWebhookResponses, CreatedDatabaseWebhookResponse, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreatedPairing, CreatedUserApiKey, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateForm, CreateFormData, CreateFormError, CreateFormErrors, CreateFormResponse, CreateFormResponses, CreateHarnessPairingData, CreateHarnessPairingError, CreateHarnessPairingErrors, CreateHarnessPairingResponse, CreateHarnessPairingResponses, CreateImport, CreateInitiativeData, CreateInitiativeError, CreateInitiativeErrors, CreateInitiativeRequest, CreateInitiativeResponse, CreateInitiativeResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateMeetingRequest, CreatePairingRequest, CreatePipeline, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateSkillHandlerData, CreateSkillHandlerError, CreateSkillHandlerErrors, CreateSkillHandlerResponse, CreateSkillHandlerResponses, CreateSkillRequest, CreateSkillResponse, CreateSlackImportData, CreateSlackImportErrors, CreateSlackImportResponse, CreateSlackImportResponses, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateToken, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateUserApiKeyData, CreateUserApiKeyError, CreateUserApiKeyErrors, CreateUserApiKeyRequest, CreateUserApiKeyResponse, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmAssociation, CrmBlockedDomainResponse, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CustomSpeakerAssignment, Database, DatabaseDetail, DatabaseId, DatabaseOp, DatabaseQueryRequest, DatabaseView, DatabaseWebhookDeliveryResponse, DatabaseWebhookPayloadProblem, DatabaseWebhookResponse, DataType, DateOperator, DateRange, DateRangeOperator, DeclineCallData, DeclineCallError, DeclineCallErrors, DeclineCallResponse, DeclineCallResponses, DeclineRingData, DeclineRingError, DeclineRingErrors, DeclineRingResponse, DeclineRingResponses, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorResponse, DeleteAnchorResponses, DeleteBotData, DeleteBotError, DeleteBotErrors, DeleteBotResponse, DeleteBotResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelError, DeleteChannelLabelErrors, DeleteChannelLabelResponse, DeleteChannelLabelResponses, DeleteChannelResponse, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceError, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponse, DeleteCollabSurfaceResponses, DeleteDatabaseWebhookData, DeleteDatabaseWebhookError, DeleteDatabaseWebhookErrors, DeleteDatabaseWebhookResponse, DeleteDatabaseWebhookResponses, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessError, DeleteHarnessErrors, DeleteHarnessResponse, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeError, DeleteInitiativeErrors, DeleteInitiativeResponse, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteSelfHarnessData, DeleteSelfHarnessError, DeleteSelfHarnessErrors, DeleteSelfHarnessResponse, DeleteSelfHarnessResponses, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserApiKeyData, DeleteUserApiKeyError, DeleteUserApiKeyErrors, DeleteUserApiKeyResponse, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DeliverDatabaseWebhookData, DeliverDatabaseWebhookError, DeliverDatabaseWebhookErrors, DeliverDatabaseWebhookResponse, DeliverDatabaseWebhookResponses, DirectAccess, DocumentAiEdited, DocumentAiEditFailed, DocumentAiEditFailedCode, DocumentAiEditRefused, DocumentAiEditRefusedCode, DocumentAiEditRequest, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentId, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentSyncEditor, DocumentTeamShareResponse, DocumentTextContent, DocumentTopicEvent, DocumentUpdatedMetadata, DuplicateDatabaseData, DuplicateDatabaseError, DuplicateDatabaseErrors, DuplicateDatabaseRequest, DuplicateDatabaseResponse, DuplicateDatabaseResponses, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditDocumentWithAiData, EditDocumentWithAiError, EditDocumentWithAiErrors, EditDocumentWithAiResponse, EditDocumentWithAiResponses, EditMyFormResponseData, EditMyFormResponseError, EditMyFormResponseErrors, EditMyFormResponseResponse, EditMyFormResponseResponses, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmailFollowup, EmailFollowupCommand, EmailFollowupResponse, EmailReminderCondition, EmailReminderPage, EmailReminderSummary, EmptyResponse, EnsureCollabSurfaceData, EnsureCollabSurfaceError, EnsureCollabSurfaceErrors, EnsureCollabSurfaceRequest, EnsureCollabSurfaceResponse, EnsureCollabSurfaceResponses, EnsureStarterHandlerData, EnsureStarterHandlerErrors, EnsureStarterHandlerResponse, EnsureStarterHandlerResponses, EntityFilters, EntityKind, EntityMessageCreateData, EntityMessageCreateResponse, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponse, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponse, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponse, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponse, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponse, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponse, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponse, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponse, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponse, EntityMessageTypingResponses, EntityPermission, EntityPermissionResponse, EntityRef, EntityReference, EntityType, ErrorResponse, EventIcsData, EventIcsErrors, EventIcsResponse, EventIcsResponses, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, ExternalChatAdd, ExternalChatAddData, ExternalChatAdded, ExternalChatAddResponse, ExternalChatAddResponses, ExternalChatAttachment, ExternalChatAttachmentState, ExternalChatBackfill, ExternalChatBackfillState, ExternalChatCall, ExternalChatCallOutcome, ExternalChatCapabilities, ExternalChatCommunity, ExternalChatContactCard, ExternalChatContacts, ExternalChatData, ExternalChatDeliveryData, ExternalChatDeliveryResponse, ExternalChatDeliveryResponses, ExternalChatDeliveryState, ExternalChatDetail, ExternalChatEvent, ExternalChatKind, ExternalChatLocation, ExternalChatMediaKind, ExternalChatMediaPresentation, ExternalChatMembers, ExternalChatMention, ExternalChatMessage, ExternalChatMessageAttachments, ExternalChatMessageAttachmentsData, ExternalChatMessageAttachmentsResponse, ExternalChatMessageAttachmentsResponses, ExternalChatMessageData, ExternalChatMessageKind, ExternalChatMessageResponse, ExternalChatMessageResponses, ExternalChatMessages, ExternalChatMessagesData, ExternalChatMessagesResponse, ExternalChatMessagesResponses, ExternalChatMutation, ExternalChatParticipant, ExternalChatPermissionsData, ExternalChatPermissionsResponse, ExternalChatPermissionsResponses, ExternalChatPersonRef, ExternalChatPoll, ExternalChatPollOption, ExternalChatProvider, ExternalChatReaction, ExternalChatReadData, ExternalChatReadResponse, ExternalChatReadResponses, ExternalChatReference, ExternalChatRemoveData, ExternalChatRemoveResponse, ExternalChatRemoveResponses, ExternalChatReplyBlock, ExternalChatReplyContent, ExternalChatResponse, ExternalChatResponses, ExternalChatRichContent, ExternalChatsData, ExternalChatSendData, ExternalChatSender, ExternalChatSendErrors, ExternalChatSendProgress, ExternalChatSendReply, ExternalChatSendResponse, ExternalChatSendResponses, ExternalChatSendsData, ExternalChatSendsResponse, ExternalChatSendsResponses, ExternalChatsResponse, ExternalChatsResponses, ExternalChatSummary, ExternalChatSystemAction, ExternalChatSystemLine, ExternalChatUpdatePermissionsData, ExternalChatUpdatePermissionsResponse, ExternalChatUpdatePermissionsResponses, ExternalChatUploadData, ExternalChatUploadedAttachment, ExternalChatUploadRequest, ExternalChatUploadResponse, ExternalChatUploadResponses, Favorite, FavoriteEntityRef, FavoritesList, FileChangeKindDto, FileSystemNodeWithIds, FileType, FileTypeUpdate, FilterCondition, FilterGroup, FilterNode, FilterTest, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponse, FinalizeSlackImportResponses, FolderItem, FollowupState, ForeignEntity, ForeignEntityFilters, Form, FormAccess, FormBranding, FormCollaboration, FormDetail, FormErrorCode, FormErrorResponse, FormLayout, FormPublicationProblem, FormQuestionDetail, FormResponse, FormSection, FormSectionDetail, FormSource, FormStatus, FormTally, Formula, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActiveCallsData, GetActiveCallsError, GetActiveCallsErrors, GetActiveCallsResponse, GetActiveCallsResponses, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetBotData, GetBotError, GetBotErrors, GetBotOwnerProfilesData, GetBotOwnerProfilesError, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponse, GetBotOwnerProfilesResponses, GetBotResponse, GetBotResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAccessRequestData, GetChannelAccessRequestError, GetChannelAccessRequestErrors, GetChannelAccessRequestResponse, GetChannelAccessRequestResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceError, GetCollabSurfaceErrors, GetCollabSurfaceResponse, GetCollabSurfaceResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactByEmailData, GetContactByEmailError, GetContactByEmailErrors, GetContactByEmailResponse, GetContactByEmailResponse2, GetContactByEmailResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmPipelineData, GetCrmPipelinePermissionsData, GetCrmPipelinePermissionsResponse, GetCrmPipelinePermissionsResponses, GetCrmPipelineResponse, GetCrmPipelineResponses, GetCrmPipelineRowsData, GetCrmPipelineRowsResponse, GetCrmPipelineRowsResponses, GetCrmPipelineStageRequirementsData, GetCrmPipelineStageRequirementsResponse, GetCrmPipelineStageRequirementsResponses, GetCrmPipelineTableData, GetCrmPipelineTableResponse, GetCrmPipelineTableResponses, GetCrmPipelineViewPositionsData, GetCrmPipelineViewPositionsResponse, GetCrmPipelineViewPositionsResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDatabaseData, GetDatabaseError, GetDatabaseErrors, GetDatabasePermissionsData, GetDatabasePermissionsError, GetDatabasePermissionsErrors, GetDatabasePermissionsResponse, GetDatabasePermissionsResponses, GetDatabaseQueryData, GetDatabaseQueryError, GetDatabaseQueryErrors, GetDatabaseQueryResponse, GetDatabaseQueryResponses, GetDatabaseResponse, GetDatabaseResponses, GetDatabaseRowHistoryData, GetDatabaseRowHistoryError, GetDatabaseRowHistoryErrors, GetDatabaseRowHistoryResponse, GetDatabaseRowHistoryResponses, GetDatabaseTableChangesData, GetDatabaseTableChangesError, GetDatabaseTableChangesErrors, GetDatabaseTableChangesResponse, GetDatabaseTableChangesResponses, GetDatabaseViewPositionsData, GetDatabaseViewPositionsError, GetDatabaseViewPositionsErrors, GetDatabaseViewPositionsResponse, GetDatabaseViewPositionsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentTextContentData, GetDocumentTextContentErrors, GetDocumentTextContentResponse, GetDocumentTextContentResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupError, GetEmailFollowupErrors, GetEmailFollowupResponse, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceError, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponse, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetFormData, GetFormError, GetFormErrors, GetFormPermissionsData, GetFormPermissionsError, GetFormPermissionsErrors, GetFormPermissionsResponse, GetFormPermissionsResponses, GetFormResponse, GetFormResponses, GetFormResponseSummaryData, GetFormResponseSummaryError, GetFormResponseSummaryErrors, GetFormResponseSummaryResponse, GetFormResponseSummaryResponses, GetFormTallyData, GetFormTallyError, GetFormTallyErrors, GetFormTallyResponse, GetFormTallyResponses, GetGithubPullRequestChangesData, GetGithubPullRequestChangesError, GetGithubPullRequestChangesErrors, GetGithubPullRequestChangesPatchData, GetGithubPullRequestChangesPatchError, GetGithubPullRequestChangesPatchErrors, GetGithubPullRequestChangesPatchResponse, GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesResponse, GetGithubPullRequestChangesResponses, GetGithubPullRequestData, GetGithubPullRequestError, GetGithubPullRequestErrors, GetGithubPullRequestFacetsData, GetGithubPullRequestFacetsError, GetGithubPullRequestFacetsErrors, GetGithubPullRequestFacetsResponse, GetGithubPullRequestFacetsResponses, GetGithubPullRequestResponse, GetGithubPullRequestResponses, GetGithubPullRequestTasksData, GetGithubPullRequestTasksError, GetGithubPullRequestTasksErrors, GetGithubPullRequestTasksResponse, GetGithubPullRequestTasksResponses, GetHarnessPairingData, GetHarnessPairingError, GetHarnessPairingErrors, GetHarnessPairingResponse, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeError, GetInitiativeErrors, GetInitiativeResponse, GetInitiativeResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMyChannelAccessRequestData, GetMyChannelAccessRequestError, GetMyChannelAccessRequestErrors, GetMyChannelAccessRequestResponse, GetMyChannelAccessRequestResponses, GetMyFormResponseData, GetMyFormResponseError, GetMyFormResponseErrors, GetMyFormResponseResponse, GetMyFormResponseResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessError, GetSelfHarnessErrors, GetSelfHarnessResponse, GetSelfHarnessResponses, GetSkillDescriptionData, GetSkillDescriptionError, GetSkillDescriptionErrors, GetSkillDescriptionResponse, GetSkillDescriptionResponses, GetSlackImportData, GetSlackImportErrors, GetSlackImportResponse, GetSlackImportResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerError, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponse, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubLabelFacet, GithubPullRequest, GithubPullRequestChangesPatchResponse, GithubPullRequestChangesResponse, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestFacets, GithubPullRequestLabel, GithubPullRequestReview, GithubPullRequestReviewDecision, GithubPullRequestReviewState, GithubPullRequestsResponse, GithubPullRequestTasks, GithubPullRequestTasksRequest, GithubPullRequestTasksResponse, GithubPullRequestUser, GithubRepositoryFacet, GithubUserFacet, GitRefDto, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, GuestCallChatPostData, GuestCallChatPostErrors, GuestCallChatPostResponse, GuestCallChatPostResponses, GuestCallChatReadData, GuestCallChatReadErrors, GuestCallChatReadResponse, GuestCallChatReadResponses, GuestChatMessage, GuestChatPage, GuestChatPost, GuestId, GuestJoinRequest, GuestPolicy, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, Harness, HarnessAgent, HarnessId, HarnessOwner, HarnessSession, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, ImportCounters, ImportDatabaseTableData, ImportDatabaseTableError, ImportDatabaseTableErrors, ImportDatabaseTableResponse, ImportDatabaseTableResponses, ImportedAuthor, ImportError, ImportLimits, ImportPage, ImportProgress, ImportTable, ImportWarning, InferColumnTypeOutcome, InferColumnTypeRequest, InferDatabaseColumnTypeData, InferDatabaseColumnTypeError, InferDatabaseColumnTypeErrors, InferDatabaseColumnTypeResponse, InferDatabaseColumnTypeResponses, InFlightTurnSummary, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InitialPropertyValue, InitiativeDetail, InitiativeFilters, InitiativeId, InitiativeList, InitiativeSummary, InputReceivedMetadata, InstallSyncData, InstallSyncErrors, InteractionReason, InvalidDatabaseWebhookPayloadResponse, InviteMeetingRequest, InviteMeetingUsersRequest, Item, ItemWithUserAccessLevel, JobId, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JobStatus, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, KeySegment, Lane, LaneKey, LatestMessage, LayoutProblem, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, LinkShare, ListAccessibleFormsData, ListAccessibleFormsError, ListAccessibleFormsErrors, ListAccessibleFormsResponse, ListAccessibleFormsResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListBotsData, ListBotsError, ListBotsErrors, ListBotsResponse, ListBotsResponses, ListBotTokensData, ListBotTokensError, ListBotTokensErrors, ListBotTokensResponse, ListBotTokensResponses, ListChannelBotsData, ListChannelBotsError, ListChannelBotsErrors, ListChannelBotsResponse, ListChannelBotsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmBlockedDomainsData, ListCrmBlockedDomainsError, ListCrmBlockedDomainsErrors, ListCrmBlockedDomainsResponse, ListCrmBlockedDomainsResponses, ListCrmPipelinesData, ListCrmPipelinesResponse, ListCrmPipelinesResponses, ListDatabaseColumnCastsData, ListDatabaseColumnCastsError, ListDatabaseColumnCastsErrors, ListDatabaseColumnCastsResponse, ListDatabaseColumnCastsResponses, ListDatabasesData, ListDatabasesError, ListDatabasesErrors, ListDatabasesResponse, ListDatabasesResponses, ListDatabaseWebhooksData, ListDatabaseWebhooksError, ListDatabaseWebhooksErrors, ListDatabaseWebhooksResponse, ListDatabaseWebhooksResponse2, ListDatabaseWebhooksResponses, ListedDatabase, ListedForm, ListEmailRemindersData, ListEmailRemindersError, ListEmailRemindersErrors, ListEmailRemindersResponse, ListEmailRemindersResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListFormsData, ListFormsError, ListFormsErrors, ListFormsResponse, ListFormsResponses, ListHarnessAgentsData, ListHarnessAgentsError, ListHarnessAgentsErrors, ListHarnessAgentsResponse, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesError, ListHarnessesErrors, ListHarnessesResponse, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsError, ListHarnessSessionsErrors, ListHarnessSessionsResponse, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesError, ListInitiativesErrors, ListInitiativesResponse, ListInitiativesResponses, ListJoinRequestsData, ListJoinRequestsError, ListJoinRequestsErrors, ListJoinRequestsResponse, ListJoinRequestsResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListSlackImportsData, ListSlackImportsResponse, ListSlackImportsResponses, ListTeamCalendarData, ListTeamCalendarResponse, ListTeamCalendarResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponse, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysError, ListUserApiKeysErrors, ListUserApiKeysResponse, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, MarkRead, Meeting, MeetingCancelData, MeetingCancelError, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationError, MeetingCancelPreparationErrors, MeetingCancelPreparationResponse, MeetingCancelPreparationResponses, MeetingCancelResponse, MeetingCancelResponses, MeetingCreateData, MeetingCreateError, MeetingCreateErrors, MeetingCreateResponse, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinError, MeetingGuestJoinErrors, MeetingGuestJoinResponse, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsError, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponse, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteError, MeetingInviteErrors, MeetingInvitePermissions, MeetingInvitePermissionsData, MeetingInvitePermissionsError, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponse, MeetingInvitePermissionsResponses, MeetingInviteResponse, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersError, MeetingInviteUsersErrors, MeetingInviteUsersResponse, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinError, MeetingJoinErrors, MeetingJoinResponse, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveError, MeetingLeaveErrors, MeetingLeaveResponse, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveError, MeetingListActiveErrors, MeetingListActiveResponse, MeetingListActiveResponses, MeetingListData, MeetingListError, MeetingListErrors, MeetingListResponse, MeetingListResponses, MeetingLookupData, MeetingLookupError, MeetingLookupErrors, MeetingLookupResponse, MeetingLookupResponses, MeetingParticipant, MeetingParticipants, MeetingParticipantsData, MeetingParticipantsError, MeetingParticipantsErrors, MeetingParticipantsResponse, MeetingParticipantsResponses, MeetingPreparation, MeetingPrepareData, MeetingPrepareError, MeetingPrepareErrors, MeetingPrepareResponse, MeetingPrepareResponses, MeetingShareData, MeetingShareError, MeetingShareErrors, MeetingShareResponse, MeetingShareResponses, MeetingsResponse, MeetingToken, MeetingUpdateData, MeetingUpdateError, MeetingUpdateErrors, MeetingUpdateResponse, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponse, MentionPreviewsResponses, Message, MessageAttachment, MessageAttachmentCreatedMetadata, MessageAttachmentRemovedMetadata, MessageChange, MessageCursor, MessageDeletedMetadata, MessageDirection, MessageEvent, MessageEventAttachment, MessageListItem, MessageMentionedMetadata, MessagePage, MessageParent, MessagePatch, MessagePatchedMetadata, MessagePostedMetadata, MessageThread, MessageThreadPreview, MessageTimelineData, MessageTimelineEntriesData, MessageTimelineEntriesResponse, MessageTimelineEntriesResponses, MessageTimelineEntry, MessageTimelinePage, MessageTimelineQuery, MessageTimelineResponse, MessageTimelineResponses, MessageTopicEvent, MyResponse, NewAttachment, NewColumn, NewOption, NewThreadAnchor, NewView, NotificationFilters, NotificationState, NumberOperator, OpBatch, Operator, OpRefusalResponse, OpResult, OptionId, OptionRef, PairingDetails, Params, ParticipantRole, PatchBotData, PatchBotError, PatchBotErrors, PatchBotRequest, PatchBotResponse, PatchBotResponses, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchHarnessData, PatchHarnessError, PatchHarnessErrors, PatchHarnessRequest, PatchHarnessResponse, PatchHarnessResponses, PatchMessageNotificationPolicy, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PendingClaimResponse, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, Pipeline, PipelineRecordType, PipelineSharing, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessage, PostMessageNotificationPolicy, PostSoupAstRequest, PostSoupRequest, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresenceOperator, PresignedUrl, PreviewSmartTagData, PreviewSmartTagError, PreviewSmartTagErrors, PreviewSmartTagResponse, PreviewSmartTagResponses, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyBucketing, PropertyDateFilterRange, PropertyDateRange, PropertyDateRanges, PropertyDefinition, PropertyDefinitionWithOptions, PropertyFilter, PropertyInput, PropertyOption, PropertyOptionValue, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesError, PutCrmTeamStagesErrors, PutCrmTeamStagesResponse, PutCrmTeamStagesResponses, PutFormLayoutData, PutFormLayoutError, PutFormLayoutErrors, PutFormLayoutResponse, PutFormLayoutResponses, QueryCrmPipelineRowsData, QueryCrmPipelineRowsResponse, QueryCrmPipelineRowsResponses, QueryDatabasesData, QueryDatabasesError, QueryDatabasesErrors, QueryDatabasesResponse, QueryDatabasesResponses, QueryDefinition, QuestionLayout, QuestionOption, QuestionTally, ReactionInput, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, RegisterSlackImportUploadsData, RegisterSlackImportUploadsErrors, RegisterSlackImportUploadsResponse, RegisterSlackImportUploadsResponses, RegisterUploads, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelError, RenameChannelLabelErrors, RenameChannelLabelRequest, RenameChannelLabelResponse, RenameChannelLabelResponses, RenameCrmPipelineData, RenameCrmPipelineResponse, RenameCrmPipelineResponses, RenamePipeline, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ReplaceCrmStagesRequest, RequestAccess, RequestChannelAccessData, RequestChannelAccessError, RequestChannelAccessErrors, RequestChannelAccessResponse, RequestChannelAccessResponses, RequestedLayout, RequestStatus, RequestToJoinData, RequestToJoinError, RequestToJoinErrors, RequestToJoinResponse, RequestToJoinResponses, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, ResolveChannelAccessRequest, ResolveChannelAccessRequestData, ResolveChannelAccessRequestError, ResolveChannelAccessRequestErrors, ResolveChannelAccessRequestResponse, ResolveChannelAccessRequestResponses, ResolveRequest, ResponseStatus, ResponseSummary, ResultColumn, ResultSet, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RevokeBotTokenData, RevokeBotTokenError, RevokeBotTokenErrors, RevokeBotTokenResponse, RevokeBotTokenResponses, RingStatus, RingStatusResponse, RowChange, RowChangeKind, RowChanges, RowHistoryEntry, RowHistoryResponse, RowId, RowsChange, RowsResult, S3ObjectInfo, SaveBomPart, SaveDatabaseQueryData, SaveDatabaseQueryError, SaveDatabaseQueryErrors, SaveDatabaseQueryResponse, SaveDatabaseQueryResponses, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SavedQuery, SaveQueryRequest, SearchContactsData, SearchContactsError, SearchContactsErrors, SearchContactsResponse, SearchContactsResponse2, SearchContactsResponses, SearchState, SectionCount, SessionDeletedMetadata, SessionIdentity, SessionMentionedMetadata, SessionOpenedMetadata, SessionRenamedMetadata, SessionSettledMetadata, SessionSource, SessionStoppedMetadata, SetChannelLabelData, SetChannelLabelError, SetChannelLabelErrors, SetChannelLabelRequest, SetChannelLabelResponse, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureError, SetChannelPictureErrors, SetChannelPictureRequest, SetChannelPictureResponse, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetCrmPipelineStageRequirementData, SetCrmPipelineStageRequirementResponse, SetCrmPipelineStageRequirementResponses, SetDirectAccess, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupError, SetEmailFollowupErrors, SetEmailFollowupResponse, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetOperator, SetPropertyValue, SetSkillDescriptionData, SetSkillDescriptionError, SetSkillDescriptionErrors, SetSkillDescriptionRequest, SetSkillDescriptionResponse, SetSkillDescriptionResponses, Sha256Digest, ShareCrmPipelineData, ShareCrmPipelineResponse, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessError, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponse, ShareDatabaseAwarenessResponses, SharedEmailFilter, SharedExternalChatReference, ShareEntity, ShareEntityType, SharePermissionV2, SharePipeline, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SkillDescriptionBody, SkippedCell, SlackCompleteRequest, SlackCreateRequest, SlackRegisterRequest, SlackTimestamp, SlackUserId, SmartTagChannelMatch, SmartTagPreview, SortDirection, SortKey, SoupAgentSessionSoupPropertiesField, SoupApiItem, SoupApiSort, SoupApiSortDirection, SoupAttachment, SoupCalendarEventSoupPropertiesField, SoupCalendarEventTime, SoupCallRecordGuest, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmContactSoupPropertiesField, SoupCrmDomain, SoupDatabaseRowSoupPropertiesField, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupInitiativeSoupPropertiesField, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupThreadInfo, SoupThreadReply, SourceBinding, SourceId, SourceIdentity, SqlCell, SqlEntityKind, SqlOutcome, SqlOutcomeKind, SqlSelectOption, SqlStatement, StageRequirement, StarterDatabase, StarterDocumentsResponse, StorageRow, StorageRows, StorageRowsQuery, StoredGithubPullRequest, StreamEventsData, StreamEventsError, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, String, Submission, SubmissionOutcome, SubmitFormResponseData, SubmitFormResponseError, SubmitFormResponseErrors, SubmitFormResponseResponse, SubmitFormResponseResponses, SuccessResponse, SurfaceState, SyncServiceVersionId, SystemSkillSummary, Table, TableChange, TableChanged, TableChanges, TableDetail, TableId, TableResult, TableVersion, TagFilterMode, TakenId, TallyBucket, TallyValue, TaskFilters, TaskSimilarityResult, TaskSimilaritySearchHandlerData, TaskSimilaritySearchHandlerError, TaskSimilaritySearchHandlerErrors, TaskSimilaritySearchHandlerResponse, TaskSimilaritySearchHandlerResponses, TaskSimilaritySearchRequest, TaskSimilaritySearchResponse, TeamCalendarContent, TeamCalendarCoverage, TeamCalendarDetails, TeamCalendarItem, TeamCalendarMember, TeamCalendarPage, TeamCalendarSharing, TeamOutOfOfficeItem, TeamOutOfOfficeResponse, TeamRole, TextOperator, ThreadAnchor, ThreadOrigin, ThreadPatch, ThreadState, TimelineActivity, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TouchedColumn, TouchedRow, TranscribeDictationData, TranscribeDictationError, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeResponse, TranscriptSegmentRequest, TrashCrmPipelineData, TrashCrmPipelineResponse, TrashCrmPipelineResponses, TrashPipeline, TurnEndedMetadata, TurnStartedMetadata, TurnSummary, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingInput, UnblockCrmDomainData, UnblockCrmDomainError, UnblockCrmDomainErrors, UnblockCrmDomainResponse, UnblockCrmDomainResponses, UndoChangeResponse, UndoDatabaseChangeData, UndoDatabaseChangeError, UndoDatabaseChangeErrors, UndoDatabaseChangeResponse, UndoDatabaseChangeResponses, UndoOutcome, UndoRefusal, UnlockedBooking, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentRequest, UpdateAgentResponse, UpdateAgentResponses, UpdateChannelSharePermission, UpdateCrmPipelinePermissionsData, UpdateCrmPipelinePermissionsResponse, UpdateCrmPipelinePermissionsResponses, UpdateCrmTeamSettingsRequest, UpdateDatabasePermissionsData, UpdateDatabasePermissionsError, UpdateDatabasePermissionsErrors, UpdateDatabasePermissionsResponse, UpdateDatabasePermissionsResponses, UpdateForm, UpdateFormData, UpdateFormError, UpdateFormErrors, UpdateFormPermissionsData, UpdateFormPermissionsError, UpdateFormPermissionsErrors, UpdateFormPermissionsResponse, UpdateFormPermissionsResponses, UpdateFormResponse, UpdateFormResponses, UpdateInitiativeData, UpdateInitiativeError, UpdateInitiativeErrors, UpdateInitiativeRequest, UpdateInitiativeResponse, UpdateInitiativeResponses, UpdateMeetingRequest, UpdateOperation, UpdateSharePermissionRequestV2, UploadDescriptor, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFileData, UploadFileError, UploadFileErrors, UploadFileResponse, UploadFileResponse2, UploadFileResponses, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UploadGrant, UploadId, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserApiKeyId, UserApiKeyInfo, UserApiKeysList, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, VersionedTable, View, ViewChange, ViewColumn, ViewerCapabilities, ViewLayout, ViewPatch, ViewPosition, ViewPositionsResponse, ViewQuery, ViewResult, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WhatsAppAccount, WhatsappAccountData, WhatsappAccountResponse, WhatsappAccountResponses, WhatsAppAccountState, WhatsAppAccountView, WhatsappCancelPairingData, WhatsappCancelPairingResponse, WhatsappCancelPairingResponses, WhatsAppCannotAdd, WhatsAppChat, WhatsAppChats, WhatsappChatsData, WhatsappChatsResponse, WhatsappChatsResponses, WhatsAppConnect, WhatsappConnectData, WhatsappConnectResponse, WhatsappConnectResponses, WhatsAppDisconnect, WhatsappDisconnectData, WhatsAppDisconnectRequest, WhatsappDisconnectResponse, WhatsappDisconnectResponses, WhatsAppHistoryImport, WhatsappImportHistoryData, WhatsappImportHistoryResponse, WhatsappImportHistoryResponses, WhatsAppLookup, WhatsappLookupData, WhatsAppLookupRequest, WhatsappLookupResponse, WhatsappLookupResponses, WhatsAppLookupState, WhatsAppPairing, WhatsappPairingData, WhatsappPairingResponse, WhatsappPairingResponses, WhatsAppPairingState, WhatsAppPairState, WhatsappPasskeyData, WhatsappPasskeyResponse, WhatsappPasskeyResponses, WhatsappStartLookupData, WhatsappStartLookupResponse, WhatsappStartLookupResponses, Widget, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';+export type { AccentColor, AccessiblePipeline, AccessLevel, AccessRequest, AccessRequestsCancelData, AccessRequestsCancelErrors, AccessRequestsCancelResponses, AccessRequestsDirectData, AccessRequestsDirectErrors, AccessRequestsDirectResponse, AccessRequestsDirectResponses, AccessRequestsRemoveDirectData, AccessRequestsRemoveDirectErrors, AccessRequestsRemoveDirectResponses, AccessRequestsResolveData, AccessRequestsResolveErrors, AccessRequestsResolveResponse, AccessRequestsResolveResponses, AccessRequestsSetDirectData, AccessRequestsSetDirectErrors, AccessRequestsSetDirectResponses, AccessRequestsStateData, AccessRequestsStateErrors, AccessRequestsStateResponse, AccessRequestsStateResponses, AccessRequestsSubmitData, AccessRequestsSubmitErrors, AccessRequestsSubmitResponse, AccessRequestsSubmitResponses, AccessRequestState, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddChannelBotData, AddChannelBotError, AddChannelBotErrors, AddChannelBotRequest, AddChannelBotResponse, AddChannelBotResponses, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentDmProfile, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionArchiveCause, AgentSessionFilters, AgentSessionLifecycleEvent, AgentSessionSource, AgentSessionVisibility, AgentTyping, AgentTypingPhase, AiAdmissionErrorBody, Anchor, AnchorId, AnchorResponse, AnnotationIncrementalUpdate, Answer, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentCommentReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelParticipant, ApiChannelWithLatest, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, AppliedOps, ApplyCrmPipelineOpsData, ApplyCrmPipelineOpsResponse, ApplyCrmPipelineOpsResponses, ApplyDatabaseOpsData, ApplyDatabaseOpsError, ApplyDatabaseOpsErrors, ApplyDatabaseOpsResponse, ApplyDatabaseOpsResponses, ApplyOpsRequest, ApplyOpsResponse, ApproveHarnessPairingData, ApproveHarnessPairingError, ApproveHarnessPairingErrors, ApproveHarnessPairingResponse, ApproveHarnessPairingResponses, ApprovePairingRequest, AttachmentChange, AttendeeResponseStatus, Audience, Awareness, AwarenessRelay, BasicDocument, BasicDocumentSubType, BlockCrmDomainData, BlockCrmDomainError, BlockCrmDomainErrors, BlockCrmDomainResponse, BlockCrmDomainResponses, BomPart, BookingTarget, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotOwnerProfile, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarJoinRequest, CalendarJoinRequestApiError, CalendarJoinRequestErrorCode, CalendarJoinRequestsResponse, CalendarJoinRequestStatus, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarMentionViewerCopy, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallDiscussion, CallEntryStatus, CallFilters, CallProvider, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordSource, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, CancelChannelAccessRequestData, CancelChannelAccessRequestError, CancelChannelAccessRequestErrors, CancelChannelAccessRequestResponses, CancelSlackImportData, CancelSlackImportErrors, CancelSlackImportResponse, CancelSlackImportResponses, CardPosition, CastVerdict, CellValue, CellWrite, ChangedFileDto, ChangesetDto, ChangesetSourceDto, Channel, ChannelAccessDecision, ChannelAccessRequest, ChannelAccessRequestedMetadata, ChannelAccessRequestState, ChannelAccessRequestStatus, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelScopeSelection, ChannelLabelsList, ChannelMessage, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPictureChangedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollaborateFormData, CollaborateFormError, CollaborateFormErrors, CollaborateFormResponse, CollaborateFormResponses, CollabSurfaceResponse, CollabSurfaceTokenResponse, Column, ColumnCast, ColumnChange, ColumnChangeKind, ColumnConfig, ColumnConversion, ColumnConversionRequest, ColumnDetail, ColumnId, ColumnKind, ColumnProtection, ColumnResult, CommandFailure, CommandRejectedMetadata, CommittedChange, CompleteSlackImportUploadsData, CompleteSlackImportUploadsErrors, CompleteSlackImportUploadsResponse, CompleteSlackImportUploadsResponses, CompleteUploads, ConferenceProvider, Conjunction, ConversationId, ConversationKind, ConversationMetadata, ConversationProgress, ConversationSeal, ConversationStatus, ConvertDatabaseColumnData, ConvertDatabaseColumnError, ConvertDatabaseColumnErrors, ConvertDatabaseColumnResponse, ConvertDatabaseColumnResponses, ConvertedCell, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CountedReaction, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentRequest, CreateAgentResponse, CreateAgentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBotData, CreateBotError, CreateBotErrors, CreateBotRequest, CreateBotResponse, CreateBotResponses, CreateBotTokenData, CreateBotTokenError, CreateBotTokenErrors, CreateBotTokenRequest, CreateBotTokenResponse, CreateBotTokenResponse2, CreateBotTokenResponses, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateCanvasDocumentRequest, CreateCanvasDocumentResponse, CreateCanvasHandlerData, CreateCanvasHandlerError, CreateCanvasHandlerErrors, CreateCanvasHandlerResponse, CreateCanvasHandlerResponses, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelError, CreateChannelLabelErrors, CreateChannelLabelRequest, CreateChannelLabelResponse, CreateChannelLabelResponses, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenError, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponse, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateCrmPipelineData, CreateCrmPipelineResponse, CreateCrmPipelineResponses, CreateCrmTeamContactData, CreateCrmTeamContactError, CreateCrmTeamContactErrors, CreateCrmTeamContactRequest, CreateCrmTeamContactResponse, CreateCrmTeamContactResponses, CreateDatabaseData, CreateDatabaseError, CreateDatabaseErrors, CreateDatabaseRequest, CreateDatabaseResponse, CreateDatabaseResponses, CreateDatabaseWebhookData, CreateDatabaseWebhookError, CreateDatabaseWebhookErrors, CreateDatabaseWebhookRequest, CreateDatabaseWebhookResponse, CreateDatabaseWebhookResponses, CreatedDatabaseWebhookResponse, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreatedPairing, CreatedUserApiKey, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateForm, CreateFormData, CreateFormError, CreateFormErrors, CreateFormResponse, CreateFormResponses, CreateHarnessPairingData, CreateHarnessPairingError, CreateHarnessPairingErrors, CreateHarnessPairingResponse, CreateHarnessPairingResponses, CreateImport, CreateInitiativeData, CreateInitiativeError, CreateInitiativeErrors, CreateInitiativeRequest, CreateInitiativeResponse, CreateInitiativeResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateMeetingRequest, CreatePairingRequest, CreatePipeline, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateSkillHandlerData, CreateSkillHandlerError, CreateSkillHandlerErrors, CreateSkillHandlerResponse, CreateSkillHandlerResponses, CreateSkillRequest, CreateSkillResponse, CreateSlackImportData, CreateSlackImportErrors, CreateSlackImportResponse, CreateSlackImportResponses, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateToken, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateUserApiKeyData, CreateUserApiKeyError, CreateUserApiKeyErrors, CreateUserApiKeyRequest, CreateUserApiKeyResponse, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmAssociation, CrmBlockedDomainResponse, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CustomSpeakerAssignment, Database, DatabaseDetail, DatabaseId, DatabaseOp, DatabaseQueryRequest, DatabaseView, DatabaseWebhookDeliveryResponse, DatabaseWebhookPayloadProblem, DatabaseWebhookResponse, DataType, DateOperator, DateRange, DateRangeOperator, DeclineCallData, DeclineCallError, DeclineCallErrors, DeclineCallResponse, DeclineCallResponses, DeclineRingData, DeclineRingError, DeclineRingErrors, DeclineRingResponse, DeclineRingResponses, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorResponse, DeleteAnchorResponses, DeleteBotData, DeleteBotError, DeleteBotErrors, DeleteBotResponse, DeleteBotResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelError, DeleteChannelLabelErrors, DeleteChannelLabelResponse, DeleteChannelLabelResponses, DeleteChannelResponse, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceError, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponse, DeleteCollabSurfaceResponses, DeleteDatabaseWebhookData, DeleteDatabaseWebhookError, DeleteDatabaseWebhookErrors, DeleteDatabaseWebhookResponse, DeleteDatabaseWebhookResponses, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessError, DeleteHarnessErrors, DeleteHarnessResponse, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeError, DeleteInitiativeErrors, DeleteInitiativeResponse, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteSelfHarnessData, DeleteSelfHarnessError, DeleteSelfHarnessErrors, DeleteSelfHarnessResponse, DeleteSelfHarnessResponses, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserApiKeyData, DeleteUserApiKeyError, DeleteUserApiKeyErrors, DeleteUserApiKeyResponse, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DeliverDatabaseWebhookData, DeliverDatabaseWebhookError, DeliverDatabaseWebhookErrors, DeliverDatabaseWebhookResponse, DeliverDatabaseWebhookResponses, DirectAccess, DocumentAiEdited, DocumentAiEditFailed, DocumentAiEditFailedCode, DocumentAiEditRefused, DocumentAiEditRefusedCode, DocumentAiEditRequest, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentId, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentSyncEditor, DocumentTeamShareResponse, DocumentTextContent, DocumentTopicEvent, DocumentUpdatedMetadata, DuplicateDatabaseData, DuplicateDatabaseError, DuplicateDatabaseErrors, DuplicateDatabaseRequest, DuplicateDatabaseResponse, DuplicateDatabaseResponses, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditDocumentWithAiData, EditDocumentWithAiError, EditDocumentWithAiErrors, EditDocumentWithAiResponse, EditDocumentWithAiResponses, EditMyFormResponseData, EditMyFormResponseError, EditMyFormResponseErrors, EditMyFormResponseResponse, EditMyFormResponseResponses, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmailFollowup, EmailFollowupCommand, EmailFollowupResponse, EmailReminderCondition, EmailReminderPage, EmailReminderSummary, EmptyResponse, EnsureCollabSurfaceData, EnsureCollabSurfaceError, EnsureCollabSurfaceErrors, EnsureCollabSurfaceRequest, EnsureCollabSurfaceResponse, EnsureCollabSurfaceResponses, EnsureStarterHandlerData, EnsureStarterHandlerErrors, EnsureStarterHandlerResponse, EnsureStarterHandlerResponses, EntityFilters, EntityKind, EntityMessageCreateData, EntityMessageCreateResponse, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponse, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponse, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponse, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponse, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponse, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponse, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponse, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponse, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponse, EntityMessageTypingResponses, EntityPermission, EntityPermissionResponse, EntityRef, EntityReference, EntityType, ErrorResponse, EventIcsData, EventIcsErrors, EventIcsResponse, EventIcsResponses, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, ExternalChatAdd, ExternalChatAddData, ExternalChatAdded, ExternalChatAddResponse, ExternalChatAddResponses, ExternalChatAttachment, ExternalChatAttachmentState, ExternalChatBackfill, ExternalChatBackfillState, ExternalChatCall, ExternalChatCallOutcome, ExternalChatCapabilities, ExternalChatCommunity, ExternalChatContactCard, ExternalChatContacts, ExternalChatData, ExternalChatDeliveryData, ExternalChatDeliveryResponse, ExternalChatDeliveryResponses, ExternalChatDeliveryState, ExternalChatDetail, ExternalChatEvent, ExternalChatKind, ExternalChatLocation, ExternalChatMediaKind, ExternalChatMediaPresentation, ExternalChatMembers, ExternalChatMention, ExternalChatMessage, ExternalChatMessageAttachments, ExternalChatMessageAttachmentsData, ExternalChatMessageAttachmentsResponse, ExternalChatMessageAttachmentsResponses, ExternalChatMessageData, ExternalChatMessageKind, ExternalChatMessageResponse, ExternalChatMessageResponses, ExternalChatMessages, ExternalChatMessagesData, ExternalChatMessagesResponse, ExternalChatMessagesResponses, ExternalChatMutation, ExternalChatParticipant, ExternalChatPermissionsData, ExternalChatPermissionsResponse, ExternalChatPermissionsResponses, ExternalChatPersonRef, ExternalChatPoll, ExternalChatPollOption, ExternalChatProvider, ExternalChatReaction, ExternalChatReadData, ExternalChatReadResponse, ExternalChatReadResponses, ExternalChatReference, ExternalChatRemoveData, ExternalChatRemoveResponse, ExternalChatRemoveResponses, ExternalChatReplyBlock, ExternalChatReplyContent, ExternalChatResponse, ExternalChatResponses, ExternalChatRichContent, ExternalChatsData, ExternalChatSendData, ExternalChatSender, ExternalChatSendErrors, ExternalChatSendProgress, ExternalChatSendReply, ExternalChatSendResponse, ExternalChatSendResponses, ExternalChatSendsData, ExternalChatSendsResponse, ExternalChatSendsResponses, ExternalChatsResponse, ExternalChatsResponses, ExternalChatSummary, ExternalChatSystemAction, ExternalChatSystemLine, ExternalChatUpdatePermissionsData, ExternalChatUpdatePermissionsResponse, ExternalChatUpdatePermissionsResponses, ExternalChatUploadData, ExternalChatUploadedAttachment, ExternalChatUploadRequest, ExternalChatUploadResponse, ExternalChatUploadResponses, Favorite, FavoriteEntityRef, FavoritesList, FileChangeKindDto, FileSystemNodeWithIds, FileType, FileTypeUpdate, FilterCondition, FilterGroup, FilterNode, FilterTest, FinalizeSlackImportData, FinalizeSlackImportErrors, FinalizeSlackImportResponse, FinalizeSlackImportResponses, FolderItem, FollowupState, ForeignEntity, ForeignEntityFilters, Form, FormAccess, FormBranding, FormCollaboration, FormDetail, FormErrorCode, FormErrorResponse, FormLayout, FormPublicationProblem, FormQuestionDetail, FormResponse, FormSection, FormSectionDetail, FormSource, FormStatus, FormTally, Formula, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActiveCallsData, GetActiveCallsError, GetActiveCallsErrors, GetActiveCallsResponse, GetActiveCallsResponses, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetBotData, GetBotError, GetBotErrors, GetBotOwnerProfilesData, GetBotOwnerProfilesError, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponse, GetBotOwnerProfilesResponses, GetBotResponse, GetBotResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAccessRequestData, GetChannelAccessRequestError, GetChannelAccessRequestErrors, GetChannelAccessRequestResponse, GetChannelAccessRequestResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceError, GetCollabSurfaceErrors, GetCollabSurfaceResponse, GetCollabSurfaceResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactByEmailData, GetContactByEmailError, GetContactByEmailErrors, GetContactByEmailResponse, GetContactByEmailResponse2, GetContactByEmailResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmPipelineData, GetCrmPipelinePermissionsData, GetCrmPipelinePermissionsResponse, GetCrmPipelinePermissionsResponses, GetCrmPipelineResponse, GetCrmPipelineResponses, GetCrmPipelineRowsData, GetCrmPipelineRowsResponse, GetCrmPipelineRowsResponses, GetCrmPipelineStageRequirementsData, GetCrmPipelineStageRequirementsResponse, GetCrmPipelineStageRequirementsResponses, GetCrmPipelineTableData, GetCrmPipelineTableResponse, GetCrmPipelineTableResponses, GetCrmPipelineViewPositionsData, GetCrmPipelineViewPositionsResponse, GetCrmPipelineViewPositionsResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDatabaseData, GetDatabaseError, GetDatabaseErrors, GetDatabasePermissionsData, GetDatabasePermissionsError, GetDatabasePermissionsErrors, GetDatabasePermissionsResponse, GetDatabasePermissionsResponses, GetDatabaseQueryData, GetDatabaseQueryError, GetDatabaseQueryErrors, GetDatabaseQueryResponse, GetDatabaseQueryResponses, GetDatabaseResponse, GetDatabaseResponses, GetDatabaseRowHistoryData, GetDatabaseRowHistoryError, GetDatabaseRowHistoryErrors, GetDatabaseRowHistoryResponse, GetDatabaseRowHistoryResponses, GetDatabaseTableChangesData, GetDatabaseTableChangesError, GetDatabaseTableChangesErrors, GetDatabaseTableChangesResponse, GetDatabaseTableChangesResponses, GetDatabaseViewPositionsData, GetDatabaseViewPositionsError, GetDatabaseViewPositionsErrors, GetDatabaseViewPositionsResponse, GetDatabaseViewPositionsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentTextContentData, GetDocumentTextContentErrors, GetDocumentTextContentResponse, GetDocumentTextContentResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupError, GetEmailFollowupErrors, GetEmailFollowupResponse, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceError, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponse, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetFormData, GetFormError, GetFormErrors, GetFormPermissionsData, GetFormPermissionsError, GetFormPermissionsErrors, GetFormPermissionsResponse, GetFormPermissionsResponses, GetFormResponse, GetFormResponses, GetFormResponseSummaryData, GetFormResponseSummaryError, GetFormResponseSummaryErrors, GetFormResponseSummaryResponse, GetFormResponseSummaryResponses, GetFormTallyData, GetFormTallyError, GetFormTallyErrors, GetFormTallyResponse, GetFormTallyResponses, GetGithubPullRequestChangesData, GetGithubPullRequestChangesError, GetGithubPullRequestChangesErrors, GetGithubPullRequestChangesPatchData, GetGithubPullRequestChangesPatchError, GetGithubPullRequestChangesPatchErrors, GetGithubPullRequestChangesPatchResponse, GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesResponse, GetGithubPullRequestChangesResponses, GetGithubPullRequestData, GetGithubPullRequestError, GetGithubPullRequestErrors, GetGithubPullRequestFacetsData, GetGithubPullRequestFacetsError, GetGithubPullRequestFacetsErrors, GetGithubPullRequestFacetsResponse, GetGithubPullRequestFacetsResponses, GetGithubPullRequestResponse, GetGithubPullRequestResponses, GetGithubPullRequestTasksData, GetGithubPullRequestTasksError, GetGithubPullRequestTasksErrors, GetGithubPullRequestTasksResponse, GetGithubPullRequestTasksResponses, GetHarnessPairingData, GetHarnessPairingError, GetHarnessPairingErrors, GetHarnessPairingResponse, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeError, GetInitiativeErrors, GetInitiativeResponse, GetInitiativeResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMyChannelAccessRequestData, GetMyChannelAccessRequestError, GetMyChannelAccessRequestErrors, GetMyChannelAccessRequestResponse, GetMyChannelAccessRequestResponses, GetMyFormResponseData, GetMyFormResponseError, GetMyFormResponseErrors, GetMyFormResponseResponse, GetMyFormResponseResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessError, GetSelfHarnessErrors, GetSelfHarnessResponse, GetSelfHarnessResponses, GetSkillDescriptionData, GetSkillDescriptionError, GetSkillDescriptionErrors, GetSkillDescriptionResponse, GetSkillDescriptionResponses, GetSlackImportData, GetSlackImportErrors, GetSlackImportResponse, GetSlackImportResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerError, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponse, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubLabelFacet, GithubPullRequest, GithubPullRequestChangesPatchResponse, GithubPullRequestChangesResponse, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestFacets, GithubPullRequestLabel, GithubPullRequestReview, GithubPullRequestReviewDecision, GithubPullRequestReviewState, GithubPullRequestsResponse, GithubPullRequestTasks, GithubPullRequestTasksRequest, GithubPullRequestTasksResponse, GithubPullRequestUser, GithubRepositoryFacet, GithubUserFacet, GitRefDto, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, GuestCallChatPostData, GuestCallChatPostErrors, GuestCallChatPostResponse, GuestCallChatPostResponses, GuestCallChatReadData, GuestCallChatReadErrors, GuestCallChatReadResponse, GuestCallChatReadResponses, GuestChatMessage, GuestChatPage, GuestChatPost, GuestId, GuestJoinRequest, GuestPolicy, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, Harness, HarnessAgent, HarnessId, HarnessOwner, HarnessSession, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, ImportCounters, ImportDatabaseTableData, ImportDatabaseTableError, ImportDatabaseTableErrors, ImportDatabaseTableResponse, ImportDatabaseTableResponses, ImportedAuthor, ImportError, ImportLimits, ImportPage, ImportProgress, ImportTable, ImportWarning, InferColumnTypeOutcome, InferColumnTypeRequest, InferDatabaseColumnTypeData, InferDatabaseColumnTypeError, InferDatabaseColumnTypeErrors, InferDatabaseColumnTypeResponse, InferDatabaseColumnTypeResponses, InFlightTurnSummary, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InitialPropertyValue, InitiativeDetail, InitiativeFilters, InitiativeId, InitiativeList, InitiativeSummary, InputReceivedMetadata, InstallSyncData, InstallSyncErrors, InteractionReason, InvalidDatabaseWebhookPayloadResponse, InviteMeetingRequest, InviteMeetingUsersRequest, Item, ItemWithUserAccessLevel, JobId, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JobStatus, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, KeySegment, Lane, LaneKey, LatestMessage, LayoutProblem, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, LinkShare, ListAccessibleFormsData, ListAccessibleFormsError, ListAccessibleFormsErrors, ListAccessibleFormsResponse, ListAccessibleFormsResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListBotsData, ListBotsError, ListBotsErrors, ListBotsResponse, ListBotsResponses, ListBotTokensData, ListBotTokensError, ListBotTokensErrors, ListBotTokensResponse, ListBotTokensResponses, ListChannelBotsData, ListChannelBotsError, ListChannelBotsErrors, ListChannelBotsResponse, ListChannelBotsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmBlockedDomainsData, ListCrmBlockedDomainsError, ListCrmBlockedDomainsErrors, ListCrmBlockedDomainsResponse, ListCrmBlockedDomainsResponses, ListCrmPipelinesData, ListCrmPipelinesResponse, ListCrmPipelinesResponses, ListDatabaseColumnCastsData, ListDatabaseColumnCastsError, ListDatabaseColumnCastsErrors, ListDatabaseColumnCastsResponse, ListDatabaseColumnCastsResponses, ListDatabasesData, ListDatabasesError, ListDatabasesErrors, ListDatabasesResponse, ListDatabasesResponses, ListDatabaseWebhooksData, ListDatabaseWebhooksError, ListDatabaseWebhooksErrors, ListDatabaseWebhooksResponse, ListDatabaseWebhooksResponse2, ListDatabaseWebhooksResponses, ListedDatabase, ListedForm, ListEmailRemindersData, ListEmailRemindersError, ListEmailRemindersErrors, ListEmailRemindersResponse, ListEmailRemindersResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListFormsData, ListFormsError, ListFormsErrors, ListFormsResponse, ListFormsResponses, ListHarnessAgentsData, ListHarnessAgentsError, ListHarnessAgentsErrors, ListHarnessAgentsResponse, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesError, ListHarnessesErrors, ListHarnessesResponse, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsError, ListHarnessSessionsErrors, ListHarnessSessionsResponse, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesError, ListInitiativesErrors, ListInitiativesResponse, ListInitiativesResponses, ListJoinRequestsData, ListJoinRequestsError, ListJoinRequestsErrors, ListJoinRequestsResponse, ListJoinRequestsResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListSlackImportsData, ListSlackImportsResponse, ListSlackImportsResponses, ListTeamCalendarData, ListTeamCalendarResponse, ListTeamCalendarResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponse, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysError, ListUserApiKeysErrors, ListUserApiKeysResponse, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, MarkRead, Meeting, MeetingCancelData, MeetingCancelError, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationError, MeetingCancelPreparationErrors, MeetingCancelPreparationResponse, MeetingCancelPreparationResponses, MeetingCancelResponse, MeetingCancelResponses, MeetingCreateData, MeetingCreateError, MeetingCreateErrors, MeetingCreateResponse, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinError, MeetingGuestJoinErrors, MeetingGuestJoinResponse, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsError, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponse, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteError, MeetingInviteErrors, MeetingInvitePermissions, MeetingInvitePermissionsData, MeetingInvitePermissionsError, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponse, MeetingInvitePermissionsResponses, MeetingInviteResponse, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersError, MeetingInviteUsersErrors, MeetingInviteUsersResponse, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinError, MeetingJoinErrors, MeetingJoinResponse, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveError, MeetingLeaveErrors, MeetingLeaveResponse, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveError, MeetingListActiveErrors, MeetingListActiveResponse, MeetingListActiveResponses, MeetingListData, MeetingListError, MeetingListErrors, MeetingListResponse, MeetingListResponses, MeetingLookupData, MeetingLookupError, MeetingLookupErrors, MeetingLookupResponse, MeetingLookupResponses, MeetingParticipant, MeetingParticipants, MeetingParticipantsData, MeetingParticipantsError, MeetingParticipantsErrors, MeetingParticipantsResponse, MeetingParticipantsResponses, MeetingPreparation, MeetingPrepareData, MeetingPrepareError, MeetingPrepareErrors, MeetingPrepareResponse, MeetingPrepareResponses, MeetingShareData, MeetingShareError, MeetingShareErrors, MeetingShareResponse, MeetingShareResponses, MeetingsResponse, MeetingToken, MeetingUpdateData, MeetingUpdateError, MeetingUpdateErrors, MeetingUpdateResponse, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponse, MentionPreviewsResponses, Message, MessageAttachment, MessageAttachmentCreatedMetadata, MessageAttachmentRemovedMetadata, MessageChange, MessageCursor, MessageDeletedMetadata, MessageDirection, MessageEvent, MessageEventAttachment, MessageKind, MessageListItem, MessageMentionedMetadata, MessagePage, MessageParent, MessagePatch, MessagePatchedMetadata, MessagePostedMetadata, MessageThread, MessageThreadPreview, MessageTimelineData, MessageTimelineEntriesData, MessageTimelineEntriesResponse, MessageTimelineEntriesResponses, MessageTimelineEntry, MessageTimelinePage, MessageTimelineQuery, MessageTimelineResponse, MessageTimelineResponses, MessageTopicEvent, MyResponse, NewAttachment, NewColumn, NewOption, NewThreadAnchor, NewView, NotificationFilters, NotificationState, NumberOperator, OpBatch, Operator, OpRefusalResponse, OpResult, OptionId, OptionRef, PairingDetails, Params, ParticipantRole, PatchBotData, PatchBotError, PatchBotErrors, PatchBotRequest, PatchBotResponse, PatchBotResponses, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchHarnessData, PatchHarnessError, PatchHarnessErrors, PatchHarnessRequest, PatchHarnessResponse, PatchHarnessResponses, PatchMessageNotificationPolicy, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PendingClaimResponse, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, Pipeline, PipelineRecordType, PipelineSharing, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessage, PostMessageNotificationPolicy, PostSoupAstRequest, PostSoupRequest, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresenceOperator, PresignedUrl, PreviewSmartTagData, PreviewSmartTagError, PreviewSmartTagErrors, PreviewSmartTagResponse, PreviewSmartTagResponses, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyBucketing, PropertyDateFilterRange, PropertyDateRange, PropertyDateRanges, PropertyDefinition, PropertyDefinitionWithOptions, PropertyFilter, PropertyInput, PropertyOption, PropertyOptionValue, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesError, PutCrmTeamStagesErrors, PutCrmTeamStagesResponse, PutCrmTeamStagesResponses, PutFormLayoutData, PutFormLayoutError, PutFormLayoutErrors, PutFormLayoutResponse, PutFormLayoutResponses, QueryCrmPipelineRowsData, QueryCrmPipelineRowsResponse, QueryCrmPipelineRowsResponses, QueryDatabasesData, QueryDatabasesError, QueryDatabasesErrors, QueryDatabasesResponse, QueryDatabasesResponses, QueryDefinition, QuestionLayout, QuestionOption, QuestionTally, ReactionInput, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, RegisterSlackImportUploadsData, RegisterSlackImportUploadsErrors, RegisterSlackImportUploadsResponse, RegisterSlackImportUploadsResponses, RegisterUploads, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelError, RenameChannelLabelErrors, RenameChannelLabelRequest, RenameChannelLabelResponse, RenameChannelLabelResponses, RenameCrmPipelineData, RenameCrmPipelineResponse, RenameCrmPipelineResponses, RenamePipeline, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ReplaceCrmStagesRequest, RequestAccess, RequestChannelAccessData, RequestChannelAccessError, RequestChannelAccessErrors, RequestChannelAccessResponse, RequestChannelAccessResponses, RequestedLayout, RequestStatus, RequestToJoinData, RequestToJoinError, RequestToJoinErrors, RequestToJoinResponse, RequestToJoinResponses, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, ResolveChannelAccessRequest, ResolveChannelAccessRequestData, ResolveChannelAccessRequestError, ResolveChannelAccessRequestErrors, ResolveChannelAccessRequestResponse, ResolveChannelAccessRequestResponses, ResolveRequest, ResponseStatus, ResponseSummary, ResultColumn, ResultSet, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RevokeBotTokenData, RevokeBotTokenError, RevokeBotTokenErrors, RevokeBotTokenResponse, RevokeBotTokenResponses, RingStatus, RingStatusResponse, RowChange, RowChangeKind, RowChanges, RowHistoryEntry, RowHistoryResponse, RowId, RowsChange, RowsResult, S3ObjectInfo, SaveBomPart, SaveDatabaseQueryData, SaveDatabaseQueryError, SaveDatabaseQueryErrors, SaveDatabaseQueryResponse, SaveDatabaseQueryResponses, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SavedQuery, SaveQueryRequest, SearchContactsData, SearchContactsError, SearchContactsErrors, SearchContactsResponse, SearchContactsResponse2, SearchContactsResponses, SearchState, SectionCount, SessionDeletedMetadata, SessionIdentity, SessionMentionedMetadata, SessionOpenedMetadata, SessionRenamedMetadata, SessionSettledMetadata, SessionSource, SessionStoppedMetadata, SetChannelLabelData, SetChannelLabelError, SetChannelLabelErrors, SetChannelLabelRequest, SetChannelLabelResponse, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureError, SetChannelPictureErrors, SetChannelPictureRequest, SetChannelPictureResponse, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetCrmPipelineStageRequirementData, SetCrmPipelineStageRequirementResponse, SetCrmPipelineStageRequirementResponses, SetDirectAccess, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupError, SetEmailFollowupErrors, SetEmailFollowupResponse, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetOperator, SetPropertyValue, SetSkillDescriptionData, SetSkillDescriptionError, SetSkillDescriptionErrors, SetSkillDescriptionRequest, SetSkillDescriptionResponse, SetSkillDescriptionResponses, Sha256Digest, ShareCrmPipelineData, ShareCrmPipelineResponse, ShareCrmPipelineResponses, ShareDatabaseAwarenessData, ShareDatabaseAwarenessError, ShareDatabaseAwarenessErrors, ShareDatabaseAwarenessResponse, ShareDatabaseAwarenessResponses, SharedEmailFilter, SharedExternalChatReference, ShareEntity, ShareEntityType, SharePermissionV2, SharePipeline, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SkillDescriptionBody, SkippedCell, SlackCompleteRequest, SlackCreateRequest, SlackRegisterRequest, SlackTimestamp, SlackUserId, SmartTagChannelMatch, SmartTagPreview, SortDirection, SortKey, SoupAgentSessionSoupPropertiesField, SoupApiItem, SoupApiSort, SoupApiSortDirection, SoupAttachment, SoupCalendarEventSoupPropertiesField, SoupCalendarEventTime, SoupCallRecordGuest, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmContactSoupPropertiesField, SoupCrmDomain, SoupDatabaseRowSoupPropertiesField, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupInitiativeSoupPropertiesField, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupThreadInfo, SoupThreadReply, SourceBinding, SourceId, SourceIdentity, SqlCell, SqlEntityKind, SqlOutcome, SqlOutcomeKind, SqlSelectOption, SqlStatement, StageRequirement, StarterDatabase, StarterDocumentsResponse, StorageRow, StorageRows, StorageRowsQuery, StoredGithubPullRequest, StreamEventsData, StreamEventsError, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, String, Submission, SubmissionOutcome, SubmitFormResponseData, SubmitFormResponseError, SubmitFormResponseErrors, SubmitFormResponseResponse, SubmitFormResponseResponses, SuccessResponse, SurfaceState, SyncServiceVersionId, SystemSkillSummary, Table, TableChange, TableChanged, TableChanges, TableDetail, TableId, TableResult, TableVersion, TagFilterMode, TakenId, TallyBucket, TallyValue, TaskFilters, TaskSimilarityResult, TaskSimilaritySearchHandlerData, TaskSimilaritySearchHandlerError, TaskSimilaritySearchHandlerErrors, TaskSimilaritySearchHandlerResponse, TaskSimilaritySearchHandlerResponses, TaskSimilaritySearchRequest, TaskSimilaritySearchResponse, TeamCalendarContent, TeamCalendarCoverage, TeamCalendarDetails, TeamCalendarItem, TeamCalendarMember, TeamCalendarPage, TeamCalendarSharing, TeamOutOfOfficeItem, TeamOutOfOfficeResponse, TeamRole, TextOperator, ThreadAnchor, ThreadOrigin, ThreadPatch, ThreadState, TimelineActivity, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TouchedColumn, TouchedRow, TranscribeDictationData, TranscribeDictationError, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeResponse, TranscriptSegmentRequest, TrashCrmPipelineData, TrashCrmPipelineResponse, TrashCrmPipelineResponses, TrashPipeline, TurnEndedMetadata, TurnStartedMetadata, TurnSummary, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingInput, UnblockCrmDomainData, UnblockCrmDomainError, UnblockCrmDomainErrors, UnblockCrmDomainResponse, UnblockCrmDomainResponses, UndoChangeResponse, UndoDatabaseChangeData, UndoDatabaseChangeError, UndoDatabaseChangeErrors, UndoDatabaseChangeResponse, UndoDatabaseChangeResponses, UndoOutcome, UndoRefusal, UnlockedBooking, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentRequest, UpdateAgentResponse, UpdateAgentResponses, UpdateChannelSharePermission, UpdateCrmPipelinePermissionsData, UpdateCrmPipelinePermissionsResponse, UpdateCrmPipelinePermissionsResponses, UpdateCrmTeamSettingsRequest, UpdateDatabasePermissionsData, UpdateDatabasePermissionsError, UpdateDatabasePermissionsErrors, UpdateDatabasePermissionsResponse, UpdateDatabasePermissionsResponses, UpdateForm, UpdateFormData, UpdateFormError, UpdateFormErrors, UpdateFormPermissionsData, UpdateFormPermissionsError, UpdateFormPermissionsErrors, UpdateFormPermissionsResponse, UpdateFormPermissionsResponses, UpdateFormResponse, UpdateFormResponses, UpdateInitiativeData, UpdateInitiativeError, UpdateInitiativeErrors, UpdateInitiativeRequest, UpdateInitiativeResponse, UpdateInitiativeResponses, UpdateMeetingRequest, UpdateOperation, UpdateSharePermissionRequestV2, UploadDescriptor, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFileData, UploadFileError, UploadFileErrors, UploadFileResponse, UploadFileResponse2, UploadFileResponses, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UploadGrant, UploadId, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserApiKeyId, UserApiKeyInfo, UserApiKeysList, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, VersionedTable, View, ViewChange, ViewColumn, ViewerCapabilities, ViewLayout, ViewPatch, ViewPosition, ViewPositionsResponse, ViewQuery, ViewResult, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WhatsAppAccount, WhatsappAccountData, WhatsappAccountResponse, WhatsappAccountResponses, WhatsAppAccountState, WhatsAppAccountView, WhatsappCancelPairingData, WhatsappCancelPairingResponse, WhatsappCancelPairingResponses, WhatsAppCannotAdd, WhatsAppChat, WhatsAppChats, WhatsappChatsData, WhatsappChatsResponse, WhatsappChatsResponses, WhatsAppConnect, WhatsappConnectData, WhatsappConnectResponse, WhatsappConnectResponses, WhatsAppDisconnect, WhatsappDisconnectData, WhatsAppDisconnectRequest, WhatsappDisconnectResponse, WhatsappDisconnectResponses, WhatsAppHistoryImport, WhatsappImportHistoryData, WhatsappImportHistoryResponse, WhatsappImportHistoryResponses, WhatsAppLookup, WhatsappLookupData, WhatsAppLookupRequest, WhatsappLookupResponse, WhatsappLookupResponses, WhatsAppLookupState, WhatsAppPairing, WhatsappPairingData, WhatsappPairingResponse, WhatsappPairingResponses, WhatsAppPairingState, WhatsAppPairState, WhatsappPasskeyData, WhatsappPasskeyResponse, WhatsappPasskeyResponses, WhatsappStartLookupData, WhatsappStartLookupResponse, WhatsappStartLookupResponses, Widget, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.tsindex 81960d67ac..6696e12272 100644--- a/packages/sdk/generated/storage/types.gen.ts+++ b/packages/sdk/generated/storage/types.gen.ts@@ -2120,6 +2120,47 @@ export type CallActiveResponse = {createdBy: string;};+/**+ * Where a call's discussion lives, decided once when the call is created.+ * `channel_id` cannot decide this: past channel calls keep their own thread.+ */+export type CallDiscussion = {+ /**+ * The channel holding the thread.+ */+ channel_id: string;+ kind: 'channel_thread';+ /**+ * The thread's root message.+ */+ root_id: string;+} | {+ /**+ * The call owning the thread.+ */+ call_id: string;+ kind: 'call_chat';+};++/**+ * A channel call's life, as its timeline row shows it.+ */+export type CallEntryStatus = {+ state: 'live';+} | {+ /**+ * How long it lasted.+ */+ duration_ms: number;+ /**+ * When it ended.+ */+ ended_at: string;+ state: 'ended';+} | {+ state: 'record_deleted';+};+/*** Filters for call records.*/@@ -2177,6 +2218,10 @@ export type CallRecord = {* archived `call_records`; active calls always return `None`.*/customName?: string | null;+ /**+ * Where this call's discussion lives.+ */+ discussion: CallDiscussion;/*** Call duration in milliseconds (None if still active).*/@@ -10393,6 +10438,10 @@ export type Message = {*/id: string;imported_author?: null | ImportedAuthor;+ /**+ * What this message is.+ */+ kind?: MessageKind;/*** Tracked mentions, retained when a caller changes attachments only.*/@@ -10573,6 +10622,12 @@ export type MessageChange = {*/message: Message;type: 'reaction_changed';+} | {+ /**+ * Persisted root.+ */+ message: Message;+ type: 'call_root_posted';} | {/*** Persisted thread state.@@ -10685,6 +10740,11 @@ export type MessageEventAttachment = {entity_type: string;};+/**+ * What a persisted message is. Set by the server, never by a client.+ */+export type MessageKind = 'message' | 'call_root';+/*** Root message with its small thread preview, independent of its parent type.*/@@ -10949,6 +11009,16 @@ export type MessageTimelineEntry = {*/activity: TimelineActivity;type: 'activity';+} | {+ /**+ * The call's root message, its thread state and its reply preview.+ */+ message: MessageListItem;+ /**+ * Where the call is in its life.+ */+ status: CallEntryStatus;+ type: 'call';};/**diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.jsonindex ad5f14e9f2..1d1c2d9822 100644--- a/packages/sdk/specs/storage.json+++ b/packages/sdk/specs/storage.json@@ -24560,6 +24560,96 @@}}},+ "CallDiscussion": {+ "oneOf": [+ {+ "type": "object",+ "description": "A thread in the call's channel, rooted at the message with the call's id.",+ "required": ["channel_id", "root_id", "kind"],+ "properties": {+ "channel_id": {+ "type": "string",+ "format": "uuid",+ "description": "The channel holding the thread."+ },+ "kind": {+ "type": "string",+ "enum": ["channel_thread"]+ },+ "root_id": {+ "type": "string",+ "format": "uuid",+ "description": "The thread's root message."+ }+ }+ },+ {+ "type": "object",+ "description": "The call's own thread on the call parent.",+ "required": ["call_id", "kind"],+ "properties": {+ "call_id": {+ "type": "string",+ "format": "uuid",+ "description": "The call owning the thread."+ },+ "kind": {+ "type": "string",+ "enum": ["call_chat"]+ }+ }+ }+ ],+ "description": "Where a call's discussion lives, decided once when the call is created.\n`channel_id` cannot decide this: past channel calls keep their own thread."+ },+ "CallEntryStatus": {+ "oneOf": [+ {+ "type": "object",+ "description": "The call has not ended.",+ "required": ["state"],+ "properties": {+ "state": {+ "type": "string",+ "enum": ["live"]+ }+ }+ },+ {+ "type": "object",+ "description": "The call ended.",+ "required": ["ended_at", "duration_ms", "state"],+ "properties": {+ "duration_ms": {+ "type": "integer",+ "format": "int64",+ "description": "How long it lasted."+ },+ "ended_at": {+ "type": "string",+ "format": "date-time",+ "description": "When it ended."+ },+ "state": {+ "type": "string",+ "enum": ["ended"]+ }+ }+ },+ {+ "type": "object",+ "description": "The call's record was deleted; its discussion stays in the channel.",+ "required": ["state"],+ "properties": {+ "state": {+ "type": "string",+ "enum": ["record_deleted"]+ }+ }+ }+ ],+ "description": "A channel call's life, as its timeline row shows it."+ },"CallFilters": {"type": "object","description": "Filters for call records.",@@ -24612,6 +24702,7 @@"description": "Full record of a call, unifying rows from `calls` (active) and\n`call_records` (archived) into a single response shape.","required": ["callId",+ "discussion","createdBy","startedAt","shareWithTeam",@@ -24643,6 +24734,10 @@"type": ["string", "null"],"description": "User-supplied or AI-generated display name for the call. Only set on\narchived `call_records`; active calls always return `None`."},+ "discussion": {+ "$ref": "#/components/schemas/CallDiscussion",+ "description": "Where this call's discussion lives."+ },"durationMs": {"type": ["integer", "null"],"format": "int64",@@ -37457,6 +37552,10 @@}]},+ "kind": {+ "$ref": "#/components/schemas/MessageKind",+ "description": "What this message is."+ },"mentions": {"type": "array","items": {@@ -37713,6 +37812,21 @@}}},+ {+ "type": "object",+ "description": "A channel call's thread root was created. It stands for the call, so it\nreaches viewers and moves the channel up without any of what a post\ncauses: no notifications, agents, routines, webhooks or search documents.",+ "required": ["message", "type"],+ "properties": {+ "message": {+ "$ref": "#/components/schemas/Message",+ "description": "Persisted root."+ },+ "type": {+ "type": "string",+ "enum": ["call_root_posted"]+ }+ }+ },{"type": "object","description": "Thread resolution, placement, or deletion changed.",@@ -37867,6 +37981,11 @@}}},+ "MessageKind": {+ "type": "string",+ "description": "What a persisted message is. Set by the server, never by a client.",+ "enum": ["message", "call_root"]+ },"MessageListItem": {"allOf": [{@@ -38307,6 +38426,25 @@"enum": ["activity"]}}+ },+ {+ "type": "object",+ "description": "A channel call and its thread. The root message's id is the call id.",+ "required": ["message", "status", "type"],+ "properties": {+ "message": {+ "$ref": "#/components/schemas/MessageListItem",+ "description": "The call's root message, its thread state and its reply preview."+ },+ "status": {+ "$ref": "#/components/schemas/CallEntryStatus",+ "description": "Where the call is in its life."+ },+ "type": {+ "type": "string",+ "enum": ["call"]+ }+ }}],"description": "One chronological entry in a parent's timeline."diff --git a/services/document_storage_service/AGENTS.md b/services/document_storage_service/AGENTS.mdindex c4d019a980..35c800f106 100644--- a/services/document_storage_service/AGENTS.md+++ b/services/document_storage_service/AGENTS.md@@ -86,6 +86,9 @@ threads, pins, recents, notifications, folders, activity.## Gotchas+- Provision required `POSTHOG_API_KEY` before startup; `enable-call-channel-thread`+ evaluation has a 300 ms timeout and keeps the call's own chat on failure.+- Compose Soup without a separate property-definition reader; REST and GraphQL validate DATE range inputs before calling the service.- Several behaviors are Cargo-feature-gated (`connection_gateway`,diff --git a/services/document_storage_service/Cargo.toml b/services/document_storage_service/Cargo.tomlindex 7b95259310..3d727efa4d 100644--- a/services/document_storage_service/Cargo.toml+++ b/services/document_storage_service/Cargo.toml@@ -85,6 +85,7 @@ bzip2 = { workspace = true, default-features = false, features = [] }cal = { path = "../../crates/cal", features = ["axum", "outbound"] }call = { path = "../../crates/call" }+feature_flags = { path = "../../crates/feature_flags" }channel_bots = { path = "../../crates/channel_bots" }messages = { path = "../../crates/messages", features = ["annotations", "broker", "delivery", "inbound"] }channels = { path = "../../crates/channels", features = [diff --git a/services/document_storage_service/src/api/swagger.rs b/services/document_storage_service/src/api/swagger.rsindex 27197674ee..2dbb24a1ce 100644--- a/services/document_storage_service/src/api/swagger.rs+++ b/services/document_storage_service/src/api/swagger.rs@@ -898,6 +898,9 @@ use utoipa::OpenApi;messages::domain::ports::MessagePage,messages::domain::ports::MessageTimelinePage,messages::domain::ports::MessageTimelineEntry,+ messages::domain::ports::CallEntryStatus,+ messages::domain::models::MessageKind,+ call::domain::models::CallDiscussion,messages::domain::ports::MessagePatch,messages::domain::ports::AttachmentChange,messages::domain::ports::MessageEvent,diff --git a/services/document_storage_service/src/config.rs b/services/document_storage_service/src/config.rsindex fe438f258c..8a5ba94111 100644--- a/services/document_storage_service/src/config.rs+++ b/services/document_storage_service/src/config.rs@@ -6,12 +6,17 @@ pub use macro_env::Environment;use macro_env_var::{env_vars, maybe_env_vars};use secretsmanager_client::LocalOrRemoteSecret;+#[cfg(test)]+mod test;+pub const DEFAULT_PRESIGNED_URL_EXPIRY_SECONDS: u64 = 900; // 15 minutes/// Allow long recordings to play and seek without the signed URL expiring mid-session.pub const CALL_RECORDING_PRESIGNED_URL_EXPIRY_SECONDS: u64 = 6 * 60 * 60;pub const DEFAULT_PRESIGNED_URL_BROWSER_CACHE_EXPIRY_SECONDS: u64 = 840; // remember that this is just a suggestion to the client browserenv_vars! {+ /// PostHog project key for backend feature flags.+ pub struct PosthogApiKey;pub struct DatabaseUrl;pub struct DatabaseUrlReadonly;pub struct DocumentStorageBucket;@@ -83,12 +88,18 @@ maybe_env_vars! {/// Optional Meta test event code — routes events to Meta's test events/// view instead of production tracking.pub struct MetaTestEventCode;+ /// PostHog host; defaults to the project's US region.+ pub struct PosthogHost;}/// The configuration parameters for the application.#[derive(macro_config::MacroConfig)]#[serde(rename_all = "SCREAMING_SNAKE_CASE")]pub struct Config {+ /// Required PostHog project key for backend feature flags.+ pub posthog_api_key: PosthogApiKey,+ /// PostHog host (optional)+ pub posthog_host: PosthogHost,/// Default-off quota admission and prospective usage counting.#[macro_config_default(ai_usage::AiUsageEnforcement::Disabled)]pub enable_ai_usage_enforcement: ai_usage::AiUsageEnforcement,diff --git a/services/document_storage_service/src/config/test.rs b/services/document_storage_service/src/config/test.rsnew file mode 100644index 0000000000..e454cdd80d--- /dev/null+++ b/services/document_storage_service/src/config/test.rs@@ -0,0 +1,14 @@+use super::Config;++#[test]+fn missing_posthog_key_fails_config_loading() {+ let error = serde_json::from_value::<Config>(serde_json::json!({}))+ .err()+ .expect("missing PostHog configuration must fail startup");++ assert!(+ error+ .to_string()+ .contains("missing field `POSTHOG_API_KEY`")+ );+}diff --git a/services/document_storage_service/src/server.rs b/services/document_storage_service/src/server.rsindex cbbfc49b95..9cb936bc38 100644--- a/services/document_storage_service/src/server.rs+++ b/services/document_storage_service/src/server.rs@@ -198,6 +198,8 @@ use user_api_key::{const SOUP_CONSUMER_RESTART_MAX_DELAY_SECS: u64 = 60;const SOUP_CONSUMER_RESTART_ALERT_THRESHOLD: u32 = 5;+const DEFAULT_POSTHOG_HOST: &str = "https://us.i.posthog.com";+fn soup_consumer_restart_delay(consecutive_failures: u32) -> Duration {let exponent = consecutive_failures.saturating_sub(1).min(6);Duration::from_secs((1_u64 << exponent).min(SOUP_CONSUMER_RESTART_MAX_DELAY_SECS))@@ -875,11 +877,24 @@ async fn run_server() -> anyhow::Result<()> {};let call_service_builder = call_service_builder.with_voip_push_sender(voip_sender);- let call_service = Arc::new(- call_service_builder- .with_voice_repo(PgVoiceRepo::new(db.clone()))- .with_event_broker(macro_event_broker.clone()),- );+ let call_root_poster = call::outbound::channel_threads::LateCallRootPoster::default();+ let call_service_builder = call_service_builder+ .with_voice_repo(PgVoiceRepo::new(db.clone()))+ .with_event_broker(macro_event_broker.clone());+ let flags = feature_flags::outbound::posthog::PostHogFeatureFlags::new(+ config.posthog_host.value().unwrap_or(DEFAULT_POSTHOG_HOST),+ config.posthog_api_key.as_ref().to_owned(),+ // Flag evaluation is on the call-start path; fall back promptly.+ Duration::from_millis(300),+ )+ .map_err(|error| anyhow::anyhow!("invalid feature flag configuration: {error}"))?;+ let call_service_builder = call_service_builder.with_channel_threads(Arc::new(+ call::outbound::channel_threads::FlaggedChannelThreads::new(+ flags,+ call_root_poster.clone(),+ ),+ ));+ let call_service = Arc::new(call_service_builder);consumer_tracker.spawn({let service = call_service.clone();@@ -1336,6 +1351,10 @@ async fn run_server() -> anyhow::Result<()> {),);let message_commands: Arc<dyn messages::domain::api::MessageCommands> = message_service.clone();+ let call_roots: Arc<dyn messages::domain::api::CallRootPoster> = message_service.clone();+ if call_root_poster.set(call_roots).is_err() {+ tracing::error!("the call root poster was set twice");+ }let guest_chat_service = Arc::new(messages::domain::service::guest_chat::GuestChatService::new(message_service.clone(),diff --git a/services/search_processing_service/src/inbound/kafka_consumer/test.rs b/services/search_processing_service/src/inbound/kafka_consumer/test.rsindex 6cef2a4015..9327ca1c56 100644--- a/services/search_processing_service/src/inbound/kafka_consumer/test.rs+++ b/services/search_processing_service/src/inbound/kafka_consumer/test.rs@@ -161,6 +161,7 @@ fn started_event() -> CallTopicEvent {fn archived_event() -> CallTopicEvent {CallTopicEvent::RecordArchived(CallRecordArchivedMetadata {+ channel_thread: false,call_id: CALL_ID,channel_id: Some(CHANNEL_ID),created_by: user_id(),diff --git a/tooling/xtask/crates/xtask_local/src/local/local_env.rs b/tooling/xtask/crates/xtask_local/src/local/local_env.rsindex 695e854e23..f3ca6d20c5 100644--- a/tooling/xtask/crates/xtask_local/src/local/local_env.rs+++ b/tooling/xtask/crates/xtask_local/src/local/local_env.rs@@ -692,6 +692,8 @@ struct BootStubEnv;impl BootStubEnv {fn write(&self, env: &mut BTreeMap<String, String>) {+ // DSS requires a project key at boot; real flag evaluation needs Doppler.+ env.insert("POSTHOG_API_KEY".into(), "local-posthog-project-key".into());// The worker is opt-in and ships paused; an explicit env-file can enable it.env.insert("SLACK_IMPORT_ENABLED".into(), "false".into());env.insert("SLACK_IMPORT_CONCURRENCY".into(), "1".into());diff --git a/tooling/xtask/crates/xtask_local/src/local/local_env/test.rs b/tooling/xtask/crates/xtask_local/src/local/local_env/test.rsindex 0e7416c1e1..05d8e90450 100644--- a/tooling/xtask/crates/xtask_local/src/local/local_env/test.rs+++ b/tooling/xtask/crates/xtask_local/src/local/local_env/test.rs@@ -97,6 +97,7 @@ fn emits_required_keys() {"JWT_SECRET_KEY",// Boot-blocking stubs — service config loaders require these even in a// no-doppler stack (see `BootStubEnv`).+ "POSTHOG_API_KEY","REDIS_HOST","MACRO_DB_URL","INTERNAL_API_KEY",