From 981c3d56d95a63b17acbac247d7967bf3c653306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=AA=E7=A8=8B=E4=BC=9F?= Date: Wed, 17 Jun 2026 18:41:46 +0800 Subject: [PATCH] fix(channels): don't gate webchat creation on auto-generated API Key The Web/API (webchat) onboarding wizard marked api_key as required while it is also readOnly and platform-generated on save. The readOnly field could never be filled during creation, so canSubmitConfig never passed and "Continue" stayed disabled. Exclude readOnly fields from the wizard's required/optional field sets so they neither gate "Continue" nor render as fillable inputs. The api_key still appears as required + readOnly in the edit modal once a value exists. Refs matevip/mateclaw#338 --- .../src/components/channels/ChannelOnboardingWizard.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mateclaw-ui/src/components/channels/ChannelOnboardingWizard.vue b/mateclaw-ui/src/components/channels/ChannelOnboardingWizard.vue index 18f67255..e1b8975f 100644 --- a/mateclaw-ui/src/components/channels/ChannelOnboardingWizard.vue +++ b/mateclaw-ui/src/components/channels/ChannelOnboardingWizard.vue @@ -393,8 +393,13 @@ const subtitle = computed(() => ) const allFields = computed(() => CHANNEL_FIELD_DEFS[channelType.value] || []) -const requiredFields = computed(() => allFields.value.filter((f) => f.required)) -const optionalFields = computed(() => allFields.value.filter((f) => !f.required)) +// readOnly fields are platform-generated on save (e.g. webchat's api_key) — the +// user can't enter them during creation, so they must never gate "Continue" nor +// render as fillable inputs here. They show up (required, readOnly) in the edit +// modal once a value exists. +const editableFields = computed(() => allFields.value.filter((f) => !f.readOnly)) +const requiredFields = computed(() => editableFields.value.filter((f) => f.required)) +const optionalFields = computed(() => editableFields.value.filter((f) => !f.required)) const hasVerifier = computed(() => VERIFIABLE_TYPES.has(channelType.value)) const isOAuthStyle = computed(() => OAUTH_STYLE_TYPES.has(channelType.value))