Skip to content

Fix support ticket creation and add email management#57

Merged
warengonzaga merged 12 commits intodevfrom
fix/support-ticket-creation
Jul 15, 2025
Merged

Fix support ticket creation and add email management#57
warengonzaga merged 12 commits intodevfrom
fix/support-ticket-creation

Conversation

@warengonzaga
Copy link
Member

@warengonzaga warengonzaga commented Jul 14, 2025

This pull request introduces significant updates to the WG Code Builder chat mode and adds two new bot commands for managing user email settings. The changes enhance functionality, improve clarity in user interactions, and expand the bot's capabilities for email management.

Updates to WG Code Builder Chat Mode:

  • .github/chatmodes/WG Code Builder.chatmode.md: Revised the chat mode description and mission to focus on practical development and guidance rather than education. Updated terminology to emphasize implementation and value-driven insights, aligning communication style and principles with practical wisdom.

New Commands for Email Management:

  • src/commands/basic/SetEmailCommand.ts: Added the SetEmailCommand to allow users to set or update their email address. Includes validation, direct email setup, interactive setup, and handling of pending agent messages for improved user experience.
  • src/commands/basic/ViewEmailCommand.ts: Added the ViewEmailCommand to display the user's current email settings, including temporary or personal email types, with actionable recommendations.

Integration of New Commands:

  • src/commands/index.ts: Imported the SetEmailCommand and ViewEmailCommand into the command registry and initialized them for use within the bot. [1] [2]

Copilot AI review requested due to automatic review settings July 14, 2025 11:35
@warengonzaga warengonzaga self-assigned this Jul 14, 2025
@warengonzaga
Copy link
Member Author

The only missing piece here is that the view email does not show the dummy email via /viewemail command. Also check the unthreadEmail object here to make sure that we only have one email being used to bind to the user.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances support ticket creation by integrating email management, standardizing validations, and improving message rendering.

  • Introduces email management utilities (validateEmail, generateDummyEmail, preferences) and adds /setemail & /viewemail commands.
  • Refactors support flow to include interactive email setup for first-time users and replaces manual Markdown escaping with a shared utility.
  • Adds both advanced (SmartInputValidator) and simple (SimpleInputValidator) validation modules and robust template rendering with error checks.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/utils/smartValidators.ts Adds advanced input validator with educational feedback
src/utils/simpleValidators.ts Adds streamlined validator for enterprise users
src/utils/markdownEscape.ts Introduces shared Markdown escaping utilities
src/utils/emailManager.ts Implements email validation, dummy generation, and preference management
src/index.ts Registers new /setemail and /viewemail commands
src/handlers/webhookMessage.ts Replaces inline escaping with escapeMarkdown utility
src/config/globalTemplates.ts Updates ticket_created template content
src/commands/support/SupportCommandClean.ts Streamlines ticket flow, adds email checks
src/commands/processors/ConversationProcessors.ts Refactors summary & confirmation flow, uses simple validator
src/commands/processors/CallbackProcessors.ts Adds callbacks for email setup, temp/upgrade flows
src/commands/index.ts Registers SetEmailCommand and ViewEmailCommand
src/commands/basic/ViewEmailCommand.ts Implements /viewemail command
src/commands/basic/SetEmailCommand.ts Implements /setemail command
Comments suppressed due to low confidence (2)

src/utils/smartValidators.ts:1

  • New utility functions in this file lack accompanying unit tests. Consider adding tests to cover validation logic and quality analysis methods.
/**

src/utils/smartValidators.ts:215

  • [nitpick] The property name hasKeywords duplicates hasTechnicalTerms semantically, causing confusion. Consider consolidating to a single property for clarity.
            hasKeywords: hasTechnicalTerms,

@warengonzaga warengonzaga force-pushed the fix/support-ticket-creation branch from 4b3b595 to f8f7957 Compare July 15, 2025 15:35
@warengonzaga warengonzaga merged commit 4cfb745 into dev Jul 15, 2025
3 checks passed
@warengonzaga warengonzaga deleted the fix/support-ticket-creation branch July 15, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants