From 01846719b51c04683cbcaf4456f4b9909c542b55 Mon Sep 17 00:00:00 2001 From: Maurice Codik Moscoso Date: Wed, 9 Sep 2026 13:02:17 -0700 Subject: [PATCH] fix: preserve features.code_channels in app manifest AppFeatures had no field for code_channels, so Go's json.Unmarshal silently dropped it before the manifest was sent to apps.manifest.validate/update. Add it as a RawJSON passthrough so any future sub-fields survive without further struct changes. Co-Authored-By: Claude --- internal/shared/types/app_manifest.go | 1 + internal/shared/types/app_manifest_test.go | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/internal/shared/types/app_manifest.go b/internal/shared/types/app_manifest.go index 61755859..61676816 100644 --- a/internal/shared/types/app_manifest.go +++ b/internal/shared/types/app_manifest.go @@ -79,6 +79,7 @@ type AppFeatures struct { ManifestSlashCommandsItems []ManifestSlashCommandsItem `json:"slash_commands,omitempty" yaml:"slash_commands,flow,omitempty"` Search *Search `json:"search,omitempty" yaml:"search,flow,omitempty"` RichPreviews *RichPreviews `json:"rich_previews,omitempty" yaml:"rich_previews,flow,omitempty"` + CodeChannels *RawJSON `json:"code_channels,omitempty" yaml:"code_channels,flow,omitempty"` } type RichPreviews struct { diff --git a/internal/shared/types/app_manifest_test.go b/internal/shared/types/app_manifest_test.go index 405be005..0e9373d7 100644 --- a/internal/shared/types/app_manifest_test.go +++ b/internal/shared/types/app_manifest_test.go @@ -250,6 +250,15 @@ func Test_AppManifest_AppFeatures(t *testing.T) { }, want: `{"app_home":{},"bot_user":{"display_name":"business_bot"},"rich_previews":{"entity_types":["slack#/entities/file"]}}`, }, + "includes code channels when provided": { + features: AppFeatures{ + BotUser: BotUser{ + DisplayName: "codebot", + }, + CodeChannels: ToRawJSON(`{"enabled":true}`), + }, + want: `{"app_home":{},"bot_user":{"display_name":"codebot"},"code_channels":{"enabled":true}}`, + }, } for name, tc := range tests { t.Run(name, func(t *testing.T) {