Fix sidebar missing Bots/Campaigns: add all feature flags to seed data

The seed data only enabled 16 of 37 feature flags used by the frontend.
Two missing flags caused sidebar navigation bugs found during QA:

- agent_bots: the '机器人' settings link was hidden (isAllowed=false)
- campaigns: the '活动' (Campaigns) parent had no accessible children,
  so clicking it did nothing instead of expanding to show sub-items

Add all 37 feature flags from FEATURE_FLAGS to the smoke seed data so
every sidebar menu item is visible and navigable.

Also includes QA test report for the full-page CDP testing session.
This commit is contained in:
2026-07-08 15:11:11 +08:00
parent 10cc300f31
commit e8d1876478
2 changed files with 198 additions and 1 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ func seedSmokeData(ctx context.Context, db *gorm.DB) (*smokeSeedSummary, error)
inboxName := getenvDefault("GOCHAT_SEED_INBOX_NAME", "Test Website Inbox")
account := &model.Account{}
smokeFeatureFlags := `{"advanced_assignment":true,"assignment_v2":true,"audit_logs":true,"automations":true,"captain_integration":true,"captain_integration_v2":true,"captain_tasks":true,"companies":true,"crm":true,"csat":true,"custom_roles":true,"custom_tools":true,"inbox_management":true,"macros":true,"reports":true,"sla":true}`
smokeFeatureFlags := `{"advanced_assignment":true,"agent_bots":true,"agent_management":true,"assignment_v2":true,"audit_logs":true,"auto_resolve_conversations":true,"automations":true,"campaigns":true,"canned_responses":true,"captain_integration":true,"captain_integration_v2":true,"captain_tasks":true,"companies":true,"crm":true,"csat":true,"custom_attributes":true,"custom_roles":true,"custom_tools":true,"help_center":true,"inbox_management":true,"inbox_view":true,"integrations":true,"labels":true,"macros":true,"reports":true,"sla":true,"saml":true,"team_management":true,"voice_recorder":true,"whatsapp_campaign":true,"channel_email":true,"channel_facebook":true,"channel_website":true,"channel_instagram":true,"channel_tiktok":true,"channel_voice":true,"conversation_unread_counts":true}`
if err := db.WithContext(ctx).Where("name = ?", accountName).FirstOrCreate(account, model.Account{Name: accountName, Locale: "zh_CN", Timezone: "UTC", Active: true, Status: "active", FeatureFlags: smokeFeatureFlags}).Error; err != nil {
return nil, fmt.Errorf("seed account: %w", err)
}