feat(dashboard): move email-joke sender filter to Agent Configs tab#567
Merged
zbigniewsobiecki merged 1 commit intodevfrom Feb 27, 2026
Merged
feat(dashboard): move email-joke sender filter to Agent Configs tab#567zbigniewsobiecki merged 1 commit intodevfrom
zbigniewsobiecki merged 1 commit intodevfrom
Conversation
The EmailJokeConfig sender filter widget was placed in the Email integration tab, but it is agent-specific trigger configuration and belongs in the Agent Configs tab alongside PM and SCM triggers. Changes: - Add 'email-joke' to ALL_AGENT_TYPES so it appears as a section in Agent Configs - Move AGENT_LABELS to trigger-agent-mapping.ts and type it as Record<KnownAgentType, string> — adding a new agent type without a label is now a compile error rather than a silent fallback - Export EMAIL_TRIGGER_AGENTS (Set<KnownAgentType>) from trigger-agent-mapping.ts — replaces the magic string 'email-joke' that was hard-coded in the generic AgentSection component - Add 'email-joke': [] to AGENT_TRIGGER_MAP for consistency with all other known agent types - Render EmailJokeConfig inside the email-joke AgentSection under an "Email Triggers" heading when expanded - Remove EmailJokeConfig from the integration-form email tab - Remove "Add Custom Agent Config" button — only supported agent types defined in ALL_AGENT_TYPES are valid; per-section "Add Config" buttons pre-seed the type so it is always read-only in the dialog - Suppress pre-existing noExcessiveCognitiveComplexity biome warning in EmailWizard's multi-provider initialization useEffect - Add tests for AGENT_LABELS, EMAIL_TRIGGER_AGENTS, ALL_AGENT_TYPES completeness, and email-joke trigger definitions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EmailJokeConfigsender filter from the Email integration tab to the Agent Configs tab, under an "Email Triggers" section inside the expanded email-joke section. Email integration is shared infrastructure; the sender filter is agent-specific trigger config.email-joketoALL_AGENT_TYPESso it gets a first-class section in Agent Configs, identical to all other agents.ALL_AGENT_TYPES) are valid.Code quality fixes (identified via review)
requiredon shadcn<Select>has no effect on form validationhasEmailTriggerswas a magic string'email-joke'in a generic componentEMAIL_TRIGGER_AGENTS.has()from trigger-agent-mapping'email-joke'absent fromAGENT_TRIGGER_MAP'email-joke': []AGENT_LABELSwasRecord<string, string>in a separate file — drift-pronetrigger-agent-mapping.tsasRecord<KnownAgentType, string>— adding a new agent type without a label is now a compile error./email-wizard.jsimport was inserted mid-block of@/alias importsprojectIdwas required on allAgentSectioninstances but only consumed by oneLint / typecheck
noExcessiveCognitiveComplexitybiome warning inEmailWizard's multi-provider initializationuseEffectwith a targetedbiome-ignorecomment.biome checkerrors and warnings are clean.Tests
Added 11 new tests in
tests/unit/web/triggerAgentMapping.test.ts:ALL_AGENT_TYPESincludesemail-jokeand matches expected orderAGENT_LABELShas a label for every type inALL_AGENT_TYPES, no extrasEMAIL_TRIGGER_AGENTScontainsemail-joke, only known types, not non-email agentsgetTriggersForAgent('email-joke')returns empty array in all filter combinationsTest plan
🤖 Generated with Claude Code